Pin compiler_builtins to 0.1.109 when building std
[ldk-c-bindings] / lightning-c-bindings / include / lightning.h
index bf4f3ddb1dc658ed030156c69f8a3aa6ae962ee8..30fd57705794befbe202a10fe2c0cb9d0375df7d 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef LDK_C_BINDINGS_H
 #define LDK_C_BINDINGS_H
 
-/* Generated with cbindgen:0.24.3 */
+/* Generated with cbindgen:0.24.5 */
 
 /* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */
 
 #include <stdint.h>
 #include "ldk_rust_types.h"
 
+/**
+ * Whether this blinded HTLC is being failed backwards by the introduction node or a blinded node,
+ * which determines the failure message that should be used.
+ */
+typedef enum LDKBlindedFailure {
+   /**
+    * This HTLC is being failed backwards by the introduction node, and thus should be failed with
+    * [`msgs::UpdateFailHTLC`] and error code `0x8000|0x4000|24`.
+    */
+   LDKBlindedFailure_FromIntroductionNode,
+   /**
+    * This HTLC is being failed backwards by a blinded node within the path, and thus should be
+    * failed with [`msgs::UpdateFailMalformedHTLC`] and error code `0x8000|0x4000|24`.
+    */
+   LDKBlindedFailure_FromBlindedNode,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKBlindedFailure_Sentinel,
+} LDKBlindedFailure;
+
 /**
  * Errors that may occur when converting a [`RawBolt11Invoice`] to a [`Bolt11Invoice`]. They relate to
  * the requirements sections in BOLT #11
@@ -150,10 +171,18 @@ typedef enum LDKBolt12SemanticError {
     * A payer id was expected but was missing.
     */
    LDKBolt12SemanticError_MissingPayerId,
+   /**
+    * The payment id for a refund or request is already in use.
+    */
+   LDKBolt12SemanticError_DuplicatePaymentId,
    /**
     * Blinded paths were expected but were missing.
     */
    LDKBolt12SemanticError_MissingPaths,
+   /**
+    * Blinded paths were provided but were not expected.
+    */
+   LDKBolt12SemanticError_UnexpectedPaths,
    /**
     * The blinded payinfo given does not match the number of blinded path hops.
     */
@@ -196,6 +225,25 @@ typedef enum LDKCOption_NoneZ {
 
 /**
  * An enum representing the status of a channel monitor update persistence.
+ *
+ * These are generally used as the return value for an implementation of [`Persist`] which is used
+ * as the storage layer for a [`ChainMonitor`]. See the docs on [`Persist`] for a high-level
+ * explanation of how to handle different cases.
+ *
+ * While `UnrecoverableError` is provided as a failure variant, it is not truly \"handled\" on the
+ * calling side, and generally results in an immediate panic. For those who prefer to avoid
+ * panics, `InProgress` can be used and you can retry the update operation in the background or
+ * shut down cleanly.
+ *
+ * Note that channels should generally *not* be force-closed after a persistence failure.
+ * Force-closing with the latest [`ChannelMonitorUpdate`] applied may result in a transaction
+ * being broadcast which can only be spent by the latest [`ChannelMonitor`]! Thus, if the
+ * latest [`ChannelMonitor`] is not durably persisted anywhere and exists only in memory, naively
+ * calling [`ChannelManager::force_close_broadcasting_latest_txn`] *may result in loss of funds*!
+ *
+ * [`Persist`]: chainmonitor::Persist
+ * [`ChainMonitor`]: chainmonitor::ChainMonitor
+ * [`ChannelManager::force_close_broadcasting_latest_txn`]: crate::ln::channelmanager::ChannelManager::force_close_broadcasting_latest_txn
  */
 typedef enum LDKChannelMonitorUpdateStatus {
    /**
@@ -207,17 +255,13 @@ typedef enum LDKChannelMonitorUpdateStatus {
     */
    LDKChannelMonitorUpdateStatus_Completed,
    /**
-    * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
-    * our state failed, but is expected to succeed at some point in the future).
-    *
-    * Such a failure will \"freeze\" a channel, preventing us from revoking old states or
-    * submitting new commitment transactions to the counterparty. Once the update(s) which failed
-    * have been successfully applied, a [`MonitorEvent::Completed`] can be used to restore the
-    * channel to an operational state.
+    * Indicates that the update will happen asynchronously in the background or that a transient
+    * failure occurred which is being retried in the background and will eventually complete.
     *
-    * Note that a given [`ChannelManager`] will *never* re-generate a [`ChannelMonitorUpdate`].
-    * If you return this error you must ensure that it is written to disk safely before writing
-    * the latest [`ChannelManager`] state, or you should return [`PermanentFailure`] instead.
+    * This will \"freeze\" a channel, preventing us from revoking old states or submitting a new
+    * commitment transaction to the counterparty. Once the update(s) which are `InProgress` have
+    * been completed, a [`MonitorEvent::Completed`] can be used to restore the channel to an
+    * operational state.
     *
     * Even when a channel has been \"frozen\", updates to the [`ChannelMonitor`] can continue to
     * occur (e.g. if an inbound HTLC which we forwarded was claimed upstream, resulting in us
@@ -227,56 +271,31 @@ typedef enum LDKChannelMonitorUpdateStatus {
     * until a [`MonitorEvent::Completed`] is provided, even if you return no error on a later
     * monitor update for the same channel.
     *
-    * For deployments where a copy of ChannelMonitors and other local state are backed up in a
-    * remote location (with local copies persisted immediately), it is anticipated that all
+    * For deployments where a copy of [`ChannelMonitor`]s and other local state are backed up in
+    * remote location (with local copies persisted immediately), it is anticipated that all
     * updates will return [`InProgress`] until the remote copies could be updated.
     *
-    * [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
+    * Note that while fully asynchronous persistence of [`ChannelMonitor`] data is generally
+    * reliable, this feature is considered beta, and a handful of edge-cases remain. Until the
+    * remaining cases are fixed, in rare cases, *using this feature may lead to funds loss*.
+    *
     * [`InProgress`]: ChannelMonitorUpdateStatus::InProgress
-    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
     */
    LDKChannelMonitorUpdateStatus_InProgress,
    /**
-    * Used to indicate no further channel monitor updates will be allowed (likely a disk failure
-    * or a remote copy of this [`ChannelMonitor`] is no longer reachable and thus not updatable).
-    *
-    * When this is returned, [`ChannelManager`] will force-close the channel but *not* broadcast
-    * our current commitment transaction. This avoids a dangerous case where a local disk failure
-    * (e.g. the Linux-default remounting of the disk as read-only) causes [`PermanentFailure`]s
-    * for all monitor updates. If we were to broadcast our latest commitment transaction and then
-    * restart, we could end up reading a previous [`ChannelMonitor`] and [`ChannelManager`],
-    * revoking our now-broadcasted state before seeing it confirm and losing all our funds.
-    *
-    * Note that this is somewhat of a tradeoff - if the disk is really gone and we may have lost
-    * the data permanently, we really should broadcast immediately. If the data can be recovered
-    * with manual intervention, we'd rather close the channel, rejecting future updates to it,
-    * and broadcast the latest state only if we have HTLCs to claim which are timing out (which
-    * we do as long as blocks are connected).
-    *
-    * In order to broadcast the latest local commitment transaction, you'll need to call
-    * [`ChannelMonitor::get_latest_holder_commitment_txn`] and broadcast the resulting
-    * transactions once you've safely ensured no further channel updates can be generated by your
-    * [`ChannelManager`].
-    *
-    * Note that at least one final [`ChannelMonitorUpdate`] may still be provided, which must
-    * still be processed by a running [`ChannelMonitor`]. This final update will mark the
-    * [`ChannelMonitor`] as finalized, ensuring no further updates (e.g. revocation of the latest
-    * commitment transaction) are allowed.
-    *
-    * Note that even if you return a [`PermanentFailure`] due to unavailability of secondary
-    * [`ChannelMonitor`] copies, you should still make an attempt to store the update where
-    * possible to ensure you can claim HTLC outputs on the latest commitment transaction
-    * broadcasted later.
-    *
-    * In case of distributed watchtowers deployment, the new version must be written to disk, as
-    * state may have been stored but rejected due to a block forcing a commitment broadcast. This
-    * storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
-    * lagging behind on block processing.
-    *
-    * [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
-    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+    * Indicates that an update has failed and will not complete at any point in the future.
+    *
+    * Currently returning this variant will cause LDK to immediately panic to encourage immediate
+    * shutdown. In the future this may be updated to disconnect peers and refuse to continue
+    * normal operation without a panic.
+    *
+    * Applications which wish to perform an orderly shutdown after failure should consider
+    * returning [`InProgress`] instead and simply shut down without ever marking the update
+    * complete.
+    *
+    * [`InProgress`]: ChannelMonitorUpdateStatus::InProgress
     */
-   LDKChannelMonitorUpdateStatus_PermanentFailure,
+   LDKChannelMonitorUpdateStatus_UnrecoverableError,
    /**
     * Must be last for serialization purposes
     */
@@ -326,28 +345,105 @@ typedef enum LDKChannelShutdownState {
  */
 typedef enum LDKConfirmationTarget {
    /**
-    * We'd like a transaction to confirm in the future, but don't want to commit most of the fees
-    * required to do so yet. The remaining fees will come via a Child-Pays-For-Parent (CPFP) fee
-    * bump of the transaction.
+    * We have some funds available on chain which we need to spend prior to some expiry time at
+    * which point our counterparty may be able to steal them. Generally we have in the high tens
+    * to low hundreds of blocks to get our transaction on-chain, but we shouldn't risk too low a
+    * fee - this should be a relatively high priority feerate.
+    */
+   LDKConfirmationTarget_OnChainSweep,
+   /**
+    * This is the lowest feerate we will allow our channel counterparty to have in an anchor
+    * channel in order to close the channel if a channel party goes away.
+    *
+    * This needs to be sufficient to get into the mempool when the channel needs to
+    * be force-closed. Setting too high may result in force-closures if our counterparty attempts
+    * to use a lower feerate. Because this is for anchor channels, we can always bump the feerate
+    * later; the feerate here only needs to be sufficient to enter the mempool.
     *
-    * The feerate returned should be the absolute minimum feerate required to enter most node
-    * mempools across the network. Note that if you are not able to obtain this feerate estimate,
-    * you should likely use the furthest-out estimate allowed by your fee estimator.
+    * A good estimate is the expected mempool minimum at the time of force-closure. Obviously this
+    * is not an estimate which is very easy to calculate because we do not know the future. Using
+    * a simple long-term fee estimate or tracking of the mempool minimum is a good approach to
+    * ensure you can always close the channel. A future change to Bitcoin's P2P network
+    * (package relay) may obviate the need for this entirely.
     */
-   LDKConfirmationTarget_MempoolMinimum,
+   LDKConfirmationTarget_MinAllowedAnchorChannelRemoteFee,
    /**
-    * We are happy with a transaction confirming slowly, at least within a day or so worth of
-    * blocks.
+    * The lowest feerate we will allow our channel counterparty to have in a non-anchor channel.
+    *
+    * This is the feerate on the transaction which we (or our counterparty) will broadcast in
+    * order to close the channel if a channel party goes away. Setting this value too high will
+    * cause immediate force-closures in order to avoid having an unbroadcastable state.
+    *
+    * This feerate represents the fee we pick now, which must be sufficient to enter a block at an
+    * arbitrary time in the future. Obviously this is not an estimate which is very easy to
+    * calculate. This can leave channels subject to being unable to close if feerates rise, and in
+    * general you should prefer anchor channels to ensure you can increase the feerate when the
+    * transactions need broadcasting.
+    *
+    * Do note some fee estimators round up to the next full sat/vbyte (ie 250 sats per kw),
+    * causing occasional issues with feerate disagreements between an initiator that wants a
+    * feerate of 1.1 sat/vbyte and a receiver that wants 1.1 rounded up to 2. If your fee
+    * estimator rounds subtracting 250 to your desired feerate here can help avoid this issue.
+    *
+    * [`ChannelConfig::max_dust_htlc_exposure`]: crate::util::config::ChannelConfig::max_dust_htlc_exposure
+    */
+   LDKConfirmationTarget_MinAllowedNonAnchorChannelRemoteFee,
+   /**
+    * This is the feerate on the transaction which we (or our counterparty) will broadcast in
+    * order to close the channel if a channel party goes away.
+    *
+    * This needs to be sufficient to get into the mempool when the channel needs to
+    * be force-closed. Setting too low may result in force-closures. Because this is for anchor
+    * channels, it can be a low value as we can always bump the feerate later.
+    *
+    * A good estimate is the expected mempool minimum at the time of force-closure. Obviously this
+    * is not an estimate which is very easy to calculate because we do not know the future. Using
+    * a simple long-term fee estimate or tracking of the mempool minimum is a good approach to
+    * ensure you can always close the channel. A future change to Bitcoin's P2P network
+    * (package relay) may obviate the need for this entirely.
+    */
+   LDKConfirmationTarget_AnchorChannelFee,
+   /**
+    * Lightning is built around the ability to broadcast a transaction in the future to close our
+    * channel and claim all pending funds. In order to do so, non-anchor channels are built with
+    * transactions which we need to be able to broadcast at some point in the future.
+    *
+    * This feerate represents the fee we pick now, which must be sufficient to enter a block at an
+    * arbitrary time in the future. Obviously this is not an estimate which is very easy to
+    * calculate, so most lightning nodes use some relatively high-priority feerate using the
+    * current mempool. This leaves channels subject to being unable to close if feerates rise, and
+    * in general you should prefer anchor channels to ensure you can increase the feerate when the
+    * transactions need broadcasting.
+    *
+    * Since this should represent the feerate of a channel close that does not need fee
+    * bumping, this is also used as an upper bound for our attempted feerate when doing cooperative
+    * closure of any channel.
     */
-   LDKConfirmationTarget_Background,
+   LDKConfirmationTarget_NonAnchorChannelFee,
    /**
-    * We'd like a transaction to confirm without major delayed, i.e., within the next 12-24 blocks.
+    * When cooperatively closing a channel, this is the minimum feerate we will accept.
+    * Recommended at least within a day or so worth of blocks.
+    *
+    * This will also be used when initiating a cooperative close of a channel. When closing a
+    * channel you can override this fee by using
+    * [`ChannelManager::close_channel_with_feerate_and_script`].
+    *
+    * [`ChannelManager::close_channel_with_feerate_and_script`]: crate::ln::channelmanager::ChannelManager::close_channel_with_feerate_and_script
     */
-   LDKConfirmationTarget_Normal,
+   LDKConfirmationTarget_ChannelCloseMinimum,
    /**
-    * We'd like a transaction to confirm in the next few blocks.
+    * The feerate [`OutputSweeper`] will use on transactions spending
+    * [`SpendableOutputDescriptor`]s after a channel closure.
+    *
+    * Generally spending these outputs is safe as long as they eventually confirm, so a value
+    * (slightly above) the mempool minimum should suffice. However, as this value will influence
+    * how long funds will be unavailable after channel closure, [`FeeEstimator`] implementors
+    * might want to choose a higher feerate to regain control over funds faster.
+    *
+    * [`OutputSweeper`]: crate::util::sweep::OutputSweeper
+    * [`SpendableOutputDescriptor`]: crate::sign::SpendableOutputDescriptor
     */
-   LDKConfirmationTarget_HighPriority,
+   LDKConfirmationTarget_OutputSpendingFee,
    /**
     * Must be last for serialization purposes
     */
@@ -424,34 +520,26 @@ typedef enum LDKCurrency {
 } LDKCurrency;
 
 /**
- * This enum is used to specify which error data to send to peers when failing back an HTLC
- * using [`ChannelManager::fail_htlc_backwards_with_reason`].
+ * The side of a channel that is the [`IntroductionNode`] in a [`BlindedPath`]. [BOLT 7] defines
+ * which nodes is which in the [`ChannelAnnouncement`] message.
  *
- * For more info on failure codes, see <https://github.com/lightning/bolts/blob/master/04-onion-routing.md#failure-messages>.
+ * [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message
+ * [`ChannelAnnouncement`]: crate::ln::msgs::ChannelAnnouncement
  */
-typedef enum LDKFailureCode {
+typedef enum LDKDirection {
    /**
-    * We had a temporary error processing the payment. Useful if no other error codes fit
-    * and you want to indicate that the payer may want to retry.
-    */
-   LDKFailureCode_TemporaryNodeFailure,
-   /**
-    * We have a required feature which was not in this onion. For example, you may require
-    * some additional metadata that was not provided with this payment.
+    * The lesser node id when compared lexicographically in ascending order.
     */
-   LDKFailureCode_RequiredNodeFeatureMissing,
+   LDKDirection_NodeOne,
    /**
-    * You may wish to use this when a `payment_preimage` is unknown, or the CLTV expiry of
-    * the HTLC is too close to the current block height for safe handling.
-    * Using this failure code in [`ChannelManager::fail_htlc_backwards_with_reason`] is
-    * equivalent to calling [`ChannelManager::fail_htlc_backwards`].
+    * The greater node id when compared lexicographically in ascending order.
     */
-   LDKFailureCode_IncorrectOrUnknownPaymentDetails,
+   LDKDirection_NodeTwo,
    /**
     * Must be last for serialization purposes
     */
-   LDKFailureCode_Sentinel,
-} LDKFailureCode;
+   LDKDirection_Sentinel,
+} LDKDirection;
 
 /**
  * Describes the type of HTLC claim as determined by analyzing the witness.
@@ -603,6 +691,10 @@ typedef enum LDKPaymentFailureReason {
    LDKPaymentFailureReason_PaymentExpired,
    /**
     * We failed to find a route while retrying the payment.
+    *
+    * Note that this generally indicates that we've exhausted the available set of possible
+    * routes - we tried the payment over a few routes but were not able to find any further
+    * candidate routes beyond those.
     */
    LDKPaymentFailureReason_RouteNotFound,
    /**
@@ -729,6 +821,28 @@ typedef enum LDKSecp256k1Error {
    LDKSecp256k1Error_Sentinel,
 } LDKSecp256k1Error;
 
+/**
+ * A `short_channel_id` construction error
+ */
+typedef enum LDKShortChannelIdError {
+   /**
+    * Block height too high
+    */
+   LDKShortChannelIdError_BlockOverflow,
+   /**
+    * Tx index too high
+    */
+   LDKShortChannelIdError_TxIndexOverflow,
+   /**
+    * Vout index too high
+    */
+   LDKShortChannelIdError_VoutIndexOverflow,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKShortChannelIdError_Sentinel,
+} LDKShortChannelIdError;
+
 /**
  * SI prefixes for the human readable part
  */
@@ -755,6 +869,32 @@ typedef enum LDKSiPrefix {
    LDKSiPrefix_Sentinel,
 } LDKSiPrefix;
 
+/**
+ * [`SocketAddress`] error variants
+ */
+typedef enum LDKSocketAddressParseError {
+   /**
+    * Socket address (IPv4/IPv6) parsing error
+    */
+   LDKSocketAddressParseError_SocketAddrParse,
+   /**
+    * Invalid input format
+    */
+   LDKSocketAddressParseError_InvalidInput,
+   /**
+    * Invalid port
+    */
+   LDKSocketAddressParseError_InvalidPort,
+   /**
+    * Invalid onion v3 address
+    */
+   LDKSocketAddressParseError_InvalidOnionV3,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKSocketAddressParseError_Sentinel,
+} LDKSocketAddressParseError;
+
 /**
  * An error when accessing the chain via [`UtxoLookup`].
  */
@@ -815,6 +955,52 @@ typedef struct LDKU128 {
    uint8_t le_bytes[16];
 } LDKU128;
 
+/**
+ * Integer in the range `0..=16`
+ */
+typedef struct LDKWitnessVersion {
+   uint8_t _0;
+} LDKWitnessVersion;
+
+/**
+ * A dynamically-allocated array of u8s of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_u8Z {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   uint8_t *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_u8Z;
+
+/**
+ * A segregated witness version byte and script bytes
+ */
+typedef struct LDKWitnessProgram {
+   struct LDKWitnessVersion version;
+   struct LDKCVec_u8Z program;
+} LDKWitnessProgram;
+
+/**
+ * A "slice" referencing some byte array. This is simply a length-tagged pointer which does not
+ * own the memory pointed to by data.
+ */
+typedef struct LDKu8slice {
+   /**
+    * A pointer to the byte buffer
+    */
+   const uint8_t *data;
+   /**
+    * The number of bytes pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKu8slice;
+
 /**
  * Represents a scalar value between zero and the secp256k1 curve order, in big endian.
  */
@@ -938,22 +1124,6 @@ typedef struct LDKWitness {
    bool data_is_owned;
 } LDKWitness;
 
-/**
- * A dynamically-allocated array of u8s of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_u8Z {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   uint8_t *data;
-   /**
-    * The number of elements pointed to by `data`.
-    */
-   uintptr_t datalen;
-} LDKCVec_u8Z;
-
 /**
  * An input to a transaction.
  *
@@ -999,69 +1169,122 @@ typedef struct LDKTxOut {
    uint64_t value;
 } LDKTxOut;
 
+
+
 /**
- * An enum which can either contain a u64 or not
+ * Builds a [`Refund`] for the \"offer for money\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
  */
-typedef enum LDKCOption_DurationZ_Tag {
+typedef struct MUST_USE_STRUCT LDKRefundMaybeWithDerivedMetadataBuilder {
    /**
-    * When we're in this state, this COption_DurationZ contains a u64
+    * 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.
     */
-   LDKCOption_DurationZ_Some,
+   LDKnativeRefundMaybeWithDerivedMetadataBuilder *inner;
    /**
-    * When we're in this state, this COption_DurationZ contains nothing
+    * 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.
     */
-   LDKCOption_DurationZ_None,
+   bool is_owned;
+} LDKRefundMaybeWithDerivedMetadataBuilder;
+
+/**
+ * The contents of CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZPtr {
    /**
-    * Must be last for serialization purposes
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKRefundMaybeWithDerivedMetadataBuilder *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   LDKCOption_DurationZ_Sentinel,
-} LDKCOption_DurationZ_Tag;
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZPtr;
 
-typedef struct LDKCOption_DurationZ {
-   LDKCOption_DurationZ_Tag tag;
-   union {
-      struct {
-         uint64_t some;
-      };
-   };
-} LDKCOption_DurationZ;
+/**
+ * A CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::refund::RefundMaybeWithDerivedMetadataBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ;
 
 
 
 /**
- * Onion messages and payments can be sent and received to blinded paths, which serve to hide the
- * identity of the recipient.
+ * A `Refund` is a request to send an [`Bolt12Invoice`] without a preceding [`Offer`].
+ *
+ * Typically, after an invoice is paid, the recipient may publish a refund allowing the sender to
+ * recoup their funds. A refund may be used more generally as an \"offer for money\", such as with a
+ * bitcoin ATM.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`Offer`]: crate::offers::offer::Offer
  */
-typedef struct MUST_USE_STRUCT LDKBlindedPath {
+typedef struct MUST_USE_STRUCT LDKRefund {
    /**
     * 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.
     */
-   LDKnativeBlindedPath *inner;
+   LDKnativeRefund *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;
-} LDKBlindedPath;
+} LDKRefund;
 
 /**
- * A dynamically-allocated array of crate::lightning::blinded_path::BlindedPaths of arbitrary size.
- * This corresponds to std::vector in C++
+ * The contents of CResult_RefundBolt12SemanticErrorZ
  */
-typedef struct LDKCVec_BlindedPathZ {
+typedef union LDKCResult_RefundBolt12SemanticErrorZPtr {
    /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKBlindedPath *data;
+   struct LDKRefund *result;
    /**
-    * The number of elements pointed to by `data`.
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   uintptr_t datalen;
-} LDKCVec_BlindedPathZ;
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_RefundBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_RefundBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::refund::Refund on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_RefundBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_RefundBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_RefundBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_RefundBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_RefundBolt12SemanticErrorZ;
 
 /**
  * An enum which can either contain a u64 or not
@@ -1093,29 +1316,39 @@ typedef struct LDKCOption_u64Z {
 
 
 /**
- * A `Refund` is a request to send an [`Bolt12Invoice`] without a preceding [`Offer`].
- *
- * Typically, after an invoice is paid, the recipient may publish a refund allowing the sender to
- * recoup their funds. A refund may be used more generally as an \"offer for money\", such as with a
- * bitcoin ATM.
- *
- * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
- * [`Offer`]: crate::offers::offer::Offer
+ * Onion messages and payments can be sent and received to blinded paths, which serve to hide the
+ * identity of the recipient.
  */
-typedef struct MUST_USE_STRUCT LDKRefund {
+typedef struct MUST_USE_STRUCT LDKBlindedPath {
    /**
     * 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.
     */
-   LDKnativeRefund *inner;
+   LDKnativeBlindedPath *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;
-} LDKRefund;
+} LDKBlindedPath;
+
+/**
+ * A dynamically-allocated array of crate::lightning::blinded_path::BlindedPaths of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_BlindedPathZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKBlindedPath *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_BlindedPathZ;
 
 
 
@@ -1170,6 +1403,141 @@ typedef struct LDKCResult_RefundBolt12ParseErrorZ {
    bool result_ok;
 } LDKCResult_RefundBolt12ParseErrorZ;
 
+/**
+ * Strategies available to retry payment path failures.
+ */
+typedef enum LDKRetry_Tag {
+   /**
+    * Max number of attempts to retry payment.
+    *
+    * Each attempt may be multiple HTLCs along multiple paths if the router decides to split up a
+    * retry, and may retry multiple failed HTLCs at once if they failed around the same time and
+    * were retried along a route from a single call to [`Router::find_route_with_id`].
+    */
+   LDKRetry_Attempts,
+   /**
+    * Time elapsed before abandoning retries for a payment. At least one attempt at payment is made;
+    * see [`PaymentParameters::expiry_time`] to avoid any attempt at payment after a specific time.
+    *
+    * [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
+    */
+   LDKRetry_Timeout,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKRetry_Sentinel,
+} LDKRetry_Tag;
+
+typedef struct MUST_USE_STRUCT LDKRetry {
+   LDKRetry_Tag tag;
+   union {
+      struct {
+         uint32_t attempts;
+      };
+      struct {
+         uint64_t timeout;
+      };
+   };
+} LDKRetry;
+
+/**
+ * An error in decoding a message or struct.
+ */
+typedef enum LDKDecodeError_Tag {
+   /**
+    * A version byte specified something we don't know how to handle.
+    *
+    * Includes unknown realm byte in an onion hop data packet.
+    */
+   LDKDecodeError_UnknownVersion,
+   /**
+    * Unknown feature mandating we fail to parse message (e.g., TLV with an even, unknown type)
+    */
+   LDKDecodeError_UnknownRequiredFeature,
+   /**
+    * Value was invalid.
+    *
+    * For example, a byte which was supposed to be a bool was something other than a 0
+    * or 1, a public key/private key/signature was invalid, text wasn't UTF-8, TLV was
+    * syntactically incorrect, etc.
+    */
+   LDKDecodeError_InvalidValue,
+   /**
+    * The buffer to be read was too short.
+    */
+   LDKDecodeError_ShortRead,
+   /**
+    * A length descriptor in the packet didn't describe the later data correctly.
+    */
+   LDKDecodeError_BadLengthDescriptor,
+   /**
+    * Error from [`std::io`].
+    */
+   LDKDecodeError_Io,
+   /**
+    * The message included zlib-compressed values, which we don't support.
+    */
+   LDKDecodeError_UnsupportedCompression,
+   /**
+    * Value is validly encoded but is dangerous to use.
+    *
+    * This is used for things like [`ChannelManager`] deserialization where we want to ensure
+    * that we don't use a [`ChannelManager`] which is in out of sync with the [`ChannelMonitor`].
+    * This indicates that there is a critical implementation flaw in the storage implementation
+    * and it's unsafe to continue.
+    *
+    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+    * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+    */
+   LDKDecodeError_DangerousValue,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKDecodeError_Sentinel,
+} LDKDecodeError_Tag;
+
+typedef struct MUST_USE_STRUCT LDKDecodeError {
+   LDKDecodeError_Tag tag;
+   union {
+      struct {
+         enum LDKIOError io;
+      };
+   };
+} LDKDecodeError;
+
+/**
+ * The contents of CResult_RetryDecodeErrorZ
+ */
+typedef union LDKCResult_RetryDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKRetry *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_RetryDecodeErrorZPtr;
+
+/**
+ * A CResult_RetryDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::outbound_payment::Retry 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_RetryDecodeErrorZ {
+   /**
+    * The contents of this CResult_RetryDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_RetryDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_RetryDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_RetryDecodeErrorZ;
+
 
 
 /**
@@ -1364,29 +1732,29 @@ typedef struct LDKCVec_APIErrorZ {
 /**
  * An enum which can either contain a crate::c_types::ThirtyTwoBytes or not
  */
-typedef enum LDKCOption_PaymentSecretZ_Tag {
+typedef enum LDKCOption_ThirtyTwoBytesZ_Tag {
    /**
-    * When we're in this state, this COption_PaymentSecretZ contains a crate::c_types::ThirtyTwoBytes
+    * When we're in this state, this COption_ThirtyTwoBytesZ contains a crate::c_types::ThirtyTwoBytes
     */
-   LDKCOption_PaymentSecretZ_Some,
+   LDKCOption_ThirtyTwoBytesZ_Some,
    /**
-    * When we're in this state, this COption_PaymentSecretZ contains nothing
+    * When we're in this state, this COption_ThirtyTwoBytesZ contains nothing
     */
-   LDKCOption_PaymentSecretZ_None,
+   LDKCOption_ThirtyTwoBytesZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_PaymentSecretZ_Sentinel,
-} LDKCOption_PaymentSecretZ_Tag;
+   LDKCOption_ThirtyTwoBytesZ_Sentinel,
+} LDKCOption_ThirtyTwoBytesZ_Tag;
 
-typedef struct LDKCOption_PaymentSecretZ {
-   LDKCOption_PaymentSecretZ_Tag tag;
+typedef struct LDKCOption_ThirtyTwoBytesZ {
+   LDKCOption_ThirtyTwoBytesZ_Tag tag;
    union {
       struct {
          struct LDKThirtyTwoBytes some;
       };
    };
-} LDKCOption_PaymentSecretZ;
+} LDKCOption_ThirtyTwoBytesZ;
 
 /**
  * An enum which can either contain a crate::c_types::derived::CVec_u8Z or not
@@ -1439,90 +1807,478 @@ typedef struct MUST_USE_STRUCT LDKRecipientOnionFields {
 } LDKRecipientOnionFields;
 
 /**
- * An error in decoding a message or struct.
+ * The contents of CResult_RecipientOnionFieldsDecodeErrorZ
  */
-typedef enum LDKDecodeError_Tag {
+typedef union LDKCResult_RecipientOnionFieldsDecodeErrorZPtr {
    /**
-    * A version byte specified something we don't know how to handle.
-    *
-    * Includes unknown realm byte in an onion hop data packet.
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   LDKDecodeError_UnknownVersion,
+   struct LDKRecipientOnionFields *result;
    /**
-    * Unknown feature mandating we fail to parse message (e.g., TLV with an even, unknown type)
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   LDKDecodeError_UnknownRequiredFeature,
+   struct LDKDecodeError *err;
+} LDKCResult_RecipientOnionFieldsDecodeErrorZPtr;
+
+/**
+ * A CResult_RecipientOnionFieldsDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::outbound_payment::RecipientOnionFields 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_RecipientOnionFieldsDecodeErrorZ {
    /**
-    * Value was invalid.
+    * The contents of this CResult_RecipientOnionFieldsDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_RecipientOnionFieldsDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_RecipientOnionFieldsDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_RecipientOnionFieldsDecodeErrorZ;
+
+/**
+ * A tuple of 2 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC2Tuple_u64CVec_u8ZZ {
+   /**
+    * The element at position 0
+    */
+   uint64_t a;
+   /**
+    * The element at position 1
+    */
+   struct LDKCVec_u8Z b;
+} LDKC2Tuple_u64CVec_u8ZZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u64CVec_u8ZZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C2Tuple_u64CVec_u8ZZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC2Tuple_u64CVec_u8ZZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C2Tuple_u64CVec_u8ZZZ;
+
+/**
+ * The contents of CResult_RecipientOnionFieldsNoneZ
+ */
+typedef union LDKCResult_RecipientOnionFieldsNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKRecipientOnionFields *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_RecipientOnionFieldsNoneZPtr;
+
+/**
+ * A CResult_RecipientOnionFieldsNoneZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::outbound_payment::RecipientOnionFields on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_RecipientOnionFieldsNoneZ {
+   /**
+    * The contents of this CResult_RecipientOnionFieldsNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_RecipientOnionFieldsNoneZPtr contents;
+   /**
+    * Whether this CResult_RecipientOnionFieldsNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_RecipientOnionFieldsNoneZ;
+
+
+
+/**
+ * A semantically valid [`Bolt12Invoice`] that hasn't been signed.
+ *
+ * # Serialization
+ *
+ * This is serialized as a TLV stream, which includes TLV records from the originating message. As
+ * such, it may include unknown, odd TLV records.
+ */
+typedef struct MUST_USE_STRUCT LDKUnsignedBolt12Invoice {
+   /**
+    * 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.
+    */
+   LDKnativeUnsignedBolt12Invoice *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;
+} LDKUnsignedBolt12Invoice;
+
+/**
+ * The contents of CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKUnsignedBolt12Invoice *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice::UnsignedBolt12Invoice on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ;
+
+
+
+/**
+ * A `Bolt12Invoice` is a payment request, typically corresponding to an [`Offer`] or a [`Refund`].
+ *
+ * An invoice may be sent in response to an [`InvoiceRequest`] in the case of an offer or sent
+ * directly after scanning a refund. It includes all the information needed to pay a recipient.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Refund`]: crate::offers::refund::Refund
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ */
+typedef struct MUST_USE_STRUCT LDKBolt12Invoice {
+   /**
+    * 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.
+    */
+   LDKnativeBolt12Invoice *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;
+} LDKBolt12Invoice;
+
+/**
+ * The contents of CResult_Bolt12InvoiceBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_Bolt12InvoiceBolt12SemanticErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKBolt12Invoice *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_Bolt12InvoiceBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_Bolt12InvoiceBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice::Bolt12Invoice on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_Bolt12InvoiceBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_Bolt12InvoiceBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_Bolt12InvoiceBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ;
+
+/**
+ * Represents a secp256k1 Schnorr signature serialized as two 32-byte numbers
+ */
+typedef struct LDKSchnorrSignature {
+   /**
+    * The bytes of the signature as two 32-byte numbers
+    */
+   uint8_t compact_form[64];
+} LDKSchnorrSignature;
+
+/**
+ * The contents of CResult_SchnorrSignatureNoneZ
+ */
+typedef union LDKCResult_SchnorrSignatureNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKSchnorrSignature *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_SchnorrSignatureNoneZPtr;
+
+/**
+ * A CResult_SchnorrSignatureNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::SchnorrSignature on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_SchnorrSignatureNoneZ {
+   /**
+    * The contents of this CResult_SchnorrSignatureNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_SchnorrSignatureNoneZPtr contents;
+   /**
+    * Whether this CResult_SchnorrSignatureNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_SchnorrSignatureNoneZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::ThirtyTwoBytess of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_ThirtyTwoBytesZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKThirtyTwoBytes *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_ThirtyTwoBytesZ;
+
+/**
+ * An enum which can either contain a crate::c_types::derived::CVec_ThirtyTwoBytesZ or not
+ */
+typedef enum LDKCOption_CVec_ThirtyTwoBytesZZ_Tag {
+   /**
+    * When we're in this state, this COption_CVec_ThirtyTwoBytesZZ contains a crate::c_types::derived::CVec_ThirtyTwoBytesZ
+    */
+   LDKCOption_CVec_ThirtyTwoBytesZZ_Some,
+   /**
+    * When we're in this state, this COption_CVec_ThirtyTwoBytesZZ contains nothing
+    */
+   LDKCOption_CVec_ThirtyTwoBytesZZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_CVec_ThirtyTwoBytesZZ_Sentinel,
+} LDKCOption_CVec_ThirtyTwoBytesZZ_Tag;
+
+typedef struct LDKCOption_CVec_ThirtyTwoBytesZZ {
+   LDKCOption_CVec_ThirtyTwoBytesZZ_Tag tag;
+   union {
+      struct {
+         struct LDKCVec_ThirtyTwoBytesZ some;
+      };
+   };
+} LDKCOption_CVec_ThirtyTwoBytesZZ;
+
+/**
+ * A 3-byte byte array.
+ */
+typedef struct LDKThreeBytes {
+   /**
+    * The three bytes
+    */
+   uint8_t data[3];
+} LDKThreeBytes;
+
+/**
+ * The minimum amount required for an item in an [`Offer`], denominated in either bitcoin or
+ * another currency.
+ */
+typedef enum LDKAmount_Tag {
+   /**
+    * An amount of bitcoin.
+    */
+   LDKAmount_Bitcoin,
+   /**
+    * An amount of currency specified using ISO 4712.
+    */
+   LDKAmount_Currency,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKAmount_Sentinel,
+} LDKAmount_Tag;
+
+typedef struct LDKAmount_LDKBitcoin_Body {
+   /**
+    * The amount in millisatoshi.
+    */
+   uint64_t amount_msats;
+} LDKAmount_LDKBitcoin_Body;
+
+typedef struct LDKAmount_LDKCurrency_Body {
+   /**
+    * The currency that the amount is denominated in.
+    */
+   struct LDKThreeBytes iso4217_code;
+   /**
+    * The amount in the currency unit adjusted by the ISO 4712 exponent (e.g., USD cents).
+    */
+   uint64_t amount;
+} LDKAmount_LDKCurrency_Body;
+
+typedef struct MUST_USE_STRUCT LDKAmount {
+   LDKAmount_Tag tag;
+   union {
+      LDKAmount_LDKBitcoin_Body bitcoin;
+      LDKAmount_LDKCurrency_Body currency;
+   };
+} LDKAmount;
+
+/**
+ * An enum which can either contain a crate::lightning::offers::offer::Amount or not
+ */
+typedef enum LDKCOption_AmountZ_Tag {
+   /**
+    * When we're in this state, this COption_AmountZ contains a crate::lightning::offers::offer::Amount
+    */
+   LDKCOption_AmountZ_Some,
+   /**
+    * When we're in this state, this COption_AmountZ contains nothing
+    */
+   LDKCOption_AmountZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_AmountZ_Sentinel,
+} LDKCOption_AmountZ_Tag;
+
+typedef struct LDKCOption_AmountZ {
+   LDKCOption_AmountZ_Tag tag;
+   union {
+      struct {
+         struct LDKAmount some;
+      };
+   };
+} LDKCOption_AmountZ;
+
+/**
+ * Quantity of items supported by an [`Offer`].
+ */
+typedef enum LDKQuantity_Tag {
+   /**
+    * Up to a specific number of items (inclusive). Use when more than one item can be requested
+    * but is limited (e.g., because of per customer or inventory limits).
     *
-    * For example, a byte which was supposed to be a bool was something other than a 0
-    * or 1, a public key/private key/signature was invalid, text wasn't UTF-8, TLV was
-    * syntactically incorrect, etc.
+    * May be used with `NonZeroU64::new(1)` but prefer to use [`Quantity::One`] if only one item
+    * is supported.
     */
-   LDKDecodeError_InvalidValue,
+   LDKQuantity_Bounded,
    /**
-    * The buffer to be read was too short.
+    * One or more items. Use when more than one item can be requested without any limit.
     */
-   LDKDecodeError_ShortRead,
+   LDKQuantity_Unbounded,
    /**
-    * A length descriptor in the packet didn't describe the later data correctly.
+    * Only one item. Use when only a single item can be requested.
     */
-   LDKDecodeError_BadLengthDescriptor,
+   LDKQuantity_One,
    /**
-    * Error from [`std::io`].
+    * Must be last for serialization purposes
     */
-   LDKDecodeError_Io,
+   LDKQuantity_Sentinel,
+} LDKQuantity_Tag;
+
+typedef struct MUST_USE_STRUCT LDKQuantity {
+   LDKQuantity_Tag tag;
+   union {
+      struct {
+         uint64_t bounded;
+      };
+   };
+} LDKQuantity;
+
+/**
+ * An enum which can either contain a crate::lightning::offers::offer::Quantity or not
+ */
+typedef enum LDKCOption_QuantityZ_Tag {
    /**
-    * The message included zlib-compressed values, which we don't support.
+    * When we're in this state, this COption_QuantityZ contains a crate::lightning::offers::offer::Quantity
     */
-   LDKDecodeError_UnsupportedCompression,
+   LDKCOption_QuantityZ_Some,
+   /**
+    * When we're in this state, this COption_QuantityZ contains nothing
+    */
+   LDKCOption_QuantityZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKDecodeError_Sentinel,
-} LDKDecodeError_Tag;
+   LDKCOption_QuantityZ_Sentinel,
+} LDKCOption_QuantityZ_Tag;
 
-typedef struct MUST_USE_STRUCT LDKDecodeError {
-   LDKDecodeError_Tag tag;
+typedef struct LDKCOption_QuantityZ {
+   LDKCOption_QuantityZ_Tag tag;
    union {
       struct {
-         enum LDKIOError io;
+         struct LDKQuantity some;
       };
    };
-} LDKDecodeError;
+} LDKCOption_QuantityZ;
 
 /**
- * The contents of CResult_RecipientOnionFieldsDecodeErrorZ
+ * The contents of CResult_ThirtyTwoBytesNoneZ
  */
-typedef union LDKCResult_RecipientOnionFieldsDecodeErrorZPtr {
+typedef union LDKCResult_ThirtyTwoBytesNoneZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKRecipientOnionFields *result;
+   struct LDKThirtyTwoBytes *result;
    /**
-    * A pointer to the contents in the error state.
-    * Reading from this pointer when `result_ok` is set is undefined.
+    * Note that this value is always NULL, as there are no contents in the Err variant
     */
-   struct LDKDecodeError *err;
-} LDKCResult_RecipientOnionFieldsDecodeErrorZPtr;
+   void *err;
+} LDKCResult_ThirtyTwoBytesNoneZPtr;
 
 /**
- * A CResult_RecipientOnionFieldsDecodeErrorZ represents the result of a fallible operation,
- * containing a crate::lightning::ln::outbound_payment::RecipientOnionFields on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * A CResult_ThirtyTwoBytesNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::ThirtyTwoBytes on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_RecipientOnionFieldsDecodeErrorZ {
+typedef struct LDKCResult_ThirtyTwoBytesNoneZ {
    /**
-    * The contents of this CResult_RecipientOnionFieldsDecodeErrorZ, accessible via either
+    * The contents of this CResult_ThirtyTwoBytesNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_RecipientOnionFieldsDecodeErrorZPtr contents;
+   union LDKCResult_ThirtyTwoBytesNoneZPtr contents;
    /**
-    * Whether this CResult_RecipientOnionFieldsDecodeErrorZ represents a success state.
+    * Whether this CResult_ThirtyTwoBytesNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_RecipientOnionFieldsDecodeErrorZ;
+} LDKCResult_ThirtyTwoBytesNoneZ;
 
 
 
@@ -1756,8 +2512,8 @@ typedef enum LDKSpendableOutputDescriptor_Tag {
     * To derive the delayed payment key which is used to sign this input, you must pass the
     * holder [`InMemorySigner::delayed_payment_base_key`] (i.e., the private key which corresponds to the
     * [`ChannelPublicKeys::delayed_payment_basepoint`] in [`ChannelSigner::pubkeys`]) and the provided
-    * [`DelayedPaymentOutputDescriptor::per_commitment_point`] to [`chan_utils::derive_private_key`]. The public key can be
-    * generated without the secret key using [`chan_utils::derive_public_key`] and only the
+    * [`DelayedPaymentOutputDescriptor::per_commitment_point`] to [`chan_utils::derive_private_key`]. The DelayedPaymentKey can be
+    * generated without the secret key using [`DelayedPaymentKey::from_basepoint`] and only the
     * [`ChannelPublicKeys::delayed_payment_basepoint`] which appears in [`ChannelSigner::pubkeys`].
     *
     * To derive the [`DelayedPaymentOutputDescriptor::revocation_pubkey`] provided here (which is
@@ -1765,7 +2521,7 @@ typedef enum LDKSpendableOutputDescriptor_Tag {
     * [`ChannelPublicKeys::revocation_basepoint`] (which appears in the call to
     * [`ChannelSigner::provide_channel_parameters`]) and the provided
     * [`DelayedPaymentOutputDescriptor::per_commitment_point`] to
-    * [`chan_utils::derive_public_revocation_key`].
+    * [`RevocationKey`].
     *
     * The witness script which is hashed and included in the output `script_pubkey` may be
     * regenerated by passing the [`DelayedPaymentOutputDescriptor::revocation_pubkey`] (derived
@@ -1775,15 +2531,23 @@ typedef enum LDKSpendableOutputDescriptor_Tag {
     */
    LDKSpendableOutputDescriptor_DelayedPaymentOutput,
    /**
-    * An output to a P2WPKH, spendable exclusively by our payment key (i.e., the private key
-    * which corresponds to the `payment_point` in [`ChannelSigner::pubkeys`]). The witness
-    * in the spending input is, thus, simply:
+    * An output spendable exclusively by our payment key (i.e., the private key that corresponds
+    * to the `payment_point` in [`ChannelSigner::pubkeys`]). The output type depends on the
+    * channel type negotiated.
+    *
+    * On an anchor outputs channel, the witness in the spending input is:
+    * ```bitcoin
+    * <BIP 143 signature> <witness script>
+    * ```
+    *
+    * Otherwise, it is:
     * ```bitcoin
     * <BIP 143 signature> <payment key>
     * ```
     *
     * These are generally the result of our counterparty having broadcast the current state,
-    * allowing us to claim the non-HTLC-encumbered outputs immediately.
+    * allowing us to claim the non-HTLC-encumbered outputs immediately, or after one confirmation
+    * in the case of anchor outputs channels.
     */
    LDKSpendableOutputDescriptor_StaticPaymentOutput,
    /**
@@ -1801,6 +2565,19 @@ typedef struct LDKSpendableOutputDescriptor_LDKStaticOutput_Body {
     * The output which is referenced by the given outpoint.
     */
    struct LDKTxOut output;
+   /**
+    * The `channel_keys_id` for the channel which this output came from.
+    *
+    * For channels which were generated on LDK 0.0.119 or later, this is the value which was
+    * passed to the [`SignerProvider::get_destination_script`] call which provided this
+    * output script.
+    *
+    * For channels which were generated prior to LDK 0.0.119, no such argument existed,
+    * however this field may still be filled in if such data is available.
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKThirtyTwoBytes channel_keys_id;
 } LDKSpendableOutputDescriptor_LDKStaticOutput_Body;
 
 typedef struct MUST_USE_STRUCT LDKSpendableOutputDescriptor {
@@ -1884,34 +2661,34 @@ typedef struct LDKCVec_TxOutZ {
 /**
  * An enum which can either contain a u32 or not
  */
-typedef enum LDKCOption_PackedLockTimeZ_Tag {
+typedef enum LDKCOption_u32Z_Tag {
    /**
-    * When we're in this state, this COption_PackedLockTimeZ contains a u32
+    * When we're in this state, this COption_u32Z contains a u32
     */
-   LDKCOption_PackedLockTimeZ_Some,
+   LDKCOption_u32Z_Some,
    /**
-    * When we're in this state, this COption_PackedLockTimeZ contains nothing
+    * When we're in this state, this COption_u32Z contains nothing
     */
-   LDKCOption_PackedLockTimeZ_None,
+   LDKCOption_u32Z_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_PackedLockTimeZ_Sentinel,
-} LDKCOption_PackedLockTimeZ_Tag;
+   LDKCOption_u32Z_Sentinel,
+} LDKCOption_u32Z_Tag;
 
-typedef struct LDKCOption_PackedLockTimeZ {
-   LDKCOption_PackedLockTimeZ_Tag tag;
+typedef struct LDKCOption_u32Z {
+   LDKCOption_u32Z_Tag tag;
    union {
       struct {
          uint32_t some;
       };
    };
-} LDKCOption_PackedLockTimeZ;
+} LDKCOption_u32Z;
 
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_PartiallySignedTransactionusizeZ {
+typedef struct LDKC2Tuple_CVec_u8Zu64Z {
    /**
     * The element at position 0
     */
@@ -1919,191 +2696,177 @@ typedef struct LDKC2Tuple_PartiallySignedTransactionusizeZ {
    /**
     * The element at position 1
     */
-   uintptr_t b;
-} LDKC2Tuple_PartiallySignedTransactionusizeZ;
+   uint64_t b;
+} LDKC2Tuple_CVec_u8Zu64Z;
 
 /**
- * The contents of CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ
+ * The contents of CResult_C2Tuple_CVec_u8Zu64ZNoneZ
  */
-typedef union LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZPtr {
+typedef union LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKC2Tuple_PartiallySignedTransactionusizeZ *result;
+   struct LDKC2Tuple_CVec_u8Zu64Z *result;
    /**
     * Note that this value is always NULL, as there are no contents in the Err variant
     */
    void *err;
-} LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZPtr;
+} LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZPtr;
 
 /**
- * A CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::C2Tuple_PartiallySignedTransactionusizeZ on success and a () on failure.
+ * A CResult_C2Tuple_CVec_u8Zu64ZNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_CVec_u8Zu64Z on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ {
+typedef struct LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ {
    /**
-    * The contents of this CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ, accessible via either
+    * The contents of this CResult_C2Tuple_CVec_u8Zu64ZNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZPtr contents;
+   union LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZPtr contents;
    /**
-    * Whether this CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ represents a success state.
+    * Whether this CResult_C2Tuple_CVec_u8Zu64ZNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ;
+} LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ;
+
+
 
 /**
- * A dynamically-allocated array of crate::c_types::ThirtyTwoBytess of arbitrary size.
- * This corresponds to std::vector in C++
+ * The parameters required to derive a channel signer via [`SignerProvider`].
  */
-typedef struct LDKCVec_PaymentPreimageZ {
+typedef struct MUST_USE_STRUCT LDKChannelDerivationParameters {
    /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    * 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.
     */
-   struct LDKThirtyTwoBytes *data;
+   LDKnativeChannelDerivationParameters *inner;
    /**
-    * The number of elements pointed to by `data`.
+    * 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.
     */
-   uintptr_t datalen;
-} LDKCVec_PaymentPreimageZ;
+   bool is_owned;
+} LDKChannelDerivationParameters;
 
 /**
- * The contents of CResult_NoneNoneZ
+ * The contents of CResult_ChannelDerivationParametersDecodeErrorZ
  */
-typedef union LDKCResult_NoneNoneZPtr {
+typedef union LDKCResult_ChannelDerivationParametersDecodeErrorZPtr {
    /**
-    * Note that this value is always NULL, as there are no contents in the OK variant
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   void *result;
+   struct LDKChannelDerivationParameters *result;
    /**
-    * Note that this value is always NULL, as there are no contents in the Err variant
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   void *err;
-} LDKCResult_NoneNoneZPtr;
+   struct LDKDecodeError *err;
+} LDKCResult_ChannelDerivationParametersDecodeErrorZPtr;
 
 /**
- * A CResult_NoneNoneZ represents the result of a fallible operation,
- * containing a () on success and a () on failure.
+ * A CResult_ChannelDerivationParametersDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::sign::ChannelDerivationParameters 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_NoneNoneZ {
+typedef struct LDKCResult_ChannelDerivationParametersDecodeErrorZ {
    /**
-    * The contents of this CResult_NoneNoneZ, accessible via either
+    * The contents of this CResult_ChannelDerivationParametersDecodeErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_NoneNoneZPtr contents;
+   union LDKCResult_ChannelDerivationParametersDecodeErrorZPtr contents;
    /**
-    * Whether this CResult_NoneNoneZ represents a success state.
+    * Whether this CResult_ChannelDerivationParametersDecodeErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_NoneNoneZ;
+} LDKCResult_ChannelDerivationParametersDecodeErrorZ;
+
+
 
 /**
- * Represents a secp256k1 signature serialized as two 32-byte numbers
- */
-typedef struct LDKSignature {
-   /**
-    * The bytes of the signature in "compact" form
-    */
-   uint8_t compact_form[64];
-} LDKSignature;
-
-/**
- * A dynamically-allocated array of crate::c_types::Signatures of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_SignatureZ {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   struct LDKSignature *data;
-   /**
-    * The number of elements pointed to by `data`.
-    */
-   uintptr_t datalen;
-} LDKCVec_SignatureZ;
-
-/**
- * A tuple of 2 elements. See the individual fields for the types contained.
+ * A descriptor used to sign for a commitment transaction's HTLC output.
  */
-typedef struct LDKC2Tuple_SignatureCVec_SignatureZZ {
+typedef struct MUST_USE_STRUCT LDKHTLCDescriptor {
    /**
-    * The element at position 0
+    * 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.
     */
-   struct LDKSignature a;
+   LDKnativeHTLCDescriptor *inner;
    /**
-    * The element at position 1
+    * 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.
     */
-   struct LDKCVec_SignatureZ b;
-} LDKC2Tuple_SignatureCVec_SignatureZZ;
+   bool is_owned;
+} LDKHTLCDescriptor;
 
 /**
- * The contents of CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ
+ * The contents of CResult_HTLCDescriptorDecodeErrorZ
  */
-typedef union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr {
+typedef union LDKCResult_HTLCDescriptorDecodeErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKC2Tuple_SignatureCVec_SignatureZZ *result;
+   struct LDKHTLCDescriptor *result;
    /**
-    * Note that this value is always NULL, as there are no contents in the Err variant
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   void *err;
-} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr;
+   struct LDKDecodeError *err;
+} LDKCResult_HTLCDescriptorDecodeErrorZPtr;
 
 /**
- * A CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ on success and a () on failure.
+ * A CResult_HTLCDescriptorDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::sign::HTLCDescriptor 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_C2Tuple_SignatureCVec_SignatureZZNoneZ {
+typedef struct LDKCResult_HTLCDescriptorDecodeErrorZ {
    /**
-    * The contents of this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ, accessible via either
+    * The contents of this CResult_HTLCDescriptorDecodeErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr contents;
+   union LDKCResult_HTLCDescriptorDecodeErrorZPtr contents;
    /**
-    * Whether this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents a success state.
+    * Whether this CResult_HTLCDescriptorDecodeErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ;
+} LDKCResult_HTLCDescriptorDecodeErrorZ;
 
 /**
- * The contents of CResult_SignatureNoneZ
+ * The contents of CResult_NoneNoneZ
  */
-typedef union LDKCResult_SignatureNoneZPtr {
+typedef union LDKCResult_NoneNoneZPtr {
    /**
-    * A pointer to the contents in the success state.
-    * Reading from this pointer when `result_ok` is not set is undefined.
+    * Note that this value is always NULL, as there are no contents in the OK variant
     */
-   struct LDKSignature *result;
+   void *result;
    /**
     * Note that this value is always NULL, as there are no contents in the Err variant
     */
    void *err;
-} LDKCResult_SignatureNoneZPtr;
+} LDKCResult_NoneNoneZPtr;
 
 /**
- * A CResult_SignatureNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::Signature on success and a () on failure.
+ * A CResult_NoneNoneZ represents the result of a fallible operation,
+ * containing a () on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_SignatureNoneZ {
+typedef struct LDKCResult_NoneNoneZ {
    /**
-    * The contents of this CResult_SignatureNoneZ, accessible via either
+    * The contents of this CResult_NoneNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_SignatureNoneZPtr contents;
+   union LDKCResult_NoneNoneZPtr contents;
    /**
-    * Whether this CResult_SignatureNoneZ represents a success state.
+    * Whether this CResult_NoneNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_SignatureNoneZ;
+} LDKCResult_NoneNoneZ;
 
 /**
  * Represents a valid secp256k1 public key serialized in "compressed form" as a 33 byte array.
@@ -2150,61 +2913,29 @@ typedef struct LDKCResult_PublicKeyNoneZ {
 /**
  * An enum which can either contain a crate::c_types::BigEndianScalar or not
  */
-typedef enum LDKCOption_ScalarZ_Tag {
+typedef enum LDKCOption_BigEndianScalarZ_Tag {
    /**
-    * When we're in this state, this COption_ScalarZ contains a crate::c_types::BigEndianScalar
+    * When we're in this state, this COption_BigEndianScalarZ contains a crate::c_types::BigEndianScalar
     */
-   LDKCOption_ScalarZ_Some,
+   LDKCOption_BigEndianScalarZ_Some,
    /**
-    * When we're in this state, this COption_ScalarZ contains nothing
+    * When we're in this state, this COption_BigEndianScalarZ contains nothing
     */
-   LDKCOption_ScalarZ_None,
+   LDKCOption_BigEndianScalarZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_ScalarZ_Sentinel,
-} LDKCOption_ScalarZ_Tag;
+   LDKCOption_BigEndianScalarZ_Sentinel,
+} LDKCOption_BigEndianScalarZ_Tag;
 
-typedef struct LDKCOption_ScalarZ {
-   LDKCOption_ScalarZ_Tag tag;
+typedef struct LDKCOption_BigEndianScalarZ {
+   LDKCOption_BigEndianScalarZ_Tag tag;
    union {
       struct {
          struct LDKBigEndianScalar some;
       };
    };
-} LDKCOption_ScalarZ;
-
-/**
- * The contents of CResult_SharedSecretNoneZ
- */
-typedef union LDKCResult_SharedSecretNoneZPtr {
-   /**
-    * A pointer to the contents in the success state.
-    * Reading from this pointer when `result_ok` is not set is undefined.
-    */
-   struct LDKThirtyTwoBytes *result;
-   /**
-    * Note that this value is always NULL, as there are no contents in the Err variant
-    */
-   void *err;
-} LDKCResult_SharedSecretNoneZPtr;
-
-/**
- * A CResult_SharedSecretNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::ThirtyTwoBytes on success and a () on failure.
- * `result_ok` indicates the overall state, and the contents are provided via `contents`.
- */
-typedef struct LDKCResult_SharedSecretNoneZ {
-   /**
-    * The contents of this CResult_SharedSecretNoneZ, accessible via either
-    * `err` or `result` depending on the state of `result_ok`.
-    */
-   union LDKCResult_SharedSecretNoneZPtr contents;
-   /**
-    * Whether this CResult_SharedSecretNoneZ represents a success state.
-    */
-   bool result_ok;
-} LDKCResult_SharedSecretNoneZ;
+} LDKCOption_BigEndianScalarZ;
 
 /**
  * Integer in the range `0..32`
@@ -2273,6 +3004,142 @@ typedef struct LDKCResult_RecoverableSignatureNoneZ {
    bool result_ok;
 } LDKCResult_RecoverableSignatureNoneZ;
 
+/**
+ * Represents a secp256k1 ECDSA signature serialized as two 32-byte numbers
+ */
+typedef struct LDKECDSASignature {
+   /**
+    * The bytes of the signature in "compact" form
+    */
+   uint8_t compact_form[64];
+} LDKECDSASignature;
+
+/**
+ * The contents of CResult_ECDSASignatureNoneZ
+ */
+typedef union LDKCResult_ECDSASignatureNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKECDSASignature *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_ECDSASignatureNoneZPtr;
+
+/**
+ * A CResult_ECDSASignatureNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::ECDSASignature on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_ECDSASignatureNoneZ {
+   /**
+    * The contents of this CResult_ECDSASignatureNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_ECDSASignatureNoneZPtr contents;
+   /**
+    * Whether this CResult_ECDSASignatureNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_ECDSASignatureNoneZ;
+
+/**
+ * The contents of CResult_TransactionNoneZ
+ */
+typedef union LDKCResult_TransactionNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKTransaction *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_TransactionNoneZPtr;
+
+/**
+ * A CResult_TransactionNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::Transaction on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_TransactionNoneZ {
+   /**
+    * The contents of this CResult_TransactionNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_TransactionNoneZPtr contents;
+   /**
+    * Whether this CResult_TransactionNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_TransactionNoneZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::ECDSASignatures of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_ECDSASignatureZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKECDSASignature *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_ECDSASignatureZ;
+
+/**
+ * A tuple of 2 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ {
+   /**
+    * The element at position 0
+    */
+   struct LDKECDSASignature a;
+   /**
+    * The element at position 1
+    */
+   struct LDKCVec_ECDSASignatureZ b;
+} LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ;
+
+/**
+ * The contents of CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ
+ */
+typedef union LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZPtr;
+
+/**
+ * A CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ {
+   /**
+    * The contents of this CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZPtr contents;
+   /**
+    * Whether this CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ;
+
 
 
 /**
@@ -2342,26 +3209,6 @@ typedef struct MUST_USE_STRUCT LDKHTLCOutputInCommitment {
 
 
 
-/**
- * A descriptor used to sign for a commitment transaction's HTLC output.
- */
-typedef struct MUST_USE_STRUCT LDKHTLCDescriptor {
-   /**
-    * 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.
-    */
-   LDKnativeHTLCDescriptor *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;
-} LDKHTLCDescriptor;
-
-
-
 /**
  * This class tracks the per-transaction information needed to build a closing transaction and will
  * actually build it and sign.
@@ -2485,14 +3332,21 @@ typedef struct LDKChannelSigner {
     * Policy checks should be implemented in this function, including checking the amount
     * sent to us and checking the HTLCs.
     *
-    * The preimages of outgoing HTLCs that were fulfilled since the last commitment are provided.
+    * The preimages of outbound HTLCs that were fulfilled since the last commitment are provided.
     * A validating signer should ensure that an HTLC output is removed only when the matching
     * preimage is provided, or when the value to holder is restored.
     *
     * Note that all the relevant preimages will be provided, but there may also be additional
     * irrelevant or duplicate preimages.
     */
-   struct LDKCResult_NoneNoneZ (*validate_holder_commitment)(const void *this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx, struct LDKCVec_PaymentPreimageZ preimages);
+   struct LDKCResult_NoneNoneZ (*validate_holder_commitment)(const void *this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx, struct LDKCVec_ThirtyTwoBytesZ outbound_htlc_preimages);
+   /**
+    * Validate the counterparty's revocation.
+    *
+    * This is required in order for the signer to make sure that the state has moved
+    * forward and it is safe to sign the next counterparty commitment.
+    */
+   struct LDKCResult_NoneNoneZ (*validate_counterparty_revocation)(const void *this_arg, uint64_t idx, const uint8_t (*secret)[32]);
    /**
     * Returns the holder's channel public keys and basepoints.
     */
@@ -2551,39 +3405,34 @@ typedef struct LDKEcdsaChannelSigner {
     * Policy checks should be implemented in this function, including checking the amount
     * sent to us and checking the HTLCs.
     *
-    * The preimages of outgoing HTLCs that were fulfilled since the last commitment are provided.
-    * A validating signer should ensure that an HTLC output is removed only when the matching
-    * preimage is provided, or when the value to holder is restored.
+    * The preimages of outbound and inbound HTLCs that were fulfilled since the last commitment
+    * are provided. A validating signer should ensure that an outbound HTLC output is removed
+    * only when the matching preimage is provided and after the corresponding inbound HTLC has
+    * been removed for forwarded payments.
     *
     * Note that all the relevant preimages will be provided, but there may also be additional
     * irrelevant or duplicate preimages.
     */
-   struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_counterparty_commitment)(const void *this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx, struct LDKCVec_PaymentPreimageZ preimages);
+   struct LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ (*sign_counterparty_commitment)(const void *this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx, struct LDKCVec_ThirtyTwoBytesZ inbound_htlc_preimages, struct LDKCVec_ThirtyTwoBytesZ outbound_htlc_preimages);
    /**
-    * Validate the counterparty's revocation.
-    *
-    * This is required in order for the signer to make sure that the state has moved
-    * forward and it is safe to sign the next counterparty commitment.
-    */
-   struct LDKCResult_NoneNoneZ (*validate_counterparty_revocation)(const void *this_arg, uint64_t idx, const uint8_t (*secret)[32]);
-   /**
-    * Creates a signature for a holder's commitment transaction and its claiming HTLC transactions.
+    * Creates a signature for a holder's commitment transaction.
     *
     * This will be called
     * - with a non-revoked `commitment_tx`.
     * - with the latest `commitment_tx` when we initiate a force-close.
-    * - with the previous `commitment_tx`, just to get claiming HTLC
-    *   signatures, if we are reacting to a [`ChannelMonitor`]
-    *   [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
-    *   that decided to broadcast before it had been updated to the latest `commitment_tx`.
     *
     * This may be called multiple times for the same transaction.
     *
     * An external signer implementation should check that the commitment has not been revoked.
     *
-    * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+    * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+    * signature and should be retried later. Once the signer is ready to provide a signature after
+    * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+    * monitor.
+    *
+    * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
     */
-   struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_holder_commitment_and_htlcs)(const void *this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_holder_commitment)(const void *this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx);
    /**
     * Create a signature for the given input in a transaction spending an HTLC transaction output
     * or a commitment transaction `to_local` output when our counterparty broadcasts an old state.
@@ -2599,8 +3448,15 @@ typedef struct LDKEcdsaChannelSigner {
     * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does
     * not allow the spending of any funds by itself (you need our holder `revocation_secret` to do
     * so).
+    *
+    * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+    * signature and should be retried later. Once the signer is ready to provide a signature after
+    * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+    * monitor.
+    *
+    * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
     */
-   struct LDKCResult_SignatureNoneZ (*sign_justice_revoked_output)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_justice_revoked_output)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]);
    /**
     * Create a signature for the given input in a transaction spending a commitment transaction
     * HTLC output when our counterparty broadcasts an old state.
@@ -2620,18 +3476,34 @@ typedef struct LDKEcdsaChannelSigner {
     *
     * `htlc` holds HTLC elements (hash, timelock), thus changing the format of the witness script
     * (which is committed to in the BIP 143 signatures).
+    *
+    * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+    * signature and should be retried later. Once the signer is ready to provide a signature after
+    * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+    * monitor.
+    *
+    * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
     */
-   struct LDKCResult_SignatureNoneZ (*sign_justice_revoked_htlc)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_justice_revoked_htlc)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc);
    /**
     * Computes the signature for a commitment transaction's HTLC output used as an input within
     * `htlc_tx`, which spends the commitment transaction at index `input`. The signature returned
-    * must be be computed using [`EcdsaSighashType::All`]. Note that this should only be used to
-    * sign HTLC transactions from channels supporting anchor outputs after all additional
-    * inputs/outputs have been added to the transaction.
+    * must be be computed using [`EcdsaSighashType::All`].
+    *
+    * Note that this may be called for HTLCs in the penultimate commitment transaction if a
+    * [`ChannelMonitor`] [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
+    * broadcasts it before receiving the update for the latest commitment transaction.
     *
-    * [`EcdsaSighashType::All`]: bitcoin::blockdata::transaction::EcdsaSighashType::All
+    * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+    * signature and should be retried later. Once the signer is ready to provide a signature after
+    * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+    * monitor.
+    *
+    * [`EcdsaSighashType::All`]: bitcoin::sighash::EcdsaSighashType::All
+    * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+    * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
     */
-   struct LDKCResult_SignatureNoneZ (*sign_holder_htlc_transaction)(const void *this_arg, struct LDKTransaction htlc_tx, uintptr_t input, const struct LDKHTLCDescriptor *NONNULL_PTR htlc_descriptor);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_holder_htlc_transaction)(const void *this_arg, struct LDKTransaction htlc_tx, uintptr_t input, const struct LDKHTLCDescriptor *NONNULL_PTR htlc_descriptor);
    /**
     * Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment
     * transaction, either offered or received.
@@ -2650,20 +3522,34 @@ typedef struct LDKEcdsaChannelSigner {
     * detected onchain. It has been generated by our counterparty and is used to derive
     * channel state keys, which are then included in the witness script and committed to in the
     * BIP 143 signature.
+    *
+    * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+    * signature and should be retried later. Once the signer is ready to provide a signature after
+    * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+    * monitor.
+    *
+    * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
     */
-   struct LDKCResult_SignatureNoneZ (*sign_counterparty_htlc_transaction)(const void *this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_counterparty_htlc_transaction)(const void *this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc);
    /**
     * Create a signature for a (proposed) closing transaction.
     *
     * Note that, due to rounding, there may be one \"missing\" satoshi, and either party may have
     * chosen to forgo their output as dust.
     */
-   struct LDKCResult_SignatureNoneZ (*sign_closing_transaction)(const void *this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_closing_transaction)(const void *this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx);
    /**
     * Computes the signature for a commitment transaction's anchor output used as an
     * input within `anchor_tx`, which spends the commitment transaction, at index `input`.
+    *
+    * An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
+    * signature and should be retried later. Once the signer is ready to provide a signature after
+    * previously returning an `Err`, [`ChannelMonitor::signer_unblocked`] must be called on its
+    * monitor.
+    *
+    * [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
     */
-   struct LDKCResult_SignatureNoneZ (*sign_holder_anchor_input)(const void *this_arg, struct LDKTransaction anchor_tx, uintptr_t input);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_holder_anchor_input)(const void *this_arg, struct LDKTransaction anchor_tx, uintptr_t input);
    /**
     * Signs a channel announcement message with our funding key proving it comes from one of the
     * channel participants.
@@ -2674,8 +3560,10 @@ typedef struct LDKEcdsaChannelSigner {
     * Note that if this fails or is rejected, the channel will not be publicly announced and
     * our counterparty may (though likely will not) close the channel on us for violating the
     * protocol.
+    *
+    * [`NodeSigner::sign_gossip_message`]: crate::sign::NodeSigner::sign_gossip_message
     */
-   struct LDKCResult_SignatureNoneZ (*sign_channel_announcement_with_funding_key)(const void *this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_channel_announcement_with_funding_key)(const void *this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg);
    /**
     * Implementation of ChannelSigner for this object.
     */
@@ -2710,6 +3598,12 @@ typedef struct LDKWriteableEcdsaChannelSigner {
     * Serialize the object into a byte array
     */
    struct LDKCVec_u8Z (*write)(const void *this_arg);
+   /**
+    * Called, if set, after this WriteableEcdsaChannelSigner has been cloned into a duplicate object.
+    * The new WriteableEcdsaChannelSigner is provided, and should be mutated as needed to perform a
+    * deep copy of the object pointed to by this_arg or avoid any double-freeing.
+    */
+   void (*cloned)(struct LDKWriteableEcdsaChannelSigner *NONNULL_PTR new_WriteableEcdsaChannelSigner);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -2735,7 +3629,7 @@ typedef union LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZPtr {
 
 /**
  * A CResult_WriteableEcdsaChannelSignerDecodeErrorZ represents the result of a fallible operation,
- * containing a crate::lightning::sign::WriteableEcdsaChannelSigner on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * containing a crate::lightning::sign::ecdsa::WriteableEcdsaChannelSigner 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_WriteableEcdsaChannelSignerDecodeErrorZ {
@@ -2751,9 +3645,9 @@ typedef struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ {
 } LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ;
 
 /**
- * The contents of CResult_ScriptNoneZ
+ * The contents of CResult_CVec_u8ZNoneZ
  */
-typedef union LDKCResult_ScriptNoneZPtr {
+typedef union LDKCResult_CVec_u8ZNoneZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
@@ -2763,24 +3657,24 @@ typedef union LDKCResult_ScriptNoneZPtr {
     * Note that this value is always NULL, as there are no contents in the Err variant
     */
    void *err;
-} LDKCResult_ScriptNoneZPtr;
+} LDKCResult_CVec_u8ZNoneZPtr;
 
 /**
- * A CResult_ScriptNoneZ represents the result of a fallible operation,
+ * A CResult_CVec_u8ZNoneZ represents the result of a fallible operation,
  * containing a crate::c_types::derived::CVec_u8Z on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_ScriptNoneZ {
+typedef struct LDKCResult_CVec_u8ZNoneZ {
    /**
-    * The contents of this CResult_ScriptNoneZ, accessible via either
+    * The contents of this CResult_CVec_u8ZNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_ScriptNoneZPtr contents;
+   union LDKCResult_CVec_u8ZNoneZPtr contents;
    /**
-    * Whether this CResult_ScriptNoneZ represents a success state.
+    * Whether this CResult_CVec_u8ZNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_ScriptNoneZ;
+} LDKCResult_CVec_u8ZNoneZ;
 
 /**
  * The contents of CResult_ShutdownScriptNoneZ
@@ -2815,52 +3709,90 @@ typedef struct LDKCResult_ShutdownScriptNoneZ {
 } LDKCResult_ShutdownScriptNoneZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::CVec_u8Zs of arbitrary size.
- * This corresponds to std::vector in C++
+ * An enum which can either contain a u16 or not
  */
-typedef struct LDKCVec_CVec_u8ZZ {
+typedef enum LDKCOption_u16Z_Tag {
    /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    * When we're in this state, this COption_u16Z contains a u16
     */
-   struct LDKCVec_u8Z *data;
+   LDKCOption_u16Z_Some,
    /**
-    * The number of elements pointed to by `data`.
+    * When we're in this state, this COption_u16Z contains nothing
     */
-   uintptr_t datalen;
-} LDKCVec_CVec_u8ZZ;
+   LDKCOption_u16Z_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_u16Z_Sentinel,
+} LDKCOption_u16Z_Tag;
+
+typedef struct LDKCOption_u16Z {
+   LDKCOption_u16Z_Tag tag;
+   union {
+      struct {
+         uint16_t some;
+      };
+   };
+} LDKCOption_u16Z;
+
+/**
+ * An enum which can either contain a bool or not
+ */
+typedef enum LDKCOption_boolZ_Tag {
+   /**
+    * When we're in this state, this COption_boolZ contains a bool
+    */
+   LDKCOption_boolZ_Some,
+   /**
+    * When we're in this state, this COption_boolZ contains nothing
+    */
+   LDKCOption_boolZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_boolZ_Sentinel,
+} LDKCOption_boolZ_Tag;
+
+typedef struct LDKCOption_boolZ {
+   LDKCOption_boolZ_Tag tag;
+   union {
+      struct {
+         bool some;
+      };
+   };
+} LDKCOption_boolZ;
 
 /**
- * The contents of CResult_CVec_CVec_u8ZZNoneZ
+ * The contents of CResult_WitnessNoneZ
  */
-typedef union LDKCResult_CVec_CVec_u8ZZNoneZPtr {
+typedef union LDKCResult_WitnessNoneZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKCVec_CVec_u8ZZ *result;
+   struct LDKWitness *result;
    /**
     * Note that this value is always NULL, as there are no contents in the Err variant
     */
    void *err;
-} LDKCResult_CVec_CVec_u8ZZNoneZPtr;
+} LDKCResult_WitnessNoneZPtr;
 
 /**
- * A CResult_CVec_CVec_u8ZZNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::CVec_CVec_u8ZZ on success and a () on failure.
+ * A CResult_WitnessNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::Witness on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_CVec_CVec_u8ZZNoneZ {
+typedef struct LDKCResult_WitnessNoneZ {
    /**
-    * The contents of this CResult_CVec_CVec_u8ZZNoneZ, accessible via either
+    * The contents of this CResult_WitnessNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_CVec_CVec_u8ZZNoneZPtr contents;
+   union LDKCResult_WitnessNoneZPtr contents;
    /**
-    * Whether this CResult_CVec_CVec_u8ZZNoneZ represents a success state.
+    * Whether this CResult_WitnessNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_CVec_CVec_u8ZZNoneZ;
+} LDKCResult_WitnessNoneZ;
 
 
 
@@ -2918,94 +3850,184 @@ typedef struct LDKCResult_InMemorySignerDecodeErrorZ {
    bool result_ok;
 } LDKCResult_InMemorySignerDecodeErrorZ;
 
+
+
 /**
- * The contents of CResult_PartiallySignedTransactionNoneZ
+ * A [`CandidateRouteHop::FirstHop`] entry.
  */
-typedef union LDKCResult_PartiallySignedTransactionNoneZPtr {
+typedef struct MUST_USE_STRUCT LDKFirstHopCandidate {
    /**
-    * A pointer to the contents in the success state.
-    * Reading from this pointer when `result_ok` is not set is undefined.
+    * 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.
     */
-   struct LDKCVec_u8Z *result;
+   LDKnativeFirstHopCandidate *inner;
    /**
-    * Note that this value is always NULL, as there are no contents in the Err variant
+    * 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.
     */
-   void *err;
-} LDKCResult_PartiallySignedTransactionNoneZPtr;
+   bool is_owned;
+} LDKFirstHopCandidate;
+
+
 
 /**
- * A CResult_PartiallySignedTransactionNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::CVec_u8Z on success and a () on failure.
- * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ * A [`CandidateRouteHop::PublicHop`] entry.
  */
-typedef struct LDKCResult_PartiallySignedTransactionNoneZ {
+typedef struct MUST_USE_STRUCT LDKPublicHopCandidate {
    /**
-    * The contents of this CResult_PartiallySignedTransactionNoneZ, accessible via either
-    * `err` or `result` depending on the state of `result_ok`.
+    * 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.
     */
-   union LDKCResult_PartiallySignedTransactionNoneZPtr contents;
+   LDKnativePublicHopCandidate *inner;
    /**
-    * Whether this CResult_PartiallySignedTransactionNoneZ represents a success state.
+    * 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 result_ok;
-} LDKCResult_PartiallySignedTransactionNoneZ;
+   bool is_owned;
+} LDKPublicHopCandidate;
+
+
 
 /**
- * The contents of CResult_TransactionNoneZ
+ * A [`CandidateRouteHop::PrivateHop`] entry.
  */
-typedef union LDKCResult_TransactionNoneZPtr {
+typedef struct MUST_USE_STRUCT LDKPrivateHopCandidate {
    /**
-    * A pointer to the contents in the success state.
-    * Reading from this pointer when `result_ok` is not set is undefined.
+    * 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.
     */
-   struct LDKTransaction *result;
+   LDKnativePrivateHopCandidate *inner;
    /**
-    * Note that this value is always NULL, as there are no contents in the Err variant
+    * 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.
     */
-   void *err;
-} LDKCResult_TransactionNoneZPtr;
+   bool is_owned;
+} LDKPrivateHopCandidate;
+
+
 
 /**
- * A CResult_TransactionNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::Transaction on success and a () on failure.
- * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ * A [`CandidateRouteHop::Blinded`] entry.
  */
-typedef struct LDKCResult_TransactionNoneZ {
+typedef struct MUST_USE_STRUCT LDKBlindedPathCandidate {
    /**
-    * The contents of this CResult_TransactionNoneZ, accessible via either
-    * `err` or `result` depending on the state of `result_ok`.
+    * 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.
     */
-   union LDKCResult_TransactionNoneZPtr contents;
+   LDKnativeBlindedPathCandidate *inner;
    /**
-    * Whether this CResult_TransactionNoneZ represents a success state.
+    * 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 result_ok;
-} LDKCResult_TransactionNoneZ;
+   bool is_owned;
+} LDKBlindedPathCandidate;
 
 
 
 /**
- * Represents the compressed public key of a node
+ * A [`CandidateRouteHop::OneHopBlinded`] entry.
  */
-typedef struct MUST_USE_STRUCT LDKNodeId {
+typedef struct MUST_USE_STRUCT LDKOneHopBlindedPathCandidate {
    /**
     * 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.
     */
-   LDKnativeNodeId *inner;
+   LDKnativeOneHopBlindedPathCandidate *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;
-} LDKNodeId;
+} LDKOneHopBlindedPathCandidate;
+
+/**
+ * A wrapper around the various hop representations.
+ *
+ * Can be used to examine the properties of a hop,
+ * potentially to decide whether to include it in a route.
+ */
+typedef enum LDKCandidateRouteHop_Tag {
+   /**
+    * A hop from the payer, where the outbound liquidity is known.
+    */
+   LDKCandidateRouteHop_FirstHop,
+   /**
+    * A hop found in the [`ReadOnlyNetworkGraph`].
+    */
+   LDKCandidateRouteHop_PublicHop,
+   /**
+    * A private hop communicated by the payee, generally via a BOLT 11 invoice.
+    *
+    * Because BOLT 11 route hints can take multiple hops to get to the destination, this may not
+    * terminate at the payee.
+    */
+   LDKCandidateRouteHop_PrivateHop,
+   /**
+    * A blinded path which starts with an introduction point and ultimately terminates with the
+    * payee.
+    *
+    * Because we don't know the payee's identity, [`CandidateRouteHop::target`] will return
+    * `None` in this state.
+    *
+    * Because blinded paths are \"all or nothing\", and we cannot use just one part of a blinded
+    * path, the full path is treated as a single [`CandidateRouteHop`].
+    */
+   LDKCandidateRouteHop_Blinded,
+   /**
+    * Similar to [`Self::Blinded`], but the path here only has one hop.
+    *
+    * While we treat this similarly to [`CandidateRouteHop::Blinded`] in many respects (e.g.
+    * returning `None` from [`CandidateRouteHop::target`]), in this case we do actually know the
+    * payee's identity - it's the introduction point!
+    *
+    * [`BlindedPayInfo`] provided for 1-hop blinded paths is ignored because it is meant to apply
+    * to the hops *between* the introduction node and the destination.
+    *
+    * This primarily exists to track that we need to included a blinded path at the end of our
+    * [`Route`], even though it doesn't actually add an additional hop in the payment.
+    */
+   LDKCandidateRouteHop_OneHopBlinded,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCandidateRouteHop_Sentinel,
+} LDKCandidateRouteHop_Tag;
+
+typedef struct MUST_USE_STRUCT LDKCandidateRouteHop {
+   LDKCandidateRouteHop_Tag tag;
+   union {
+      struct {
+         struct LDKFirstHopCandidate first_hop;
+      };
+      struct {
+         struct LDKPublicHopCandidate public_hop;
+      };
+      struct {
+         struct LDKPrivateHopCandidate private_hop;
+      };
+      struct {
+         struct LDKBlindedPathCandidate blinded;
+      };
+      struct {
+         struct LDKOneHopBlindedPathCandidate one_hop_blinded;
+      };
+   };
+} LDKCandidateRouteHop;
 
 
 
 /**
- * Proposed use of a channel passed as a parameter to [`Score::channel_penalty_msat`].
+ * Proposed use of a channel passed as a parameter to [`ScoreLookUp::channel_penalty_msat`].
  */
 typedef struct MUST_USE_STRUCT LDKChannelUsage {
    /**
@@ -3048,6 +4070,37 @@ typedef struct MUST_USE_STRUCT LDKProbabilisticScoringFeeParameters {
    bool is_owned;
 } LDKProbabilisticScoringFeeParameters;
 
+/**
+ * An interface used to score payment channels for path finding.
+ *
+ * `ScoreLookUp` is used to determine the penalty for a given channel.
+ *
+ * Scoring is in terms of fees willing to be paid in order to avoid routing through a channel.
+ */
+typedef struct LDKScoreLookUp {
+   /**
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
+    */
+   void *this_arg;
+   /**
+    * Returns the fee in msats willing to be paid to avoid routing `send_amt_msat` through the
+    * given channel in the direction from `source` to `target`.
+    *
+    * The channel's capacity (less any other MPP parts that are also being considered for use in
+    * the same payment) is given by `capacity_msat`. It may be determined from various sources
+    * such as a chain data, network gossip, or invoice hints. For invoice hints, a capacity near
+    * [`u64::max_value`] is given to indicate sufficient capacity for the invoice's full amount.
+    * Thus, implementations should be overflow-safe.
+    */
+   uint64_t (*channel_penalty_msat)(const void *this_arg, const struct LDKCandidateRouteHop *NONNULL_PTR candidate, struct LDKChannelUsage usage, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR score_params);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKScoreLookUp;
+
 
 
 /**
@@ -3070,61 +4123,51 @@ typedef struct MUST_USE_STRUCT LDKPath {
 } LDKPath;
 
 /**
- * An interface used to score payment channels for path finding.
- *
- *\tScoring is in terms of fees willing to be paid in order to avoid routing through a channel.
+ * `ScoreUpdate` is used to update the scorer's internal state after a payment attempt.
  */
-typedef struct LDKScore {
+typedef struct LDKScoreUpdate {
    /**
     * An opaque pointer which is passed to your function implementations as an argument.
     * This has no meaning in the LDK, and can be NULL or any other value.
     */
    void *this_arg;
-   /**
-    * Returns the fee in msats willing to be paid to avoid routing `send_amt_msat` through the
-    * given channel in the direction from `source` to `target`.
-    *
-    * The channel's capacity (less any other MPP parts that are also being considered for use in
-    * the same payment) is given by `capacity_msat`. It may be determined from various sources
-    * such as a chain data, network gossip, or invoice hints. For invoice hints, a capacity near
-    * [`u64::max_value`] is given to indicate sufficient capacity for the invoice's full amount.
-    * Thus, implementations should be overflow-safe.
-    */
-   uint64_t (*channel_penalty_msat)(const void *this_arg, uint64_t short_channel_id, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target, struct LDKChannelUsage usage, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR score_params);
    /**
     * Handles updating channel penalties after failing to route through a channel.
     */
-   void (*payment_path_failed)(void *this_arg, const struct LDKPath *NONNULL_PTR path, uint64_t short_channel_id);
+   void (*payment_path_failed)(void *this_arg, const struct LDKPath *NONNULL_PTR path, uint64_t short_channel_id, uint64_t duration_since_epoch);
    /**
     * Handles updating channel penalties after successfully routing along a path.
     */
-   void (*payment_path_successful)(void *this_arg, const struct LDKPath *NONNULL_PTR path);
+   void (*payment_path_successful)(void *this_arg, const struct LDKPath *NONNULL_PTR path, uint64_t duration_since_epoch);
    /**
     * Handles updating channel penalties after a probe over the given path failed.
     */
-   void (*probe_failed)(void *this_arg, const struct LDKPath *NONNULL_PTR path, uint64_t short_channel_id);
+   void (*probe_failed)(void *this_arg, const struct LDKPath *NONNULL_PTR path, uint64_t short_channel_id, uint64_t duration_since_epoch);
    /**
     * Handles updating channel penalties after a probe over the given path succeeded.
     */
-   void (*probe_successful)(void *this_arg, const struct LDKPath *NONNULL_PTR path);
+   void (*probe_successful)(void *this_arg, const struct LDKPath *NONNULL_PTR path, uint64_t duration_since_epoch);
    /**
-    * Serialize the object into a byte array
+    * Scorers may wish to reduce their certainty of channel liquidity information over time.
+    * Thus, this method is provided to allow scorers to observe the passage of time - the holder
+    * of this object should call this method regularly (generally via the
+    * `lightning-background-processor` crate).
     */
-   struct LDKCVec_u8Z (*write)(const void *this_arg);
+   void (*time_passed)(void *this_arg, uint64_t duration_since_epoch);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
     */
    void (*free)(void *this_arg);
-} LDKScore;
+} LDKScoreUpdate;
 
 /**
  * A scorer that is accessed under a lock.
  *
- * Needed so that calls to [`Score::channel_penalty_msat`] in [`find_route`] can be made while
- * having shared ownership of a scorer but without requiring internal locking in [`Score`]
+ * Needed so that calls to [`ScoreLookUp::channel_penalty_msat`] in [`find_route`] can be made while
+ * having shared ownership of a scorer but without requiring internal locking in [`ScoreUpdate`]
  * implementations. Internal locking would be detrimental to route finding performance and could
- * result in [`Score::channel_penalty_msat`] returning a different value for the same channel.
+ * result in [`ScoreLookUp::channel_penalty_msat`] returning a different value for the same channel.
  *
  * [`find_route`]: crate::routing::router::find_route
  */
@@ -3135,9 +4178,13 @@ typedef struct LDKLockableScore {
     */
    void *this_arg;
    /**
-    * Returns the locked scorer.
+    * Returns read locked scorer.
     */
-   struct LDKScore (*lock)(const void *this_arg);
+   struct LDKScoreLookUp (*read_lock)(const void *this_arg);
+   /**
+    * Returns write locked scorer.
+    */
+   struct LDKScoreUpdate (*write_lock)(const void *this_arg);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -3200,9 +4247,9 @@ typedef struct LDKCOption_WriteableScoreZ {
 } LDKCOption_WriteableScoreZ;
 
 /**
- * The contents of CResult_NoneErrorZ
+ * The contents of CResult_NoneIOErrorZ
  */
-typedef union LDKCResult_NoneErrorZPtr {
+typedef union LDKCResult_NoneIOErrorZPtr {
    /**
     * Note that this value is always NULL, as there are no contents in the OK variant
     */
@@ -3212,24 +4259,24 @@ typedef union LDKCResult_NoneErrorZPtr {
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    enum LDKIOError *err;
-} LDKCResult_NoneErrorZPtr;
+} LDKCResult_NoneIOErrorZPtr;
 
 /**
- * A CResult_NoneErrorZ represents the result of a fallible operation,
+ * A CResult_NoneIOErrorZ represents the result of a fallible operation,
  * containing a () on success and a crate::c_types::IOError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_NoneErrorZ {
+typedef struct LDKCResult_NoneIOErrorZ {
    /**
-    * The contents of this CResult_NoneErrorZ, accessible via either
+    * The contents of this CResult_NoneIOErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_NoneErrorZPtr contents;
+   union LDKCResult_NoneIOErrorZPtr contents;
    /**
-    * Whether this CResult_NoneErrorZ represents a success state.
+    * Whether this CResult_NoneIOErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_NoneErrorZ;
+} LDKCResult_NoneIOErrorZ;
 
 
 
@@ -3341,6 +4388,168 @@ typedef struct LDKCResult_RouteLightningErrorZ {
    bool result_ok;
 } LDKCResult_RouteLightningErrorZ;
 
+/**
+ * A tuple of 2 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC2Tuple_BlindedPayInfoBlindedPathZ {
+   /**
+    * The element at position 0
+    */
+   struct LDKBlindedPayInfo a;
+   /**
+    * The element at position 1
+    */
+   struct LDKBlindedPath b;
+} LDKC2Tuple_BlindedPayInfoBlindedPathZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_BlindedPayInfoBlindedPathZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC2Tuple_BlindedPayInfoBlindedPathZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ;
+
+/**
+ * The contents of CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ
+ */
+typedef union LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZPtr;
+
+/**
+ * A CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::CVec_C2Tuple_BlindedPayInfoBlindedPathZZ on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ {
+   /**
+    * The contents of this CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZPtr contents;
+   /**
+    * Whether this CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::PublicKeys of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_PublicKeyZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKPublicKey *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_PublicKeyZ;
+
+
+
+/**
+ * A path for sending an [`OnionMessage`].
+ */
+typedef struct MUST_USE_STRUCT LDKOnionMessagePath {
+   /**
+    * 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.
+    */
+   LDKnativeOnionMessagePath *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;
+} LDKOnionMessagePath;
+
+/**
+ * The contents of CResult_OnionMessagePathNoneZ
+ */
+typedef union LDKCResult_OnionMessagePathNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKOnionMessagePath *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_OnionMessagePathNoneZPtr;
+
+/**
+ * A CResult_OnionMessagePathNoneZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::messenger::OnionMessagePath on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_OnionMessagePathNoneZ {
+   /**
+    * The contents of this CResult_OnionMessagePathNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_OnionMessagePathNoneZPtr contents;
+   /**
+    * Whether this CResult_OnionMessagePathNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_OnionMessagePathNoneZ;
+
+/**
+ * The contents of CResult_CVec_BlindedPathZNoneZ
+ */
+typedef union LDKCResult_CVec_BlindedPathZNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKCVec_BlindedPathZ *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_CVec_BlindedPathZNoneZPtr;
+
+/**
+ * A CResult_CVec_BlindedPathZNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::CVec_BlindedPathZ on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_CVec_BlindedPathZNoneZ {
+   /**
+    * The contents of this CResult_CVec_BlindedPathZNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_CVec_BlindedPathZNoneZPtr contents;
+   /**
+    * Whether this CResult_CVec_BlindedPathZNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_CVec_BlindedPathZNoneZ;
+
 
 
 /**
@@ -3452,8 +4661,9 @@ typedef struct LDKCResult_RouteHopDecodeErrorZ {
 
 
 /**
- * Used to construct the blinded hops portion of a blinded path. These hops cannot be identified
- * by outside observers and thus can be used to hide the identity of the recipient.
+ * An encrypted payload and node id corresponding to a hop in a payment or onion message path, to
+ * be encoded in the sender's onion packet. These hops cannot be identified by outside observers
+ * and thus can be used to hide the identity of the recipient.
  */
 typedef struct MUST_USE_STRUCT LDKBlindedHop {
    /**
@@ -3558,33 +4768,6 @@ typedef struct LDKCVec_RouteHopZ {
    uintptr_t datalen;
 } LDKCVec_RouteHopZ;
 
-/**
- * An enum which can either contain a u32 or not
- */
-typedef enum LDKCOption_u32Z_Tag {
-   /**
-    * When we're in this state, this COption_u32Z contains a u32
-    */
-   LDKCOption_u32Z_Some,
-   /**
-    * When we're in this state, this COption_u32Z contains nothing
-    */
-   LDKCOption_u32Z_None,
-   /**
-    * Must be last for serialization purposes
-    */
-   LDKCOption_u32Z_Sentinel,
-} LDKCOption_u32Z_Tag;
-
-typedef struct LDKCOption_u32Z {
-   LDKCOption_u32Z_Tag tag;
-   union {
-      struct {
-         uint32_t some;
-      };
-   };
-} LDKCOption_u32Z;
-
 /**
  * A dynamically-allocated array of crate::lightning::routing::router::Paths of arbitrary size.
  * This corresponds to std::vector in C++
@@ -3758,36 +4941,6 @@ typedef struct LDKCResult_PaymentParametersDecodeErrorZ {
    bool result_ok;
 } LDKCResult_PaymentParametersDecodeErrorZ;
 
-/**
- * A tuple of 2 elements. See the individual fields for the types contained.
- */
-typedef struct LDKC2Tuple_BlindedPayInfoBlindedPathZ {
-   /**
-    * The element at position 0
-    */
-   struct LDKBlindedPayInfo a;
-   /**
-    * The element at position 1
-    */
-   struct LDKBlindedPath b;
-} LDKC2Tuple_BlindedPayInfoBlindedPathZ;
-
-/**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_BlindedPayInfoBlindedPathZs of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   struct LDKC2Tuple_BlindedPayInfoBlindedPathZ *data;
-   /**
-    * The number of elements pointed to by `data`.
-    */
-   uintptr_t datalen;
-} LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ;
-
 
 
 /**
@@ -3828,6 +4981,10 @@ typedef struct LDKCVec_RouteHintZ {
 
 /**
  * A channel descriptor for a hop along a payment path.
+ *
+ * While this generally comes from BOLT 11's `r` field, this struct includes more fields than are
+ * available in BOLT 11. Thus, encoding and decoding this via `lightning-invoice` is lossy, as
+ * fields not supported in BOLT 11 will be stripped.
  */
 typedef struct MUST_USE_STRUCT LDKRouteHintHop {
    /**
@@ -3926,26 +5083,10 @@ typedef struct LDKCResult_RouteHintHopDecodeErrorZ {
    bool result_ok;
 } LDKCResult_RouteHintHopDecodeErrorZ;
 
-/**
- * A dynamically-allocated array of crate::c_types::PublicKeys of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_PublicKeyZ {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   struct LDKPublicKey *data;
-   /**
-    * The number of elements pointed to by `data`.
-    */
-   uintptr_t datalen;
-} LDKCVec_PublicKeyZ;
-
 
 
 /**
- * [`Score`] implementation that uses a fixed penalty.
+ * [`ScoreLookUp`] implementation that uses a fixed penalty.
  */
 typedef struct MUST_USE_STRUCT LDKFixedPenaltyScorer {
    /**
@@ -3995,6 +5136,26 @@ typedef struct LDKCResult_FixedPenaltyScorerDecodeErrorZ {
    bool result_ok;
 } LDKCResult_FixedPenaltyScorerDecodeErrorZ;
 
+
+
+/**
+ * Represents the compressed public key of a node
+ */
+typedef struct MUST_USE_STRUCT LDKNodeId {
+   /**
+    * 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.
+    */
+   LDKnativeNodeId *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;
+} LDKNodeId;
+
 /**
  * A dynamically-allocated array of crate::lightning::routing::gossip::NodeIds of arbitrary size.
  * This corresponds to std::vector in C++
@@ -4053,14 +5214,14 @@ typedef struct LDKCOption_C2Tuple_u64u64ZZ {
 } LDKCOption_C2Tuple_u64u64ZZ;
 
 /**
- * 8 u16s
+ * 32 u16s
  */
-typedef struct LDKEightU16s {
+typedef struct LDKThirtyTwoU16s {
    /**
-    * The eight 16-bit integers
+    * The thirty-two 16-bit integers
     */
-   uint16_t data[8];
-} LDKEightU16s;
+   uint16_t data[32];
+} LDKThirtyTwoU16s;
 
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
@@ -4069,53 +5230,80 @@ typedef struct LDKC2Tuple_Z {
    /**
     * The element at position 0
     */
-   struct LDKEightU16s a;
+   struct LDKThirtyTwoU16s a;
    /**
     * The element at position 1
     */
-   struct LDKEightU16s b;
+   struct LDKThirtyTwoU16s b;
 } LDKC2Tuple_Z;
 
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple__u168_u168Z {
+typedef struct LDKC2Tuple__u1632_u1632Z {
    /**
     * The element at position 0
     */
-   struct LDKEightU16s a;
+   struct LDKThirtyTwoU16s a;
    /**
     * The element at position 1
     */
-   struct LDKEightU16s b;
-} LDKC2Tuple__u168_u168Z;
+   struct LDKThirtyTwoU16s b;
+} LDKC2Tuple__u1632_u1632Z;
 
 /**
- * An enum which can either contain a crate::c_types::derived::C2Tuple__u168_u168Z or not
+ * An enum which can either contain a crate::c_types::derived::C2Tuple__u1632_u1632Z or not
  */
-typedef enum LDKCOption_C2Tuple_EightU16sEightU16sZZ_Tag {
+typedef enum LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Tag {
    /**
-    * When we're in this state, this COption_C2Tuple_EightU16sEightU16sZZ contains a crate::c_types::derived::C2Tuple__u168_u168Z
+    * When we're in this state, this COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ contains a crate::c_types::derived::C2Tuple__u1632_u1632Z
     */
-   LDKCOption_C2Tuple_EightU16sEightU16sZZ_Some,
+   LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Some,
    /**
-    * When we're in this state, this COption_C2Tuple_EightU16sEightU16sZZ contains nothing
+    * When we're in this state, this COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ contains nothing
     */
-   LDKCOption_C2Tuple_EightU16sEightU16sZZ_None,
+   LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_C2Tuple_EightU16sEightU16sZZ_Sentinel,
-} LDKCOption_C2Tuple_EightU16sEightU16sZZ_Tag;
+   LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Sentinel,
+} LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Tag;
 
-typedef struct LDKCOption_C2Tuple_EightU16sEightU16sZZ {
-   LDKCOption_C2Tuple_EightU16sEightU16sZZ_Tag tag;
+typedef struct LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ {
+   LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_Tag tag;
    union {
       struct {
-         struct LDKC2Tuple__u168_u168Z some;
+         struct LDKC2Tuple__u1632_u1632Z some;
       };
    };
-} LDKCOption_C2Tuple_EightU16sEightU16sZZ;
+} LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ;
+
+/**
+ * An enum which can either contain a f64 or not
+ */
+typedef enum LDKCOption_f64Z_Tag {
+   /**
+    * When we're in this state, this COption_f64Z contains a f64
+    */
+   LDKCOption_f64Z_Some,
+   /**
+    * When we're in this state, this COption_f64Z contains nothing
+    */
+   LDKCOption_f64Z_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_f64Z_Sentinel,
+} LDKCOption_f64Z_Tag;
+
+typedef struct LDKCOption_f64Z {
+   LDKCOption_f64Z_Tag tag;
+   union {
+      struct {
+         double some;
+      };
+   };
+} LDKCOption_f64Z;
 
 
 
@@ -4139,7 +5327,7 @@ typedef struct MUST_USE_STRUCT LDKRecord {
 } LDKRecord;
 
 /**
- * A trait encapsulating the operations required of a logger
+ * A trait encapsulating the operations required of a logger.
  */
 typedef struct LDKLogger {
    /**
@@ -4148,9 +5336,9 @@ typedef struct LDKLogger {
     */
    void *this_arg;
    /**
-    * Logs the `Record`
+    * Logs the [`Record`].
     */
-   void (*log)(const void *this_arg, const struct LDKRecord *NONNULL_PTR record);
+   void (*log)(const void *this_arg, struct LDKRecord record);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -4181,7 +5369,7 @@ typedef struct MUST_USE_STRUCT LDKNetworkGraph {
 
 
 /**
- * [`Score`] implementation using channel success probability distributions.
+ * [`ScoreLookUp`] implementation using channel success probability distributions.
  *
  * Channels are tracked with upper and lower liquidity bounds - when an HTLC fails at a channel,
  * we learn that the upper-bound on the available liquidity is lower than the amount of the HTLC.
@@ -4206,11 +5394,6 @@ typedef struct MUST_USE_STRUCT LDKNetworkGraph {
  * formula, but using the history of a channel rather than our latest estimates for the liquidity
  * bounds.
  *
- * # Note
- *
- * Mixing the `no-std` feature between serialization and deserialization results in undefined
- * behavior.
- *
  * [1]: https://arxiv.org/abs/2107.05322
  * [`liquidity_penalty_multiplier_msat`]: ProbabilisticScoringFeeParameters::liquidity_penalty_multiplier_msat
  * [`liquidity_penalty_amount_multiplier_msat`]: ProbabilisticScoringFeeParameters::liquidity_penalty_amount_multiplier_msat
@@ -4266,6 +5449,59 @@ typedef struct LDKCResult_ProbabilisticScorerDecodeErrorZ {
    bool result_ok;
 } LDKCResult_ProbabilisticScorerDecodeErrorZ;
 
+
+
+/**
+ * The best known block as identified by its hash and height.
+ */
+typedef struct MUST_USE_STRUCT LDKBestBlock {
+   /**
+    * 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.
+    */
+   LDKnativeBestBlock *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;
+} LDKBestBlock;
+
+/**
+ * The contents of CResult_BestBlockDecodeErrorZ
+ */
+typedef union LDKCResult_BestBlockDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKBestBlock *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_BestBlockDecodeErrorZPtr;
+
+/**
+ * A CResult_BestBlockDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::chain::BestBlock 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_BestBlockDecodeErrorZ {
+   /**
+    * The contents of this CResult_BestBlockDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_BestBlockDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_BestBlockDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_BestBlockDecodeErrorZ;
+
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
@@ -4297,61 +5533,70 @@ typedef struct LDKCVec_C2Tuple_usizeTransactionZZ {
 } LDKCVec_C2Tuple_usizeTransactionZZ;
 
 /**
- * An enum which can either contain a crate::c_types::ThirtyTwoBytes or not
+ * A tuple of 3 elements. See the individual fields for the types contained.
  */
-typedef enum LDKCOption_BlockHashZ_Tag {
+typedef struct LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ {
    /**
-    * When we're in this state, this COption_BlockHashZ contains a crate::c_types::ThirtyTwoBytes
+    * The element at position 0
     */
-   LDKCOption_BlockHashZ_Some,
+   struct LDKThirtyTwoBytes a;
    /**
-    * When we're in this state, this COption_BlockHashZ contains nothing
+    * The element at position 1
     */
-   LDKCOption_BlockHashZ_None,
+   uint32_t b;
    /**
-    * Must be last for serialization purposes
+    * The element at position 2
     */
-   LDKCOption_BlockHashZ_Sentinel,
-} LDKCOption_BlockHashZ_Tag;
+   struct LDKCOption_ThirtyTwoBytesZ c;
+} LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ;
 
-typedef struct LDKCOption_BlockHashZ {
-   LDKCOption_BlockHashZ_Tag tag;
-   union {
-      struct {
-         struct LDKThirtyTwoBytes some;
-      };
-   };
-} LDKCOption_BlockHashZ;
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ;
 
 /**
- * A tuple of 2 elements. See the individual fields for the types contained.
+ * The contents of CResult_ChannelMonitorUpdateStatusNoneZ
  */
-typedef struct LDKC2Tuple_TxidCOption_BlockHashZZ {
+typedef union LDKCResult_ChannelMonitorUpdateStatusNoneZPtr {
    /**
-    * The element at position 0
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKThirtyTwoBytes a;
+   enum LDKChannelMonitorUpdateStatus *result;
    /**
-    * The element at position 1
+    * Note that this value is always NULL, as there are no contents in the Err variant
     */
-   struct LDKCOption_BlockHashZ b;
-} LDKC2Tuple_TxidCOption_BlockHashZZ;
+   void *err;
+} LDKCResult_ChannelMonitorUpdateStatusNoneZPtr;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCOption_BlockHashZZs of arbitrary size.
- * This corresponds to std::vector in C++
+ * A CResult_ChannelMonitorUpdateStatusNoneZ represents the result of a fallible operation,
+ * containing a crate::lightning::chain::ChannelMonitorUpdateStatus on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCVec_C2Tuple_TxidCOption_BlockHashZZZ {
+typedef struct LDKCResult_ChannelMonitorUpdateStatusNoneZ {
    /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    * The contents of this CResult_ChannelMonitorUpdateStatusNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
     */
-   struct LDKC2Tuple_TxidCOption_BlockHashZZ *data;
+   union LDKCResult_ChannelMonitorUpdateStatusNoneZPtr contents;
    /**
-    * The number of elements pointed to by `data`.
+    * Whether this CResult_ChannelMonitorUpdateStatusNoneZ represents a success state.
     */
-   uintptr_t datalen;
-} LDKCVec_C2Tuple_TxidCOption_BlockHashZZZ;
+   bool result_ok;
+} LDKCResult_ChannelMonitorUpdateStatusNoneZ;
 
 
 
@@ -4375,6 +5620,174 @@ typedef struct MUST_USE_STRUCT LDKHTLCUpdate {
    bool is_owned;
 } LDKHTLCUpdate;
 
+
+
+/**
+ * Struct to `Display` fields in a safe way using `PrintableString`
+ */
+typedef struct MUST_USE_STRUCT LDKUntrustedString {
+   /**
+    * 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.
+    */
+   LDKnativeUntrustedString *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;
+} LDKUntrustedString;
+
+/**
+ * The reason the channel was closed. See individual variants for more details.
+ */
+typedef enum LDKClosureReason_Tag {
+   /**
+    * Closure generated from receiving a peer error message.
+    *
+    * Our counterparty may have broadcasted their latest commitment state, and we have
+    * as well.
+    */
+   LDKClosureReason_CounterpartyForceClosed,
+   /**
+    * Closure generated from [`ChannelManager::force_close_channel`], called by the user.
+    *
+    * [`ChannelManager::force_close_channel`]: crate::ln::channelmanager::ChannelManager::force_close_channel.
+    */
+   LDKClosureReason_HolderForceClosed,
+   /**
+    * The channel was closed after negotiating a cooperative close and we've now broadcasted
+    * the cooperative close transaction. Note the shutdown may have been initiated by us.
+    *
+    * This was only set in versions of LDK prior to 0.0.122.
+    */
+   LDKClosureReason_LegacyCooperativeClosure,
+   /**
+    * The channel was closed after negotiating a cooperative close and we've now broadcasted
+    * the cooperative close transaction. This indicates that the shutdown was initiated by our
+    * counterparty.
+    *
+    * In rare cases where we initiated closure immediately prior to shutting down without
+    * persisting, this value may be provided for channels we initiated closure for.
+    */
+   LDKClosureReason_CounterpartyInitiatedCooperativeClosure,
+   /**
+    * The channel was closed after negotiating a cooperative close and we've now broadcasted
+    * the cooperative close transaction. This indicates that the shutdown was initiated by us.
+    */
+   LDKClosureReason_LocallyInitiatedCooperativeClosure,
+   /**
+    * A commitment transaction was confirmed on chain, closing the channel. Most likely this
+    * commitment transaction came from our counterparty, but it may also have come from
+    * a copy of our own `ChannelMonitor`.
+    */
+   LDKClosureReason_CommitmentTxConfirmed,
+   /**
+    * The funding transaction failed to confirm in a timely manner on an inbound channel.
+    */
+   LDKClosureReason_FundingTimedOut,
+   /**
+    * Closure generated from processing an event, likely a HTLC forward/relay/reception.
+    */
+   LDKClosureReason_ProcessingError,
+   /**
+    * The peer disconnected prior to funding completing. In this case the spec mandates that we
+    * forget the channel entirely - we can attempt again if the peer reconnects.
+    *
+    * This includes cases where we restarted prior to funding completion, including prior to the
+    * initial [`ChannelMonitor`] persistence completing.
+    *
+    * In LDK versions prior to 0.0.107 this could also occur if we were unable to connect to the
+    * peer because of mutual incompatibility between us and our channel counterparty.
+    *
+    * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+    */
+   LDKClosureReason_DisconnectedPeer,
+   /**
+    * Closure generated from `ChannelManager::read` if the [`ChannelMonitor`] is newer than
+    * the [`ChannelManager`] deserialized.
+    *
+    * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+    */
+   LDKClosureReason_OutdatedChannelManager,
+   /**
+    * The counterparty requested a cooperative close of a channel that had not been funded yet.
+    * The channel has been immediately closed.
+    */
+   LDKClosureReason_CounterpartyCoopClosedUnfundedChannel,
+   /**
+    * Another channel in the same funding batch closed before the funding transaction
+    * was ready to be broadcast.
+    */
+   LDKClosureReason_FundingBatchClosure,
+   /**
+    * One of our HTLCs timed out in a channel, causing us to force close the channel.
+    */
+   LDKClosureReason_HTLCsTimedOut,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKClosureReason_Sentinel,
+} LDKClosureReason_Tag;
+
+typedef struct LDKClosureReason_LDKCounterpartyForceClosed_Body {
+   /**
+    * The error which the peer sent us.
+    *
+    * Be careful about printing the peer_msg, a well-crafted message could exploit
+    * a security vulnerability in the terminal emulator or the logging subsystem.
+    * To be safe, use `Display` on `UntrustedString`
+    *
+    * [`UntrustedString`]: crate::util::string::UntrustedString
+    */
+   struct LDKUntrustedString peer_msg;
+} LDKClosureReason_LDKCounterpartyForceClosed_Body;
+
+typedef struct LDKClosureReason_LDKProcessingError_Body {
+   /**
+    * A developer-readable error message which we generated.
+    */
+   struct LDKStr err;
+} LDKClosureReason_LDKProcessingError_Body;
+
+typedef struct MUST_USE_STRUCT LDKClosureReason {
+   LDKClosureReason_Tag tag;
+   union {
+      LDKClosureReason_LDKCounterpartyForceClosed_Body counterparty_force_closed;
+      LDKClosureReason_LDKProcessingError_Body processing_error;
+   };
+} LDKClosureReason;
+
+
+
+/**
+ * A unique 32-byte identifier for a channel.
+ * Depending on how the ID is generated, several varieties are distinguished
+ * (but all are stored as 32 bytes):
+ *   _v1_ and _temporary_.
+ * A _v1_ channel ID is generated based on funding tx outpoint (txid & index).
+ * A _temporary_ ID is generated randomly.
+ * (Later revocation-point-based _v2_ is a possibility.)
+ * The variety (context) is not stored, it is relevant only at creation.
+ */
+typedef struct MUST_USE_STRUCT LDKChannelId {
+   /**
+    * 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.
+    */
+   LDKnativeChannelId *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;
+} LDKChannelId;
+
 /**
  * An event to be processed by the ChannelManager.
  */
@@ -4384,9 +5797,15 @@ typedef enum LDKMonitorEvent_Tag {
     */
    LDKMonitorEvent_HTLCEvent,
    /**
-    * A monitor event that the Channel's commitment transaction was confirmed.
+    * Indicates we broadcasted the channel's latest commitment transaction and thus closed the
+    * channel. Holds information about the channel and why it was closed.
     */
-   LDKMonitorEvent_CommitmentTxConfirmed,
+   LDKMonitorEvent_HolderForceClosedWithInfo,
+   /**
+    * Indicates we broadcasted the channel's latest commitment transaction and thus closed the
+    * channel.
+    */
+   LDKMonitorEvent_HolderForceClosed,
    /**
     * Indicates a [`ChannelMonitor`] update has completed. See
     * [`ChannelMonitorUpdateStatus::InProgress`] for more information on how this is used.
@@ -4394,24 +5813,36 @@ typedef enum LDKMonitorEvent_Tag {
     * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
     */
    LDKMonitorEvent_Completed,
-   /**
-    * Indicates a [`ChannelMonitor`] update has failed. See
-    * [`ChannelMonitorUpdateStatus::PermanentFailure`] for more information on how this is used.
-    *
-    * [`ChannelMonitorUpdateStatus::PermanentFailure`]: super::ChannelMonitorUpdateStatus::PermanentFailure
-    */
-   LDKMonitorEvent_UpdateFailed,
    /**
     * Must be last for serialization purposes
     */
    LDKMonitorEvent_Sentinel,
 } LDKMonitorEvent_Tag;
 
+typedef struct LDKMonitorEvent_LDKHolderForceClosedWithInfo_Body {
+   /**
+    * The reason the channel was closed.
+    */
+   struct LDKClosureReason reason;
+   /**
+    * The funding outpoint of the channel.
+    */
+   struct LDKOutPoint outpoint;
+   /**
+    * The channel ID of the channel.
+    */
+   struct LDKChannelId channel_id;
+} LDKMonitorEvent_LDKHolderForceClosedWithInfo_Body;
+
 typedef struct LDKMonitorEvent_LDKCompleted_Body {
    /**
     * The funding outpoint of the [`ChannelMonitor`] that was updated
     */
    struct LDKOutPoint funding_txo;
+   /**
+    * The channel ID of the channel associated with the [`ChannelMonitor`]
+    */
+   struct LDKChannelId channel_id;
    /**
     * The Update ID from [`ChannelMonitorUpdate::update_id`] which was applied or
     * [`ChannelMonitor::get_latest_update_id`].
@@ -4428,13 +5859,11 @@ typedef struct MUST_USE_STRUCT LDKMonitorEvent {
       struct {
          struct LDKHTLCUpdate htlc_event;
       };
+      LDKMonitorEvent_LDKHolderForceClosedWithInfo_Body holder_force_closed_with_info;
       struct {
-         struct LDKOutPoint commitment_tx_confirmed;
+         struct LDKOutPoint holder_force_closed;
       };
       LDKMonitorEvent_LDKCompleted_Body completed;
-      struct {
-         struct LDKOutPoint update_failed;
-      };
    };
 } LDKMonitorEvent;
 
@@ -4455,9 +5884,9 @@ typedef struct LDKCVec_MonitorEventZ {
 } LDKCVec_MonitorEventZ;
 
 /**
- * A tuple of 3 elements. See the individual fields for the types contained.
+ * A tuple of 4 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ {
+typedef struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ {
    /**
     * The element at position 0
     */
@@ -4465,28 +5894,32 @@ typedef struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ {
    /**
     * The element at position 1
     */
-   struct LDKCVec_MonitorEventZ b;
+   struct LDKChannelId b;
    /**
     * The element at position 2
     */
-   struct LDKPublicKey c;
-} LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ;
+   struct LDKCVec_MonitorEventZ c;
+   /**
+    * The element at position 3
+    */
+   struct LDKPublicKey d;
+} LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C3Tuple_OutPointCVec_MonitorEventZPublicKeyZs of arbitrary size.
+ * A dynamically-allocated array of crate::c_types::derived::C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZs of arbitrary size.
  * This corresponds to std::vector in C++
  */
-typedef struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ {
+typedef struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ {
    /**
     * The elements in the array.
     * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *data;
+   struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *data;
    /**
     * The number of elements pointed to by `data`.
     */
    uintptr_t datalen;
-} LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ;
+} LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ;
 
 
 
@@ -4868,21 +6301,90 @@ typedef struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ {
    bool result_ok;
 } LDKCResult_ChannelTypeFeaturesDecodeErrorZ;
 
+
+
 /**
- * A dynamically-allocated array of crate::c_types::ThirtyTwoBytess of arbitrary size.
- * This corresponds to std::vector in C++
+ * An identifier for an [`Offer`] built using [`DerivedMetadata`].
  */
-typedef struct LDKCVec_ChainHashZ {
+typedef struct MUST_USE_STRUCT LDKOfferId {
    /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    * 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.
     */
-   struct LDKThirtyTwoBytes *data;
+   LDKnativeOfferId *inner;
    /**
-    * The number of elements pointed to by `data`.
+    * 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.
     */
-   uintptr_t datalen;
-} LDKCVec_ChainHashZ;
+   bool is_owned;
+} LDKOfferId;
+
+/**
+ * The contents of CResult_OfferIdDecodeErrorZ
+ */
+typedef union LDKCResult_OfferIdDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKOfferId *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_OfferIdDecodeErrorZPtr;
+
+/**
+ * A CResult_OfferIdDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::offer::OfferId 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_OfferIdDecodeErrorZ {
+   /**
+    * The contents of this CResult_OfferIdDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_OfferIdDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_OfferIdDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_OfferIdDecodeErrorZ;
+
+/**
+ * The contents of CResult_NoneBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_NoneBolt12SemanticErrorZPtr {
+   /**
+    * Note that this value is always NULL, as there are no contents in the OK variant
+    */
+   void *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_NoneBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_NoneBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a () on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_NoneBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_NoneBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_NoneBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_NoneBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_NoneBolt12SemanticErrorZ;
 
 
 
@@ -4917,9 +6419,9 @@ typedef struct MUST_USE_STRUCT LDKOffer {
 } LDKOffer;
 
 /**
- * The contents of CResult_OfferBolt12ParseErrorZ
+ * The contents of CResult_OfferBolt12SemanticErrorZ
  */
-typedef union LDKCResult_OfferBolt12ParseErrorZPtr {
+typedef union LDKCResult_OfferBolt12SemanticErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
@@ -4929,58 +6431,172 @@ typedef union LDKCResult_OfferBolt12ParseErrorZPtr {
     * A pointer to the contents in the error state.
     * Reading from this pointer when `result_ok` is set is undefined.
     */
-   struct LDKBolt12ParseError *err;
-} LDKCResult_OfferBolt12ParseErrorZPtr;
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_OfferBolt12SemanticErrorZPtr;
 
 /**
- * A CResult_OfferBolt12ParseErrorZ represents the result of a fallible operation,
- * containing a crate::lightning::offers::offer::Offer on success and a crate::lightning::offers::parse::Bolt12ParseError on failure.
+ * A CResult_OfferBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::offer::Offer on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_OfferBolt12ParseErrorZ {
+typedef struct LDKCResult_OfferBolt12SemanticErrorZ {
    /**
-    * The contents of this CResult_OfferBolt12ParseErrorZ, accessible via either
+    * The contents of this CResult_OfferBolt12SemanticErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_OfferBolt12ParseErrorZPtr contents;
+   union LDKCResult_OfferBolt12SemanticErrorZPtr contents;
    /**
-    * Whether this CResult_OfferBolt12ParseErrorZ represents a success state.
+    * Whether this CResult_OfferBolt12SemanticErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_OfferBolt12ParseErrorZ;
+} LDKCResult_OfferBolt12SemanticErrorZ;
+
+
+
+/**
+ * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+typedef struct MUST_USE_STRUCT LDKInvoiceRequestWithDerivedPayerIdBuilder {
+   /**
+    * 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.
+    */
+   LDKnativeInvoiceRequestWithDerivedPayerIdBuilder *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;
+} LDKInvoiceRequestWithDerivedPayerIdBuilder;
 
 /**
- * The contents of CResult_PublicKeyErrorZ
+ * The contents of CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ
  */
-typedef union LDKCResult_PublicKeyErrorZPtr {
+typedef union LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKPublicKey *result;
+   struct LDKInvoiceRequestWithDerivedPayerIdBuilder *result;
    /**
     * A pointer to the contents in the error state.
     * Reading from this pointer when `result_ok` is set is undefined.
     */
-   enum LDKSecp256k1Error *err;
-} LDKCResult_PublicKeyErrorZPtr;
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZPtr;
 
 /**
- * A CResult_PublicKeyErrorZ represents the result of a fallible operation,
- * containing a crate::c_types::PublicKey on success and a crate::c_types::Secp256k1Error on failure.
+ * A CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice_request::InvoiceRequestWithDerivedPayerIdBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ;
+
+
+
+/**
+ * Builds an [`InvoiceRequest`] from an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+typedef struct MUST_USE_STRUCT LDKInvoiceRequestWithExplicitPayerIdBuilder {
+   /**
+    * 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.
+    */
+   LDKnativeInvoiceRequestWithExplicitPayerIdBuilder *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;
+} LDKInvoiceRequestWithExplicitPayerIdBuilder;
+
+/**
+ * The contents of CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKInvoiceRequestWithExplicitPayerIdBuilder *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice_request::InvoiceRequestWithExplicitPayerIdBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ;
+
+/**
+ * The contents of CResult_OfferBolt12ParseErrorZ
+ */
+typedef union LDKCResult_OfferBolt12ParseErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKOffer *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   struct LDKBolt12ParseError *err;
+} LDKCResult_OfferBolt12ParseErrorZPtr;
+
+/**
+ * A CResult_OfferBolt12ParseErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::offer::Offer on success and a crate::lightning::offers::parse::Bolt12ParseError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_PublicKeyErrorZ {
+typedef struct LDKCResult_OfferBolt12ParseErrorZ {
    /**
-    * The contents of this CResult_PublicKeyErrorZ, accessible via either
+    * The contents of this CResult_OfferBolt12ParseErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_PublicKeyErrorZPtr contents;
+   union LDKCResult_OfferBolt12ParseErrorZPtr contents;
    /**
-    * Whether this CResult_PublicKeyErrorZ represents a success state.
+    * Whether this CResult_OfferBolt12ParseErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_PublicKeyErrorZ;
+} LDKCResult_OfferBolt12ParseErrorZ;
 
 /**
  * The contents of CResult_NodeIdDecodeErrorZ
@@ -5015,6 +6631,39 @@ typedef struct LDKCResult_NodeIdDecodeErrorZ {
    bool result_ok;
 } LDKCResult_NodeIdDecodeErrorZ;
 
+/**
+ * The contents of CResult_PublicKeySecp256k1ErrorZ
+ */
+typedef union LDKCResult_PublicKeySecp256k1ErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKPublicKey *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKSecp256k1Error *err;
+} LDKCResult_PublicKeySecp256k1ErrorZPtr;
+
+/**
+ * A CResult_PublicKeySecp256k1ErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::PublicKey on success and a crate::c_types::Secp256k1Error on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_PublicKeySecp256k1ErrorZ {
+   /**
+    * The contents of this CResult_PublicKeySecp256k1ErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_PublicKeySecp256k1ErrorZPtr contents;
+   /**
+    * Whether this CResult_PublicKeySecp256k1ErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_PublicKeySecp256k1ErrorZ;
+
 
 
 /**
@@ -5270,12 +6919,12 @@ typedef struct LDKUtxoLookup {
    void *this_arg;
    /**
     * Returns the transaction output of a funding transaction encoded by [`short_channel_id`].
-    * Returns an error if `genesis_hash` is for a different chain or if such a transaction output
-    * is unknown.
+    * Returns an error if `chain_hash` is for a different chain or if such a transaction output is
+    * unknown.
     *
     * [`short_channel_id`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#definition-of-short_channel_id
     */
-   struct LDKUtxoResult (*get_utxo)(const void *this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id);
+   struct LDKUtxoResult (*get_utxo)(const void *this_arg, const uint8_t (*chain_hash)[32], uint64_t short_channel_id);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -5586,6 +7235,88 @@ typedef struct MUST_USE_STRUCT LDKFundingSigned {
 
 
 
+/**
+ * An stfu (quiescence) message to be sent by or received from the stfu initiator.
+ */
+typedef struct MUST_USE_STRUCT LDKStfu {
+   /**
+    * 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.
+    */
+   LDKnativeStfu *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;
+} LDKStfu;
+
+
+
+/**
+ * A splice message to be sent by or received from the stfu initiator (splice initiator).
+ */
+typedef struct MUST_USE_STRUCT LDKSplice {
+   /**
+    * 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.
+    */
+   LDKnativeSplice *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;
+} LDKSplice;
+
+
+
+/**
+ * A splice_ack message to be received by or sent to the splice initiator.
+ *
+ */
+typedef struct MUST_USE_STRUCT LDKSpliceAck {
+   /**
+    * 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.
+    */
+   LDKnativeSpliceAck *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;
+} LDKSpliceAck;
+
+
+
+/**
+ * A splice_locked message to be sent to or received from a peer.
+ *
+ */
+typedef struct MUST_USE_STRUCT LDKSpliceLocked {
+   /**
+    * 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.
+    */
+   LDKnativeSpliceLocked *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;
+} LDKSpliceLocked;
+
+
+
 /**
  * A tx_add_input message for adding an input during interactive transaction construction
  *
@@ -5758,6 +7489,27 @@ typedef struct MUST_USE_STRUCT LDKTxAckRbf {
 
 
 
+/**
+ * A tx_abort message which signals the cancellation of an in-progress transaction negotiation.
+ *
+ */
+typedef struct MUST_USE_STRUCT LDKTxAbort {
+   /**
+    * 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.
+    */
+   LDKnativeTxAbort *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;
+} LDKTxAbort;
+
+
+
 /**
  * A [`channel_ready`] message to be sent to or received from a peer.
  *
@@ -6208,6 +7960,22 @@ typedef enum LDKMessageSendEvent_Tag {
     * Used to indicate that a funding_signed message should be sent to the peer with the given node_id.
     */
    LDKMessageSendEvent_SendFundingSigned,
+   /**
+    * Used to indicate that a stfu message should be sent to the peer with the given node id.
+    */
+   LDKMessageSendEvent_SendStfu,
+   /**
+    * Used to indicate that a splice message should be sent to the peer with the given node id.
+    */
+   LDKMessageSendEvent_SendSplice,
+   /**
+    * Used to indicate that a splice_ack message should be sent to the peer with the given node id.
+    */
+   LDKMessageSendEvent_SendSpliceAck,
+   /**
+    * Used to indicate that a splice_locked message should be sent to the peer with the given node id.
+    */
+   LDKMessageSendEvent_SendSpliceLocked,
    /**
     * Used to indicate that a tx_add_input message should be sent to the peer with the given node_id.
     */
@@ -6400,6 +8168,50 @@ typedef struct LDKMessageSendEvent_LDKSendFundingSigned_Body {
    struct LDKFundingSigned msg;
 } LDKMessageSendEvent_LDKSendFundingSigned_Body;
 
+typedef struct LDKMessageSendEvent_LDKSendStfu_Body {
+   /**
+    * The node_id of the node which should receive this message
+    */
+   struct LDKPublicKey node_id;
+   /**
+    * The message which should be sent.
+    */
+   struct LDKStfu msg;
+} LDKMessageSendEvent_LDKSendStfu_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendSplice_Body {
+   /**
+    * The node_id of the node which should receive this message
+    */
+   struct LDKPublicKey node_id;
+   /**
+    * The message which should be sent.
+    */
+   struct LDKSplice msg;
+} LDKMessageSendEvent_LDKSendSplice_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendSpliceAck_Body {
+   /**
+    * The node_id of the node which should receive this message
+    */
+   struct LDKPublicKey node_id;
+   /**
+    * The message which should be sent.
+    */
+   struct LDKSpliceAck msg;
+} LDKMessageSendEvent_LDKSendSpliceAck_Body;
+
+typedef struct LDKMessageSendEvent_LDKSendSpliceLocked_Body {
+   /**
+    * The node_id of the node which should receive this message
+    */
+   struct LDKPublicKey node_id;
+   /**
+    * The message which should be sent.
+    */
+   struct LDKSpliceLocked msg;
+} LDKMessageSendEvent_LDKSendSpliceLocked_Body;
+
 typedef struct LDKMessageSendEvent_LDKSendTxAddInput_Body {
    /**
     * The node_id of the node which should receive this message
@@ -6496,7 +8308,7 @@ typedef struct LDKMessageSendEvent_LDKSendTxAbort_Body {
    /**
     * The message which should be sent.
     */
-   struct LDKTxAddInput msg;
+   struct LDKTxAbort msg;
 } LDKMessageSendEvent_LDKSendTxAbort_Body;
 
 typedef struct LDKMessageSendEvent_LDKSendChannelReady_Body {
@@ -6693,6 +8505,10 @@ typedef struct MUST_USE_STRUCT LDKMessageSendEvent {
       LDKMessageSendEvent_LDKSendOpenChannelV2_Body send_open_channel_v2;
       LDKMessageSendEvent_LDKSendFundingCreated_Body send_funding_created;
       LDKMessageSendEvent_LDKSendFundingSigned_Body send_funding_signed;
+      LDKMessageSendEvent_LDKSendStfu_Body send_stfu;
+      LDKMessageSendEvent_LDKSendSplice_Body send_splice;
+      LDKMessageSendEvent_LDKSendSpliceAck_Body send_splice_ack;
+      LDKMessageSendEvent_LDKSendSpliceLocked_Body send_splice_locked;
       LDKMessageSendEvent_LDKSendTxAddInput_Body send_tx_add_input;
       LDKMessageSendEvent_LDKSendTxAddOutput_Body send_tx_add_output;
       LDKMessageSendEvent_LDKSendTxRemoveInput_Body send_tx_remove_input;
@@ -6947,40 +8763,40 @@ typedef struct MUST_USE_STRUCT LDKHostname {
 /**
  * An address which can be used to connect to a remote peer.
  */
-typedef enum LDKNetAddress_Tag {
+typedef enum LDKSocketAddress_Tag {
    /**
-    * An IPv4 address/port on which the peer is listening.
+    * An IPv4 address and port on which the peer is listening.
     */
-   LDKNetAddress_IPv4,
+   LDKSocketAddress_TcpIpV4,
    /**
-    * An IPv6 address/port on which the peer is listening.
+    * An IPv6 address and port on which the peer is listening.
     */
-   LDKNetAddress_IPv6,
+   LDKSocketAddress_TcpIpV6,
    /**
     * An old-style Tor onion address/port on which the peer is listening.
     *
     * This field is deprecated and the Tor network generally no longer supports V2 Onion
     * addresses. Thus, the details are not parsed here.
     */
-   LDKNetAddress_OnionV2,
+   LDKSocketAddress_OnionV2,
    /**
     * A new-style Tor onion address/port on which the peer is listening.
     *
     * To create the human-readable \"hostname\", concatenate the ED25519 pubkey, checksum, and version,
     * wrap as base32 and append \".onion\".
     */
-   LDKNetAddress_OnionV3,
+   LDKSocketAddress_OnionV3,
    /**
     * A hostname/port on which the peer is listening.
     */
-   LDKNetAddress_Hostname,
+   LDKSocketAddress_Hostname,
    /**
     * Must be last for serialization purposes
     */
-   LDKNetAddress_Sentinel,
-} LDKNetAddress_Tag;
+   LDKSocketAddress_Sentinel,
+} LDKSocketAddress_Tag;
 
-typedef struct LDKNetAddress_LDKIPv4_Body {
+typedef struct LDKSocketAddress_LDKTcpIpV4_Body {
    /**
     * The 4-byte IPv4 address
     */
@@ -6989,9 +8805,9 @@ typedef struct LDKNetAddress_LDKIPv4_Body {
     * The port on which the node is listening
     */
    uint16_t port;
-} LDKNetAddress_LDKIPv4_Body;
+} LDKSocketAddress_LDKTcpIpV4_Body;
 
-typedef struct LDKNetAddress_LDKIPv6_Body {
+typedef struct LDKSocketAddress_LDKTcpIpV6_Body {
    /**
     * The 16-byte IPv6 address
     */
@@ -7000,9 +8816,9 @@ typedef struct LDKNetAddress_LDKIPv6_Body {
     * The port on which the node is listening
     */
    uint16_t port;
-} LDKNetAddress_LDKIPv6_Body;
+} LDKSocketAddress_LDKTcpIpV6_Body;
 
-typedef struct LDKNetAddress_LDKOnionV3_Body {
+typedef struct LDKSocketAddress_LDKOnionV3_Body {
    /**
     * The ed25519 long-term public key of the peer
     */
@@ -7019,9 +8835,9 @@ typedef struct LDKNetAddress_LDKOnionV3_Body {
     * The port on which the node is listening
     */
    uint16_t port;
-} LDKNetAddress_LDKOnionV3_Body;
+} LDKSocketAddress_LDKOnionV3_Body;
 
-typedef struct LDKNetAddress_LDKHostname_Body {
+typedef struct LDKSocketAddress_LDKHostname_Body {
    /**
     * The hostname on which the node is listening.
     */
@@ -7030,36 +8846,36 @@ typedef struct LDKNetAddress_LDKHostname_Body {
     * The port on which the node is listening.
     */
    uint16_t port;
-} LDKNetAddress_LDKHostname_Body;
+} LDKSocketAddress_LDKHostname_Body;
 
-typedef struct MUST_USE_STRUCT LDKNetAddress {
-   LDKNetAddress_Tag tag;
+typedef struct MUST_USE_STRUCT LDKSocketAddress {
+   LDKSocketAddress_Tag tag;
    union {
-      LDKNetAddress_LDKIPv4_Body i_pv4;
-      LDKNetAddress_LDKIPv6_Body i_pv6;
+      LDKSocketAddress_LDKTcpIpV4_Body tcp_ip_v4;
+      LDKSocketAddress_LDKTcpIpV6_Body tcp_ip_v6;
       struct {
          struct LDKTwelveBytes onion_v2;
       };
-      LDKNetAddress_LDKOnionV3_Body onion_v3;
-      LDKNetAddress_LDKHostname_Body hostname;
+      LDKSocketAddress_LDKOnionV3_Body onion_v3;
+      LDKSocketAddress_LDKHostname_Body hostname;
    };
-} LDKNetAddress;
+} LDKSocketAddress;
 
 /**
- * A dynamically-allocated array of crate::lightning::ln::msgs::NetAddresss of arbitrary size.
+ * A dynamically-allocated array of crate::lightning::ln::msgs::SocketAddresss of arbitrary size.
  * This corresponds to std::vector in C++
  */
-typedef struct LDKCVec_NetAddressZ {
+typedef struct LDKCVec_SocketAddressZ {
    /**
     * The elements in the array.
     * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   struct LDKNetAddress *data;
+   struct LDKSocketAddress *data;
    /**
     * The number of elements pointed to by `data`.
     */
    uintptr_t datalen;
-} LDKCVec_NetAddressZ;
+} LDKCVec_SocketAddressZ;
 
 
 
@@ -7257,58 +9073,138 @@ typedef struct LDKCResult_NetworkGraphDecodeErrorZ {
 } LDKCResult_NetworkGraphDecodeErrorZ;
 
 /**
- * An enum which can either contain a crate::c_types::derived::CVec_NetAddressZ or not
+ * An enum which can either contain a crate::c_types::derived::CVec_SocketAddressZ or not
  */
-typedef enum LDKCOption_CVec_NetAddressZZ_Tag {
+typedef enum LDKCOption_CVec_SocketAddressZZ_Tag {
    /**
-    * When we're in this state, this COption_CVec_NetAddressZZ contains a crate::c_types::derived::CVec_NetAddressZ
+    * When we're in this state, this COption_CVec_SocketAddressZZ contains a crate::c_types::derived::CVec_SocketAddressZ
     */
-   LDKCOption_CVec_NetAddressZZ_Some,
+   LDKCOption_CVec_SocketAddressZZ_Some,
    /**
-    * When we're in this state, this COption_CVec_NetAddressZZ contains nothing
+    * When we're in this state, this COption_CVec_SocketAddressZZ contains nothing
     */
-   LDKCOption_CVec_NetAddressZZ_None,
+   LDKCOption_CVec_SocketAddressZZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_CVec_NetAddressZZ_Sentinel,
-} LDKCOption_CVec_NetAddressZZ_Tag;
+   LDKCOption_CVec_SocketAddressZZ_Sentinel,
+} LDKCOption_CVec_SocketAddressZZ_Tag;
 
-typedef struct LDKCOption_CVec_NetAddressZZ {
-   LDKCOption_CVec_NetAddressZZ_Tag tag;
+typedef struct LDKCOption_CVec_SocketAddressZZ {
+   LDKCOption_CVec_SocketAddressZZ_Tag tag;
    union {
       struct {
-         struct LDKCVec_NetAddressZ some;
+         struct LDKCVec_SocketAddressZ some;
       };
    };
-} LDKCOption_CVec_NetAddressZZ;
+} LDKCOption_CVec_SocketAddressZZ;
 
 /**
- * An enum which can either contain a crate::c_types::ThirtyTwoBytes or not
+ * The contents of CResult_u64ShortChannelIdErrorZ
  */
-typedef enum LDKCOption_PaymentPreimageZ_Tag {
+typedef union LDKCResult_u64ShortChannelIdErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   uint64_t *result;
    /**
-    * When we're in this state, this COption_PaymentPreimageZ contains a crate::c_types::ThirtyTwoBytes
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   LDKCOption_PaymentPreimageZ_Some,
+   enum LDKShortChannelIdError *err;
+} LDKCResult_u64ShortChannelIdErrorZPtr;
+
+/**
+ * A CResult_u64ShortChannelIdErrorZ represents the result of a fallible operation,
+ * containing a u64 on success and a crate::lightning::util::scid_utils::ShortChannelIdError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_u64ShortChannelIdErrorZ {
    /**
-    * When we're in this state, this COption_PaymentPreimageZ contains nothing
+    * The contents of this CResult_u64ShortChannelIdErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
     */
-   LDKCOption_PaymentPreimageZ_None,
+   union LDKCResult_u64ShortChannelIdErrorZPtr contents;
    /**
-    * Must be last for serialization purposes
+    * Whether this CResult_u64ShortChannelIdErrorZ represents a success state.
     */
-   LDKCOption_PaymentPreimageZ_Sentinel,
-} LDKCOption_PaymentPreimageZ_Tag;
+   bool result_ok;
+} LDKCResult_u64ShortChannelIdErrorZ;
+
 
-typedef struct LDKCOption_PaymentPreimageZ {
-   LDKCOption_PaymentPreimageZ_Tag tag;
-   union {
-      struct {
-         struct LDKThirtyTwoBytes some;
-      };
-   };
-} LDKCOption_PaymentPreimageZ;
+
+/**
+ * Information about an incoming HTLC, including the [`PendingHTLCRouting`] describing where it
+ * should go next.
+ */
+typedef struct MUST_USE_STRUCT LDKPendingHTLCInfo {
+   /**
+    * 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.
+    */
+   LDKnativePendingHTLCInfo *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;
+} LDKPendingHTLCInfo;
+
+
+
+/**
+ * Invalid inbound onion payment.
+ */
+typedef struct MUST_USE_STRUCT LDKInboundHTLCErr {
+   /**
+    * 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.
+    */
+   LDKnativeInboundHTLCErr *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;
+} LDKInboundHTLCErr;
+
+/**
+ * The contents of CResult_PendingHTLCInfoInboundHTLCErrZ
+ */
+typedef union LDKCResult_PendingHTLCInfoInboundHTLCErrZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKPendingHTLCInfo *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   struct LDKInboundHTLCErr *err;
+} LDKCResult_PendingHTLCInfoInboundHTLCErrZPtr;
+
+/**
+ * A CResult_PendingHTLCInfoInboundHTLCErrZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channelmanager::PendingHTLCInfo on success and a crate::lightning::ln::onion_payment::InboundHTLCErr on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ {
+   /**
+    * The contents of this CResult_PendingHTLCInfoInboundHTLCErrZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_PendingHTLCInfoInboundHTLCErrZPtr contents;
+   /**
+    * Whether this CResult_PendingHTLCInfoInboundHTLCErrZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_PendingHTLCInfoInboundHTLCErrZ;
 
 /**
  * A dynamically-allocated array of crate::lightning::ln::chan_utils::HTLCOutputInCommitments of arbitrary size.
@@ -7327,7 +9223,7 @@ typedef struct LDKCVec_HTLCOutputInCommitmentZ {
 } LDKCVec_HTLCOutputInCommitmentZ;
 
 /**
- * A dynamically-allocated array of crate::lightning::events::bump_transaction::HTLCDescriptors of arbitrary size.
+ * A dynamically-allocated array of crate::lightning::sign::HTLCDescriptors of arbitrary size.
  * This corresponds to std::vector in C++
  */
 typedef struct LDKCVec_HTLCDescriptorZ {
@@ -7529,125 +9425,252 @@ typedef struct LDKCResult_CVec_UtxoZNoneZ {
    bool result_ok;
 } LDKCResult_CVec_UtxoZNoneZ;
 
+
+
 /**
- * An enum which can either contain a u16 or not
+ * An unknown payment context.
  */
-typedef enum LDKCOption_u16Z_Tag {
+typedef struct MUST_USE_STRUCT LDKUnknownPaymentContext {
    /**
-    * When we're in this state, this COption_u16Z contains a u16
+    * 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.
     */
-   LDKCOption_u16Z_Some,
+   LDKnativeUnknownPaymentContext *inner;
    /**
-    * When we're in this state, this COption_u16Z contains nothing
+    * 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.
     */
-   LDKCOption_u16Z_None,
+   bool is_owned;
+} LDKUnknownPaymentContext;
+
+
+
+/**
+ * The context of a payment made for an invoice requested from a BOLT 12 [`Offer`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+typedef struct MUST_USE_STRUCT LDKBolt12OfferContext {
+   /**
+    * 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.
+    */
+   LDKnativeBolt12OfferContext *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;
+} LDKBolt12OfferContext;
+
+
+
+/**
+ * The context of a payment made for an invoice sent for a BOLT 12 [`Refund`].
+ *
+ * [`Refund`]: crate::offers::refund::Refund
+ */
+typedef struct MUST_USE_STRUCT LDKBolt12RefundContext {
+   /**
+    * 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.
+    */
+   LDKnativeBolt12RefundContext *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;
+} LDKBolt12RefundContext;
+
+/**
+ * The context of an inbound payment, which is included in a [`BlindedPath`] via [`ReceiveTlvs`]
+ * and surfaced in [`PaymentPurpose`].
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * [`PaymentPurpose`]: crate::events::PaymentPurpose
+ */
+typedef enum LDKPaymentContext_Tag {
+   /**
+    * The payment context was unknown.
+    */
+   LDKPaymentContext_Unknown,
+   /**
+    * The payment was made for an invoice requested from a BOLT 12 [`Offer`].
+    *
+    * [`Offer`]: crate::offers::offer::Offer
+    */
+   LDKPaymentContext_Bolt12Offer,
+   /**
+    * The payment was made for an invoice sent for a BOLT 12 [`Refund`].
+    *
+    * [`Refund`]: crate::offers::refund::Refund
+    */
+   LDKPaymentContext_Bolt12Refund,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_u16Z_Sentinel,
-} LDKCOption_u16Z_Tag;
+   LDKPaymentContext_Sentinel,
+} LDKPaymentContext_Tag;
 
-typedef struct LDKCOption_u16Z {
-   LDKCOption_u16Z_Tag tag;
+typedef struct MUST_USE_STRUCT LDKPaymentContext {
+   LDKPaymentContext_Tag tag;
    union {
       struct {
-         uint16_t some;
+         struct LDKUnknownPaymentContext unknown;
+      };
+      struct {
+         struct LDKBolt12OfferContext bolt12_offer;
+      };
+      struct {
+         struct LDKBolt12RefundContext bolt12_refund;
       };
    };
-} LDKCOption_u16Z;
+} LDKPaymentContext;
 
 /**
- * An enum which can either contain a crate::lightning::ln::channelmanager::ChannelShutdownState or not
+ * An enum which can either contain a crate::lightning::blinded_path::payment::PaymentContext or not
  */
-typedef enum LDKCOption_ChannelShutdownStateZ_Tag {
+typedef enum LDKCOption_PaymentContextZ_Tag {
    /**
-    * When we're in this state, this COption_ChannelShutdownStateZ contains a crate::lightning::ln::channelmanager::ChannelShutdownState
+    * When we're in this state, this COption_PaymentContextZ contains a crate::lightning::blinded_path::payment::PaymentContext
     */
-   LDKCOption_ChannelShutdownStateZ_Some,
+   LDKCOption_PaymentContextZ_Some,
    /**
-    * When we're in this state, this COption_ChannelShutdownStateZ contains nothing
+    * When we're in this state, this COption_PaymentContextZ contains nothing
     */
-   LDKCOption_ChannelShutdownStateZ_None,
+   LDKCOption_PaymentContextZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_ChannelShutdownStateZ_Sentinel,
-} LDKCOption_ChannelShutdownStateZ_Tag;
+   LDKCOption_PaymentContextZ_Sentinel,
+} LDKCOption_PaymentContextZ_Tag;
 
-typedef struct LDKCOption_ChannelShutdownStateZ {
-   LDKCOption_ChannelShutdownStateZ_Tag tag;
+typedef struct LDKCOption_PaymentContextZ {
+   LDKCOption_PaymentContextZ_Tag tag;
    union {
       struct {
-         enum LDKChannelShutdownState some;
+         struct LDKPaymentContext some;
       };
    };
-} LDKCOption_ChannelShutdownStateZ;
+} LDKCOption_PaymentContextZ;
 
 /**
- * An enum which can either contain a crate::c_types::ThirtyTwoBytes or not
+ * A tuple of 2 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC2Tuple_u64u16Z {
+   /**
+    * The element at position 0
+    */
+   uint64_t a;
+   /**
+    * The element at position 1
+    */
+   uint16_t b;
+} LDKC2Tuple_u64u16Z;
+
+/**
+ * An enum which can either contain a crate::c_types::derived::C2Tuple_u64u16Z or not
  */
-typedef enum LDKCOption_PaymentHashZ_Tag {
+typedef enum LDKCOption_C2Tuple_u64u16ZZ_Tag {
    /**
-    * When we're in this state, this COption_PaymentHashZ contains a crate::c_types::ThirtyTwoBytes
+    * When we're in this state, this COption_C2Tuple_u64u16ZZ contains a crate::c_types::derived::C2Tuple_u64u16Z
     */
-   LDKCOption_PaymentHashZ_Some,
+   LDKCOption_C2Tuple_u64u16ZZ_Some,
    /**
-    * When we're in this state, this COption_PaymentHashZ contains nothing
+    * When we're in this state, this COption_C2Tuple_u64u16ZZ contains nothing
     */
-   LDKCOption_PaymentHashZ_None,
+   LDKCOption_C2Tuple_u64u16ZZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_PaymentHashZ_Sentinel,
-} LDKCOption_PaymentHashZ_Tag;
+   LDKCOption_C2Tuple_u64u16ZZ_Sentinel,
+} LDKCOption_C2Tuple_u64u16ZZ_Tag;
 
-typedef struct LDKCOption_PaymentHashZ {
-   LDKCOption_PaymentHashZ_Tag tag;
+typedef struct LDKCOption_C2Tuple_u64u16ZZ {
+   LDKCOption_C2Tuple_u64u16ZZ_Tag tag;
    union {
       struct {
-         struct LDKThirtyTwoBytes some;
+         struct LDKC2Tuple_u64u16Z some;
+      };
+   };
+} LDKCOption_C2Tuple_u64u16ZZ;
+
+/**
+ * An enum which can either contain a crate::lightning::ln::channelmanager::ChannelShutdownState or not
+ */
+typedef enum LDKCOption_ChannelShutdownStateZ_Tag {
+   /**
+    * When we're in this state, this COption_ChannelShutdownStateZ contains a crate::lightning::ln::channelmanager::ChannelShutdownState
+    */
+   LDKCOption_ChannelShutdownStateZ_Some,
+   /**
+    * When we're in this state, this COption_ChannelShutdownStateZ contains nothing
+    */
+   LDKCOption_ChannelShutdownStateZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_ChannelShutdownStateZ_Sentinel,
+} LDKCOption_ChannelShutdownStateZ_Tag;
+
+typedef struct LDKCOption_ChannelShutdownStateZ {
+   LDKCOption_ChannelShutdownStateZ_Tag tag;
+   union {
+      struct {
+         enum LDKChannelShutdownState some;
       };
    };
-} LDKCOption_PaymentHashZ;
+} LDKCOption_ChannelShutdownStateZ;
 
 /**
- * The contents of CResult__u832APIErrorZ
+ * The contents of CResult_ChannelIdAPIErrorZ
  */
-typedef union LDKCResult__u832APIErrorZPtr {
+typedef union LDKCResult_ChannelIdAPIErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKThirtyTwoBytes *result;
+   struct LDKChannelId *result;
    /**
     * A pointer to the contents in the error state.
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    struct LDKAPIError *err;
-} LDKCResult__u832APIErrorZPtr;
+} LDKCResult_ChannelIdAPIErrorZPtr;
 
 /**
- * A CResult__u832APIErrorZ represents the result of a fallible operation,
- * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning::util::errors::APIError on failure.
+ * A CResult_ChannelIdAPIErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::types::ChannelId on success and a crate::lightning::util::errors::APIError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult__u832APIErrorZ {
+typedef struct LDKCResult_ChannelIdAPIErrorZ {
    /**
-    * The contents of this CResult__u832APIErrorZ, accessible via either
+    * The contents of this CResult_ChannelIdAPIErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult__u832APIErrorZPtr contents;
+   union LDKCResult_ChannelIdAPIErrorZPtr contents;
    /**
-    * Whether this CResult__u832APIErrorZ represents a success state.
+    * Whether this CResult_ChannelIdAPIErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult__u832APIErrorZ;
+} LDKCResult_ChannelIdAPIErrorZ;
 
 /**
  * Used by [`ChannelManager::list_recent_payments`] to express the status of recent payments.
  * These include payments that have yet to find a successful path, or have unresolved HTLCs.
  */
 typedef enum LDKRecentPaymentDetails_Tag {
+   /**
+    * When an invoice was requested and thus a payment has not yet been sent.
+    */
+   LDKRecentPaymentDetails_AwaitingInvoice,
    /**
     * When a payment is still being sent and awaiting successful delivery.
     */
@@ -7670,7 +9693,20 @@ typedef enum LDKRecentPaymentDetails_Tag {
    LDKRecentPaymentDetails_Sentinel,
 } LDKRecentPaymentDetails_Tag;
 
+typedef struct LDKRecentPaymentDetails_LDKAwaitingInvoice_Body {
+   /**
+    * A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
+    * a payment and ensure idempotency in LDK.
+    */
+   struct LDKThirtyTwoBytes payment_id;
+} LDKRecentPaymentDetails_LDKAwaitingInvoice_Body;
+
 typedef struct LDKRecentPaymentDetails_LDKPending_Body {
+   /**
+    * A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
+    * a payment and ensure idempotency in LDK.
+    */
+   struct LDKThirtyTwoBytes payment_id;
    /**
     * Hash of the payment that is currently being sent but has yet to be fulfilled or
     * abandoned.
@@ -7684,14 +9720,24 @@ typedef struct LDKRecentPaymentDetails_LDKPending_Body {
 } LDKRecentPaymentDetails_LDKPending_Body;
 
 typedef struct LDKRecentPaymentDetails_LDKFulfilled_Body {
+   /**
+    * A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
+    * a payment and ensure idempotency in LDK.
+    */
+   struct LDKThirtyTwoBytes payment_id;
    /**
     * Hash of the payment that was claimed. `None` for serializations of [`ChannelManager`]
     * made before LDK version 0.0.104.
     */
-   struct LDKCOption_PaymentHashZ payment_hash;
+   struct LDKCOption_ThirtyTwoBytesZ payment_hash;
 } LDKRecentPaymentDetails_LDKFulfilled_Body;
 
 typedef struct LDKRecentPaymentDetails_LDKAbandoned_Body {
+   /**
+    * A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
+    * a payment and ensure idempotency in LDK.
+    */
+   struct LDKThirtyTwoBytes payment_id;
    /**
     * Hash of the payment that we have given up trying to send.
     */
@@ -7701,6 +9747,7 @@ typedef struct LDKRecentPaymentDetails_LDKAbandoned_Body {
 typedef struct MUST_USE_STRUCT LDKRecentPaymentDetails {
    LDKRecentPaymentDetails_Tag tag;
    union {
+      LDKRecentPaymentDetails_LDKAwaitingInvoice_Body awaiting_invoice;
       LDKRecentPaymentDetails_LDKPending_Body pending;
       LDKRecentPaymentDetails_LDKFulfilled_Body fulfilled;
       LDKRecentPaymentDetails_LDKAbandoned_Body abandoned;
@@ -7899,9 +9946,9 @@ typedef struct LDKCResult_NoneRetryableSendFailureZ {
 } LDKCResult_NoneRetryableSendFailureZ;
 
 /**
- * The contents of CResult_PaymentHashPaymentSendFailureZ
+ * The contents of CResult_ThirtyTwoBytesPaymentSendFailureZ
  */
-typedef union LDKCResult_PaymentHashPaymentSendFailureZPtr {
+typedef union LDKCResult_ThirtyTwoBytesPaymentSendFailureZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
@@ -7912,29 +9959,29 @@ typedef union LDKCResult_PaymentHashPaymentSendFailureZPtr {
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    struct LDKPaymentSendFailure *err;
-} LDKCResult_PaymentHashPaymentSendFailureZPtr;
+} LDKCResult_ThirtyTwoBytesPaymentSendFailureZPtr;
 
 /**
- * A CResult_PaymentHashPaymentSendFailureZ represents the result of a fallible operation,
+ * A CResult_ThirtyTwoBytesPaymentSendFailureZ represents the result of a fallible operation,
  * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning::ln::outbound_payment::PaymentSendFailure on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_PaymentHashPaymentSendFailureZ {
+typedef struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ {
    /**
-    * The contents of this CResult_PaymentHashPaymentSendFailureZ, accessible via either
+    * The contents of this CResult_ThirtyTwoBytesPaymentSendFailureZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_PaymentHashPaymentSendFailureZPtr contents;
+   union LDKCResult_ThirtyTwoBytesPaymentSendFailureZPtr contents;
    /**
-    * Whether this CResult_PaymentHashPaymentSendFailureZ represents a success state.
+    * Whether this CResult_ThirtyTwoBytesPaymentSendFailureZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_PaymentHashPaymentSendFailureZ;
+} LDKCResult_ThirtyTwoBytesPaymentSendFailureZ;
 
 /**
- * The contents of CResult_PaymentHashRetryableSendFailureZ
+ * The contents of CResult_ThirtyTwoBytesRetryableSendFailureZ
  */
-typedef union LDKCResult_PaymentHashRetryableSendFailureZPtr {
+typedef union LDKCResult_ThirtyTwoBytesRetryableSendFailureZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
@@ -7945,29 +9992,29 @@ typedef union LDKCResult_PaymentHashRetryableSendFailureZPtr {
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    enum LDKRetryableSendFailure *err;
-} LDKCResult_PaymentHashRetryableSendFailureZPtr;
+} LDKCResult_ThirtyTwoBytesRetryableSendFailureZPtr;
 
 /**
- * A CResult_PaymentHashRetryableSendFailureZ represents the result of a fallible operation,
+ * A CResult_ThirtyTwoBytesRetryableSendFailureZ represents the result of a fallible operation,
  * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning::ln::outbound_payment::RetryableSendFailure on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_PaymentHashRetryableSendFailureZ {
+typedef struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ {
    /**
-    * The contents of this CResult_PaymentHashRetryableSendFailureZ, accessible via either
+    * The contents of this CResult_ThirtyTwoBytesRetryableSendFailureZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_PaymentHashRetryableSendFailureZPtr contents;
+   union LDKCResult_ThirtyTwoBytesRetryableSendFailureZPtr contents;
    /**
-    * Whether this CResult_PaymentHashRetryableSendFailureZ represents a success state.
+    * Whether this CResult_ThirtyTwoBytesRetryableSendFailureZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_PaymentHashRetryableSendFailureZ;
+} LDKCResult_ThirtyTwoBytesRetryableSendFailureZ;
 
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_PaymentHashPaymentIdZ {
+typedef struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ {
    /**
     * The element at position 0
     */
@@ -7976,139 +10023,286 @@ typedef struct LDKC2Tuple_PaymentHashPaymentIdZ {
     * The element at position 1
     */
    struct LDKThirtyTwoBytes b;
-} LDKC2Tuple_PaymentHashPaymentIdZ;
+} LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ;
 
 /**
- * The contents of CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ
+ * The contents of CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ
  */
-typedef union LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZPtr {
+typedef union LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKC2Tuple_PaymentHashPaymentIdZ *result;
+   struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ *result;
    /**
     * A pointer to the contents in the error state.
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    struct LDKPaymentSendFailure *err;
-} LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZPtr;
+} LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZPtr;
 
 /**
- * A CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::C2Tuple_PaymentHashPaymentIdZ on success and a crate::lightning::ln::outbound_payment::PaymentSendFailure on failure.
+ * A CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ on success and a crate::lightning::ln::outbound_payment::PaymentSendFailure on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ {
+typedef struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ {
    /**
-    * The contents of this CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ, accessible via either
+    * The contents of this CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZPtr contents;
+   union LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZPtr contents;
    /**
-    * Whether this CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ represents a success state.
+    * Whether this CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ;
+} LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::ThirtyTwoBytess of arbitrary size.
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesThirtyTwoBytesZs of arbitrary size.
  * This corresponds to std::vector in C++
  */
-typedef struct LDKCVec_ThirtyTwoBytesZ {
+typedef struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ {
    /**
     * The elements in the array.
     * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   struct LDKThirtyTwoBytes *data;
+   struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ *data;
    /**
     * The number of elements pointed to by `data`.
     */
    uintptr_t datalen;
-} LDKCVec_ThirtyTwoBytesZ;
+} LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ;
+
+/**
+ * Indicates that we failed to send a payment probe. Further errors may be surfaced later via
+ * [`Event::ProbeFailed`].
+ *
+ * [`Event::ProbeFailed`]: crate::events::Event::ProbeFailed
+ */
+typedef enum LDKProbeSendFailure_Tag {
+   /**
+    * We were unable to find a route to the destination.
+    */
+   LDKProbeSendFailure_RouteNotFound,
+   /**
+    * We failed to send the payment probes.
+    */
+   LDKProbeSendFailure_SendingFailed,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKProbeSendFailure_Sentinel,
+} LDKProbeSendFailure_Tag;
+
+typedef struct MUST_USE_STRUCT LDKProbeSendFailure {
+   LDKProbeSendFailure_Tag tag;
+   union {
+      struct {
+         struct LDKPaymentSendFailure sending_failed;
+      };
+   };
+} LDKProbeSendFailure;
+
+/**
+ * The contents of CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ
+ */
+typedef union LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   struct LDKProbeSendFailure *err;
+} LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZPtr;
+
+/**
+ * A CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ on success and a crate::lightning::ln::outbound_payment::ProbeSendFailure on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ {
+   /**
+    * The contents of this CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZPtr contents;
+   /**
+    * Whether this CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ;
 
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_PaymentHashPaymentSecretZ {
+typedef struct LDKC2Tuple_ChannelIdPublicKeyZ {
    /**
     * The element at position 0
     */
-   struct LDKThirtyTwoBytes a;
+   struct LDKChannelId a;
    /**
     * The element at position 1
     */
-   struct LDKThirtyTwoBytes b;
-} LDKC2Tuple_PaymentHashPaymentSecretZ;
+   struct LDKPublicKey b;
+} LDKC2Tuple_ChannelIdPublicKeyZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_ChannelIdPublicKeyZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC2Tuple_ChannelIdPublicKeyZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C2Tuple_ChannelIdPublicKeyZZ;
+
+/**
+ * A dynamically-allocated array of crate::lightning::ln::types::ChannelIds of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_ChannelIdZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKChannelId *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_ChannelIdZ;
+
+
+
+/**
+ * Builds an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
+ */
+typedef struct MUST_USE_STRUCT LDKOfferWithDerivedMetadataBuilder {
+   /**
+    * 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.
+    */
+   LDKnativeOfferWithDerivedMetadataBuilder *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;
+} LDKOfferWithDerivedMetadataBuilder;
 
 /**
- * The contents of CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ
+ * The contents of CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ
  */
-typedef union LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZPtr {
+typedef union LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKC2Tuple_PaymentHashPaymentSecretZ *result;
+   struct LDKOfferWithDerivedMetadataBuilder *result;
    /**
-    * Note that this value is always NULL, as there are no contents in the Err variant
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   void *err;
-} LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZPtr;
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZPtr;
 
 /**
- * A CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::C2Tuple_PaymentHashPaymentSecretZ on success and a () on failure.
+ * A CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::offer::OfferWithDerivedMetadataBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ {
+typedef struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ {
    /**
-    * The contents of this CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ, accessible via either
+    * The contents of this CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZPtr contents;
+   union LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZPtr contents;
    /**
-    * Whether this CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ represents a success state.
+    * Whether this CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ;
+} LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ;
+
+/**
+ * An enum which can either contain a crate::c_types::Str or not
+ */
+typedef enum LDKCOption_StrZ_Tag {
+   /**
+    * When we're in this state, this COption_StrZ contains a crate::c_types::Str
+    */
+   LDKCOption_StrZ_Some,
+   /**
+    * When we're in this state, this COption_StrZ contains nothing
+    */
+   LDKCOption_StrZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_StrZ_Sentinel,
+} LDKCOption_StrZ_Tag;
+
+typedef struct LDKCOption_StrZ {
+   LDKCOption_StrZ_Tag tag;
+   union {
+      struct {
+         struct LDKStr some;
+      };
+   };
+} LDKCOption_StrZ;
 
 /**
- * The contents of CResult_PaymentSecretNoneZ
+ * The contents of CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ
  */
-typedef union LDKCResult_PaymentSecretNoneZPtr {
+typedef union LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKThirtyTwoBytes *result;
+   struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ *result;
    /**
     * Note that this value is always NULL, as there are no contents in the Err variant
     */
    void *err;
-} LDKCResult_PaymentSecretNoneZPtr;
+} LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZPtr;
 
 /**
- * A CResult_PaymentSecretNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::ThirtyTwoBytes on success and a () on failure.
+ * A CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_PaymentSecretNoneZ {
+typedef struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ {
    /**
-    * The contents of this CResult_PaymentSecretNoneZ, accessible via either
+    * The contents of this CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_PaymentSecretNoneZPtr contents;
+   union LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZPtr contents;
    /**
-    * Whether this CResult_PaymentSecretNoneZ represents a success state.
+    * Whether this CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_PaymentSecretNoneZ;
+} LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ;
 
 /**
- * The contents of CResult_PaymentPreimageAPIErrorZ
+ * The contents of CResult_ThirtyTwoBytesAPIErrorZ
  */
-typedef union LDKCResult_PaymentPreimageAPIErrorZPtr {
+typedef union LDKCResult_ThirtyTwoBytesAPIErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
@@ -8119,51 +10313,207 @@ typedef union LDKCResult_PaymentPreimageAPIErrorZPtr {
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    struct LDKAPIError *err;
-} LDKCResult_PaymentPreimageAPIErrorZPtr;
+} LDKCResult_ThirtyTwoBytesAPIErrorZPtr;
 
 /**
- * A CResult_PaymentPreimageAPIErrorZ represents the result of a fallible operation,
+ * A CResult_ThirtyTwoBytesAPIErrorZ represents the result of a fallible operation,
  * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning::util::errors::APIError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_PaymentPreimageAPIErrorZ {
+typedef struct LDKCResult_ThirtyTwoBytesAPIErrorZ {
    /**
-    * The contents of this CResult_PaymentPreimageAPIErrorZ, accessible via either
+    * The contents of this CResult_ThirtyTwoBytesAPIErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_PaymentPreimageAPIErrorZPtr contents;
+   union LDKCResult_ThirtyTwoBytesAPIErrorZPtr contents;
    /**
-    * Whether this CResult_PaymentPreimageAPIErrorZ represents a success state.
+    * Whether this CResult_ThirtyTwoBytesAPIErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_PaymentPreimageAPIErrorZ;
+} LDKCResult_ThirtyTwoBytesAPIErrorZ;
+
+
+
+/**
+ * An `InvoiceRequest` is a request for a [`Bolt12Invoice`] formulated from an [`Offer`].
+ *
+ * An offer may provide choices such as quantity, amount, chain, features, etc. An invoice request
+ * specifies these such that its recipient can send an invoice for payment.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+typedef struct MUST_USE_STRUCT LDKInvoiceRequest {
+   /**
+    * 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.
+    */
+   LDKnativeInvoiceRequest *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;
+} LDKInvoiceRequest;
+
+
+
+/**
+ * An error in response to an [`InvoiceRequest`] or an [`Bolt12Invoice`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+typedef struct MUST_USE_STRUCT LDKInvoiceError {
+   /**
+    * 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.
+    */
+   LDKnativeInvoiceError *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;
+} LDKInvoiceError;
+
+/**
+ * Possible BOLT 12 Offers messages sent and received via an [`OnionMessage`].
+ *
+ * [`OnionMessage`]: crate::ln::msgs::OnionMessage
+ */
+typedef enum LDKOffersMessage_Tag {
+   /**
+    * A request for a [`Bolt12Invoice`] for a particular [`Offer`].
+    *
+    * [`Offer`]: crate::offers::offer::Offer
+    */
+   LDKOffersMessage_InvoiceRequest,
+   /**
+    * A [`Bolt12Invoice`] sent in response to an [`InvoiceRequest`] or a [`Refund`].
+    *
+    * [`Refund`]: crate::offers::refund::Refund
+    */
+   LDKOffersMessage_Invoice,
+   /**
+    * An error from handling an [`OffersMessage`].
+    */
+   LDKOffersMessage_InvoiceError,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKOffersMessage_Sentinel,
+} LDKOffersMessage_Tag;
+
+typedef struct MUST_USE_STRUCT LDKOffersMessage {
+   LDKOffersMessage_Tag tag;
+   union {
+      struct {
+         struct LDKInvoiceRequest invoice_request;
+      };
+      struct {
+         struct LDKBolt12Invoice invoice;
+      };
+      struct {
+         struct LDKInvoiceError invoice_error;
+      };
+   };
+} LDKOffersMessage;
+
+/**
+ * An enum which can either contain a crate::lightning::onion_message::offers::OffersMessage or not
+ */
+typedef enum LDKCOption_OffersMessageZ_Tag {
+   /**
+    * When we're in this state, this COption_OffersMessageZ contains a crate::lightning::onion_message::offers::OffersMessage
+    */
+   LDKCOption_OffersMessageZ_Some,
+   /**
+    * When we're in this state, this COption_OffersMessageZ contains nothing
+    */
+   LDKCOption_OffersMessageZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_OffersMessageZ_Sentinel,
+} LDKCOption_OffersMessageZ_Tag;
+
+typedef struct LDKCOption_OffersMessageZ {
+   LDKCOption_OffersMessageZ_Tag tag;
+   union {
+      struct {
+         struct LDKOffersMessage some;
+      };
+   };
+} LDKCOption_OffersMessageZ;
 
 /**
- * An enum which can either contain a crate::c_types::derived::CVec_ChainHashZ or not
+ * The destination of an onion message.
  */
-typedef enum LDKCOption_CVec_ChainHashZZ_Tag {
+typedef enum LDKDestination_Tag {
    /**
-    * When we're in this state, this COption_CVec_ChainHashZZ contains a crate::c_types::derived::CVec_ChainHashZ
+    * We're sending this onion message to a node.
     */
-   LDKCOption_CVec_ChainHashZZ_Some,
+   LDKDestination_Node,
    /**
-    * When we're in this state, this COption_CVec_ChainHashZZ contains nothing
+    * We're sending this onion message to a blinded path.
     */
-   LDKCOption_CVec_ChainHashZZ_None,
+   LDKDestination_BlindedPath,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_CVec_ChainHashZZ_Sentinel,
-} LDKCOption_CVec_ChainHashZZ_Tag;
+   LDKDestination_Sentinel,
+} LDKDestination_Tag;
 
-typedef struct LDKCOption_CVec_ChainHashZZ {
-   LDKCOption_CVec_ChainHashZZ_Tag tag;
+typedef struct MUST_USE_STRUCT LDKDestination {
+   LDKDestination_Tag tag;
    union {
       struct {
-         struct LDKCVec_ChainHashZ some;
+         struct LDKPublicKey node;
+      };
+      struct {
+         struct LDKBlindedPath blinded_path;
       };
    };
-} LDKCOption_CVec_ChainHashZZ;
+} LDKDestination;
+
+/**
+ * A tuple of 3 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC3Tuple_OffersMessageDestinationBlindedPathZ {
+   /**
+    * The element at position 0
+    */
+   struct LDKOffersMessage a;
+   /**
+    * The element at position 1
+    */
+   struct LDKDestination b;
+   /**
+    * The element at position 2
+    */
+   struct LDKBlindedPath c;
+} LDKC3Tuple_OffersMessageDestinationBlindedPathZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C3Tuple_OffersMessageDestinationBlindedPathZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC3Tuple_OffersMessageDestinationBlindedPathZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ;
 
 
 
@@ -8360,6 +10710,349 @@ typedef struct LDKCResult_PhantomRouteHintsDecodeErrorZ {
    bool result_ok;
 } LDKCResult_PhantomRouteHintsDecodeErrorZ;
 
+
+
+/**
+ * Information used to forward or fail this HTLC that is being forwarded within a blinded path.
+ */
+typedef struct MUST_USE_STRUCT LDKBlindedForward {
+   /**
+    * 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.
+    */
+   LDKnativeBlindedForward *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;
+} LDKBlindedForward;
+
+/**
+ * The contents of CResult_BlindedForwardDecodeErrorZ
+ */
+typedef union LDKCResult_BlindedForwardDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKBlindedForward *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_BlindedForwardDecodeErrorZPtr;
+
+/**
+ * A CResult_BlindedForwardDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channelmanager::BlindedForward 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_BlindedForwardDecodeErrorZ {
+   /**
+    * The contents of this CResult_BlindedForwardDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_BlindedForwardDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_BlindedForwardDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_BlindedForwardDecodeErrorZ;
+
+
+
+/**
+ * BOLT 4 onion packet including hop data for the next peer.
+ */
+typedef struct MUST_USE_STRUCT LDKOnionPacket {
+   /**
+    * 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.
+    */
+   LDKnativeOnionPacket *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;
+} LDKOnionPacket;
+
+
+
+/**
+ * Information communicated in the onion to the recipient for multi-part tracking and proof that
+ * the payment is associated with an invoice.
+ */
+typedef struct MUST_USE_STRUCT LDKFinalOnionHopData {
+   /**
+    * 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.
+    */
+   LDKnativeFinalOnionHopData *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;
+} LDKFinalOnionHopData;
+
+/**
+ * Information about where a received HTLC('s onion) has indicated the HTLC should go.
+ */
+typedef enum LDKPendingHTLCRouting_Tag {
+   /**
+    * An HTLC which should be forwarded on to another node.
+    */
+   LDKPendingHTLCRouting_Forward,
+   /**
+    * The onion indicates that this is a payment for an invoice (supposedly) generated by us.
+    *
+    * Note that at this point, we have not checked that the invoice being paid was actually
+    * generated by us, but rather it's claiming to pay an invoice of ours.
+    */
+   LDKPendingHTLCRouting_Receive,
+   /**
+    * The onion indicates that this is for payment to us but which contains the preimage for
+    * claiming included, and is unrelated to any invoice we'd previously generated (aka a
+    * \"keysend\" or \"spontaneous\" payment).
+    */
+   LDKPendingHTLCRouting_ReceiveKeysend,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKPendingHTLCRouting_Sentinel,
+} LDKPendingHTLCRouting_Tag;
+
+typedef struct LDKPendingHTLCRouting_LDKForward_Body {
+   /**
+    * The onion which should be included in the forwarded HTLC, telling the next hop what to
+    * do with the HTLC.
+    */
+   struct LDKOnionPacket onion_packet;
+   /**
+    * The short channel ID of the channel which we were instructed to forward this HTLC to.
+    *
+    * This could be a real on-chain SCID, an SCID alias, or some other SCID which has meaning
+    * to the receiving node, such as one returned from
+    * [`ChannelManager::get_intercept_scid`] or [`ChannelManager::get_phantom_scid`].
+    */
+   uint64_t short_channel_id;
+   /**
+    * Set if this HTLC is being forwarded within a blinded path.
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKBlindedForward blinded;
+} LDKPendingHTLCRouting_LDKForward_Body;
+
+typedef struct LDKPendingHTLCRouting_LDKReceive_Body {
+   /**
+    * Information about the amount the sender intended to pay and (potential) proof that this
+    * is a payment for an invoice we generated. This proof of payment is is also used for
+    * linking MPP parts of a larger payment.
+    */
+   struct LDKFinalOnionHopData payment_data;
+   /**
+    * Additional data which we (allegedly) instructed the sender to include in the onion.
+    *
+    * For HTLCs received by LDK, this will ultimately be exposed in
+    * [`Event::PaymentClaimable::onion_fields`] as
+    * [`RecipientOnionFields::payment_metadata`].
+    */
+   struct LDKCOption_CVec_u8ZZ payment_metadata;
+   /**
+    * The context of the payment included by the recipient in a blinded path, or `None` if a
+    * blinded path was not used.
+    *
+    * Used in part to determine the [`events::PaymentPurpose`].
+    */
+   struct LDKCOption_PaymentContextZ payment_context;
+   /**
+    * CLTV expiry of the received HTLC.
+    *
+    * Used to track when we should expire pending HTLCs that go unclaimed.
+    */
+   uint32_t incoming_cltv_expiry;
+   /**
+    * If the onion had forwarding instructions to one of our phantom node SCIDs, this will
+    * provide the onion shared secret used to decrypt the next level of forwarding
+    * instructions.
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKThirtyTwoBytes phantom_shared_secret;
+   /**
+    * Custom TLVs which were set by the sender.
+    *
+    * For HTLCs received by LDK, this will ultimately be exposed in
+    * [`Event::PaymentClaimable::onion_fields`] as
+    * [`RecipientOnionFields::custom_tlvs`].
+    */
+   struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs;
+   /**
+    * Set if this HTLC is the final hop in a multi-hop blinded path.
+    */
+   bool requires_blinded_error;
+} LDKPendingHTLCRouting_LDKReceive_Body;
+
+typedef struct LDKPendingHTLCRouting_LDKReceiveKeysend_Body {
+   /**
+    * Information about the amount the sender intended to pay and possibly a token to
+    * associate MPP parts of a larger payment.
+    *
+    * This will only be filled in if receiving MPP keysend payments is enabled, and it being
+    * present will cause deserialization to fail on versions of LDK prior to 0.0.116.
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKFinalOnionHopData payment_data;
+   /**
+    * Preimage for this onion payment. This preimage is provided by the sender and will be
+    * used to settle the spontaneous payment.
+    */
+   struct LDKThirtyTwoBytes payment_preimage;
+   /**
+    * Additional data which we (allegedly) instructed the sender to include in the onion.
+    *
+    * For HTLCs received by LDK, this will ultimately bubble back up as
+    * [`RecipientOnionFields::payment_metadata`].
+    */
+   struct LDKCOption_CVec_u8ZZ payment_metadata;
+   /**
+    * CLTV expiry of the received HTLC.
+    *
+    * Used to track when we should expire pending HTLCs that go unclaimed.
+    */
+   uint32_t incoming_cltv_expiry;
+   /**
+    * Custom TLVs which were set by the sender.
+    *
+    * For HTLCs received by LDK, these will ultimately bubble back up as
+    * [`RecipientOnionFields::custom_tlvs`].
+    */
+   struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs;
+   /**
+    * Set if this HTLC is the final hop in a multi-hop blinded path.
+    */
+   bool requires_blinded_error;
+} LDKPendingHTLCRouting_LDKReceiveKeysend_Body;
+
+typedef struct MUST_USE_STRUCT LDKPendingHTLCRouting {
+   LDKPendingHTLCRouting_Tag tag;
+   union {
+      LDKPendingHTLCRouting_LDKForward_Body forward;
+      LDKPendingHTLCRouting_LDKReceive_Body receive;
+      LDKPendingHTLCRouting_LDKReceiveKeysend_Body receive_keysend;
+   };
+} LDKPendingHTLCRouting;
+
+/**
+ * The contents of CResult_PendingHTLCRoutingDecodeErrorZ
+ */
+typedef union LDKCResult_PendingHTLCRoutingDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKPendingHTLCRouting *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_PendingHTLCRoutingDecodeErrorZPtr;
+
+/**
+ * A CResult_PendingHTLCRoutingDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channelmanager::PendingHTLCRouting 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_PendingHTLCRoutingDecodeErrorZ {
+   /**
+    * The contents of this CResult_PendingHTLCRoutingDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_PendingHTLCRoutingDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_PendingHTLCRoutingDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_PendingHTLCRoutingDecodeErrorZ;
+
+/**
+ * The contents of CResult_PendingHTLCInfoDecodeErrorZ
+ */
+typedef union LDKCResult_PendingHTLCInfoDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKPendingHTLCInfo *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_PendingHTLCInfoDecodeErrorZPtr;
+
+/**
+ * A CResult_PendingHTLCInfoDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channelmanager::PendingHTLCInfo 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_PendingHTLCInfoDecodeErrorZ {
+   /**
+    * The contents of this CResult_PendingHTLCInfoDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_PendingHTLCInfoDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_PendingHTLCInfoDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_PendingHTLCInfoDecodeErrorZ;
+
+/**
+ * The contents of CResult_BlindedFailureDecodeErrorZ
+ */
+typedef union LDKCResult_BlindedFailureDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   enum LDKBlindedFailure *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_BlindedFailureDecodeErrorZPtr;
+
+/**
+ * A CResult_BlindedFailureDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channelmanager::BlindedFailure 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_BlindedFailureDecodeErrorZ {
+   /**
+    * The contents of this CResult_BlindedFailureDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_BlindedFailureDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_BlindedFailureDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_BlindedFailureDecodeErrorZ;
+
 /**
  * The contents of CResult_ChannelShutdownStateDecodeErrorZ
  */
@@ -8470,21 +11163,12 @@ typedef struct MUST_USE_STRUCT LDKChannelMonitorUpdate {
  * blocks are connected and disconnected.
  *
  * Each channel is associated with a [`ChannelMonitor`]. Implementations of this trait are
- * responsible for maintaining a set of monitors such that they can be updated accordingly as
- * channel state changes and HTLCs are resolved. See method documentation for specific
- * requirements.
- *
- * Implementations **must** ensure that updates are successfully applied and persisted upon method
- * completion. If an update fails with a [`PermanentFailure`], then it must immediately shut down
- * without taking any further action such as persisting the current state.
- *
- * If an implementation maintains multiple instances of a channel's monitor (e.g., by storing
- * backup copies), then it must ensure that updates are applied across all instances. Otherwise, it
- * could result in a revoked transaction being broadcast, allowing the counterparty to claim all
- * funds in the channel. See [`ChannelMonitorUpdateStatus`] for more details about how to handle
- * multiple instances.
+ * responsible for maintaining a set of monitors such that they can be updated as channel state
+ * changes. On each update, *all copies* of a [`ChannelMonitor`] must be updated and the update
+ * persisted to disk to ensure that the latest [`ChannelMonitor`] state can be reloaded if the
+ * application crashes.
  *
- * [`PermanentFailure`]: ChannelMonitorUpdateStatus::PermanentFailure
+ * See method documentation and [`ChannelMonitorUpdateStatus`] for specific requirements.
  */
 typedef struct LDKWatch {
    /**
@@ -8499,21 +11183,33 @@ typedef struct LDKWatch {
     * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
     * calling [`block_connected`] and [`block_disconnected`] on the monitor.
     *
-    * Note: this interface MUST error with [`ChannelMonitorUpdateStatus::PermanentFailure`] if
-    * the given `funding_txo` has previously been registered via `watch_channel`.
+    * A return of `Err(())` indicates that the channel should immediately be force-closed without
+    * broadcasting the funding transaction.
+    *
+    * If the given `funding_txo` has previously been registered via `watch_channel`, `Err(())`
+    * must be returned.
     *
     * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch
     * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected
     * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
     */
-   enum LDKChannelMonitorUpdateStatus (*watch_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor);
+   struct LDKCResult_ChannelMonitorUpdateStatusNoneZ (*watch_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor);
    /**
     * Updates a channel identified by `funding_txo` by applying `update` to its monitor.
     *
-    * Implementations must call [`update_monitor`] with the given update. See
-    * [`ChannelMonitorUpdateStatus`] for invariants around returning an error.
+    * Implementations must call [`ChannelMonitor::update_monitor`] with the given update. This
+    * may fail (returning an `Err(())`), in which case this should return
+    * [`ChannelMonitorUpdateStatus::InProgress`] (and the update should never complete). This
+    * generally implies the channel has been closed (either by the funding outpoint being spent
+    * on-chain or the [`ChannelMonitor`] having decided to do so and broadcasted a transaction),
+    * and the [`ChannelManager`] state will be updated once it sees the funding spend on-chain.
+    *
+    * In general, persistence failures should be retried after returning
+    * [`ChannelMonitorUpdateStatus::InProgress`] and eventually complete. If a failure truly
+    * cannot be retried, the node should shut down immediately after returning
+    * [`ChannelMonitorUpdateStatus::UnrecoverableError`], see its documentation for more info.
     *
-    * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
+    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
     */
    enum LDKChannelMonitorUpdateStatus (*update_channel)(const void *this_arg, struct LDKOutPoint funding_txo, const struct LDKChannelMonitorUpdate *NONNULL_PTR update);
    /**
@@ -8527,7 +11223,7 @@ typedef struct LDKWatch {
     * For details on asynchronous [`ChannelMonitor`] updating and returning
     * [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].
     */
-   struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ (*release_pending_monitor_events)(const void *this_arg);
+   struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ (*release_pending_monitor_events)(const void *this_arg);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -8573,7 +11269,7 @@ typedef struct LDKBroadcasterInterface {
     * be sure to manage both cases correctly.
     *
     * Bitcoin transaction packages are defined in BIP 331 and here:
-    * https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md
+    * <https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md>
     */
    void (*broadcast_transactions)(const void *this_arg, struct LDKCVec_TransactionZ txs);
    /**
@@ -8604,20 +11300,30 @@ typedef struct LDKEntropySource {
    void (*free)(void *this_arg);
 } LDKEntropySource;
 
+
+
 /**
- * A "slice" referencing some byte array. This is simply a length-tagged pointer which does not
- * own the memory pointed to by data.
+ * A semantically valid [`InvoiceRequest`] that hasn't been signed.
+ *
+ * # Serialization
+ *
+ * This is serialized as a TLV stream, which includes TLV records from the originating message. As
+ * such, it may include unknown, odd TLV records.
  */
-typedef struct LDKu8slice {
+typedef struct MUST_USE_STRUCT LDKUnsignedInvoiceRequest {
    /**
-    * A pointer to the byte buffer
+    * 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.
     */
-   const uint8_t *data;
+   LDKnativeUnsignedInvoiceRequest *inner;
    /**
-    * The number of bytes pointed to by `data`.
+    * 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.
     */
-   uintptr_t datalen;
-} LDKu8slice;
+   bool is_owned;
+} LDKUnsignedInvoiceRequest;
 
 
 
@@ -8740,7 +11446,7 @@ typedef struct LDKNodeSigner {
     *
     * Errors if the [`Recipient`] variant is not supported by the implementation.
     */
-   struct LDKCResult_SharedSecretNoneZ (*ecdh)(const void *this_arg, enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_ScalarZ tweak);
+   struct LDKCResult_ThirtyTwoBytesNoneZ (*ecdh)(const void *this_arg, enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_BigEndianScalarZ tweak);
    /**
     * Sign an invoice.
     *
@@ -8755,6 +11461,34 @@ typedef struct LDKNodeSigner {
     * Errors if the [`Recipient`] variant is not supported by the implementation.
     */
    struct LDKCResult_RecoverableSignatureNoneZ (*sign_invoice)(const void *this_arg, struct LDKu8slice hrp_bytes, struct LDKCVec_U5Z invoice_data, enum LDKRecipient recipient);
+   /**
+    * Signs the [`TaggedHash`] of a BOLT 12 invoice request.
+    *
+    * May be called by a function passed to [`UnsignedInvoiceRequest::sign`] where
+    * `invoice_request` is the callee.
+    *
+    * Implementors may check that the `invoice_request` is expected rather than blindly signing
+    * the tagged hash. An `Ok` result should sign `invoice_request.tagged_hash().as_digest()` with
+    * the node's signing key or an ephemeral key to preserve privacy, whichever is associated with
+    * [`UnsignedInvoiceRequest::payer_id`].
+    *
+    * [`TaggedHash`]: crate::offers::merkle::TaggedHash
+    */
+   struct LDKCResult_SchnorrSignatureNoneZ (*sign_bolt12_invoice_request)(const void *this_arg, const struct LDKUnsignedInvoiceRequest *NONNULL_PTR invoice_request);
+   /**
+    * Signs the [`TaggedHash`] of a BOLT 12 invoice.
+    *
+    * May be called by a function passed to [`UnsignedBolt12Invoice::sign`] where `invoice` is the
+    * callee.
+    *
+    * Implementors may check that the `invoice` is expected rather than blindly signing the tagged
+    * hash. An `Ok` result should sign `invoice.tagged_hash().as_digest()` with the node's signing
+    * key or an ephemeral key to preserve privacy, whichever is associated with
+    * [`UnsignedBolt12Invoice::signing_pubkey`].
+    *
+    * [`TaggedHash`]: crate::offers::merkle::TaggedHash
+    */
+   struct LDKCResult_SchnorrSignatureNoneZ (*sign_bolt12_invoice)(const void *this_arg, const struct LDKUnsignedBolt12Invoice *NONNULL_PTR invoice);
    /**
     * Sign a gossip message.
     *
@@ -8763,7 +11497,7 @@ typedef struct LDKNodeSigner {
     * message to be broadcast, as otherwise it may prevent one from receiving funds over the
     * corresponding channel.
     */
-   struct LDKCResult_SignatureNoneZ (*sign_gossip_message)(const void *this_arg, struct LDKUnsignedGossipMessage msg);
+   struct LDKCResult_ECDSASignatureNoneZ (*sign_gossip_message)(const void *this_arg, struct LDKUnsignedGossipMessage msg);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -8781,7 +11515,7 @@ typedef struct LDKSignerProvider {
     */
    void *this_arg;
    /**
-    * Generates a unique `channel_keys_id` that can be used to obtain a [`Self::Signer`] through
+    * Generates a unique `channel_keys_id` that can be used to obtain a [`Self::EcdsaSigner`] through
     * [`SignerProvider::derive_channel_signer`]. The `user_channel_id` is provided to allow
     * implementations of [`SignerProvider`] to maintain a mapping between itself and the generated
     * `channel_keys_id`.
@@ -8809,7 +11543,7 @@ typedef struct LDKSignerProvider {
     * This method is slowly being phased out -- it will only be called when reading objects
     * written by LDK versions prior to 0.0.113.
     *
-    * [`Signer`]: Self::Signer
+    * [`Signer`]: Self::EcdsaSigner
     * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
     * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
     */
@@ -8820,9 +11554,10 @@ typedef struct LDKSignerProvider {
     * If this function returns an error, this will result in a channel failing to open.
     *
     * This method should return a different value each time it is called, to avoid linking
-    * on-chain funds across channels as controlled to the same user.
+    * on-chain funds across channels as controlled to the same user. `channel_keys_id` may be
+    * used to derive a unique value for each channel.
     */
-   struct LDKCResult_ScriptNoneZ (*get_destination_script)(const void *this_arg);
+   struct LDKCResult_CVec_u8ZNoneZ (*get_destination_script)(const void *this_arg, struct LDKThirtyTwoBytes channel_keys_id);
    /**
     * Get a script pubkey which we will send funds to when closing a channel.
     *
@@ -8852,6 +11587,10 @@ typedef struct LDKSignerProvider {
  *
  * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're
  * called from inside the library in response to chain events, P2P events, or timer events).
+ *
+ * LDK may generate a substantial number of fee-estimation calls in some cases. You should
+ * pre-calculate and cache the fee estimate results to ensure you don't substantially slow HTLC
+ * handling.
  */
 typedef struct LDKFeeEstimator {
    /**
@@ -8877,6 +11616,52 @@ typedef struct LDKFeeEstimator {
    void (*free)(void *this_arg);
 } LDKFeeEstimator;
 
+
+
+/**
+ * Data to construct a [`BlindedHop`] for receiving a payment. This payload is custom to LDK and
+ * may not be valid if received by another lightning implementation.
+ */
+typedef struct MUST_USE_STRUCT LDKReceiveTlvs {
+   /**
+    * 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.
+    */
+   LDKnativeReceiveTlvs *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;
+} LDKReceiveTlvs;
+
+/**
+ * A trait defining behavior for routing an [`OnionMessage`].
+ */
+typedef struct LDKMessageRouter {
+   /**
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
+    */
+   void *this_arg;
+   /**
+    * Returns a route for sending an [`OnionMessage`] to the given [`Destination`].
+    */
+   struct LDKCResult_OnionMessagePathNoneZ (*find_path)(const void *this_arg, struct LDKPublicKey sender, struct LDKCVec_PublicKeyZ peers, struct LDKDestination destination);
+   /**
+    * Creates [`BlindedPath`]s to the `recipient` node. The nodes in `peers` are assumed to be
+    * direct peers with the `recipient`.
+    */
+   struct LDKCResult_CVec_BlindedPathZNoneZ (*create_blinded_paths)(const void *this_arg, struct LDKPublicKey recipient, struct LDKCVec_PublicKeyZ peers);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKMessageRouter;
+
 /**
  * A trait defining behavior for routing a payment.
  */
@@ -8907,6 +11692,16 @@ typedef struct LDKRouter {
     * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
     */
    struct LDKCResult_RouteLightningErrorZ (*find_route_with_id)(const void *this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKInFlightHtlcs inflight_htlcs, struct LDKThirtyTwoBytes _payment_hash, struct LDKThirtyTwoBytes _payment_id);
+   /**
+    * Creates [`BlindedPath`]s for payment to the `recipient` node. The channels in `first_hops`
+    * are assumed to be with the `recipient`'s peers. The payment secret and any constraints are
+    * given in `tlvs`.
+    */
+   struct LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ (*create_blinded_payment_paths)(const void *this_arg, struct LDKPublicKey recipient, struct LDKCVec_ChannelDetailsZ first_hops, struct LDKReceiveTlvs tlvs, uint64_t amount_msats);
+   /**
+    * Implementation of MessageRouter for this object.
+    */
+   struct LDKMessageRouter MessageRouter;
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -8917,11 +11712,629 @@ typedef struct LDKRouter {
 
 
 /**
- * Manager which keeps track of a number of channels and sends messages to the appropriate
- * channel, also tracking HTLC preimages and forwarding onion packets appropriately.
+ * A lightning node's channel state machine and payment management logic, which facilitates
+ * sending, forwarding, and receiving payments through lightning channels.
+ *
+ * [`ChannelManager`] is parameterized by a number of components to achieve this.
+ * - [`chain::Watch`] (typically [`ChainMonitor`]) for on-chain monitoring and enforcement of each
+ *   channel
+ * - [`BroadcasterInterface`] for broadcasting transactions related to opening, funding, and
+ *   closing channels
+ * - [`EntropySource`] for providing random data needed for cryptographic operations
+ * - [`NodeSigner`] for cryptographic operations scoped to the node
+ * - [`SignerProvider`] for providing signers whose operations are scoped to individual channels
+ * - [`FeeEstimator`] to determine transaction fee rates needed to have a transaction mined in a
+ *   timely manner
+ * - [`Router`] for finding payment paths when initiating and retrying payments
+ * - [`Logger`] for logging operational information of varying degrees
+ *
+ * Additionally, it implements the following traits:
+ * - [`ChannelMessageHandler`] to handle off-chain channel activity from peers
+ * - [`MessageSendEventsProvider`] to similarly send such messages to peers
+ * - [`OffersMessageHandler`] for BOLT 12 message handling and sending
+ * - [`EventsProvider`] to generate user-actionable [`Event`]s
+ * - [`chain::Listen`] and [`chain::Confirm`] for notification of on-chain activity
+ *
+ * Thus, [`ChannelManager`] is typically used to parameterize a [`MessageHandler`] and an
+ * [`OnionMessenger`]. The latter is required to support BOLT 12 functionality.
+ *
+ * # `ChannelManager` vs `ChannelMonitor`
+ *
+ * It's important to distinguish between the *off-chain* management and *on-chain* enforcement of
+ * lightning channels. [`ChannelManager`] exchanges messages with peers to manage the off-chain
+ * state of each channel. During this process, it generates a [`ChannelMonitor`] for each channel
+ * and a [`ChannelMonitorUpdate`] for each relevant change, notifying its parameterized
+ * [`chain::Watch`] of them.
+ *
+ * An implementation of [`chain::Watch`], such as [`ChainMonitor`], is responsible for aggregating
+ * these [`ChannelMonitor`]s and applying any [`ChannelMonitorUpdate`]s to them. It then monitors
+ * for any pertinent on-chain activity, enforcing claims as needed.
+ *
+ * This division of off-chain management and on-chain enforcement allows for interesting node
+ * setups. For instance, on-chain enforcement could be moved to a separate host or have added
+ * redundancy, possibly as a watchtower. See [`chain::Watch`] for the relevant interface.
+ *
+ * # Initialization
+ *
+ * Use [`ChannelManager::new`] with the most recent [`BlockHash`] when creating a fresh instance.
+ * Otherwise, if restarting, construct [`ChannelManagerReadArgs`] with the necessary parameters and
+ * references to any deserialized [`ChannelMonitor`]s that were previously persisted. Use this to
+ * deserialize the [`ChannelManager`] and feed it any new chain data since it was last online, as
+ * detailed in the [`ChannelManagerReadArgs`] documentation.
+ *
+ * ```
+ * use bitcoin::BlockHash;
+ * use bitcoin::network::constants::Network;
+ * use lightning::chain::BestBlock;
+ * # use lightning::chain::channelmonitor::ChannelMonitor;
+ * use lightning::ln::channelmanager::{ChainParameters, ChannelManager, ChannelManagerReadArgs};
+ * # use lightning::routing::gossip::NetworkGraph;
+ * use lightning::util::config::UserConfig;
+ * use lightning::util::ser::ReadableArgs;
+ *
+ * # fn read_channel_monitors() -> Vec<ChannelMonitor<lightning::sign::InMemorySigner>> { vec![] }
+ * # fn example<
+ * #     'a,
+ * #     L: lightning::util::logger::Logger,
+ * #     ES: lightning::sign::EntropySource,
+ * #     S: for <'b> lightning::routing::scoring::LockableScore<'b, ScoreLookUp = SL>,
+ * #     SL: lightning::routing::scoring::ScoreLookUp<ScoreParams = SP>,
+ * #     SP: Sized,
+ * #     R: lightning::io::Read,
+ * # >(
+ * #     fee_estimator: &dyn lightning::chain::chaininterface::FeeEstimator,
+ * #     chain_monitor: &dyn lightning::chain::Watch<lightning::sign::InMemorySigner>,
+ * #     tx_broadcaster: &dyn lightning::chain::chaininterface::BroadcasterInterface,
+ * #     router: &lightning::routing::router::DefaultRouter<&NetworkGraph<&'a L>, &'a L, &ES, &S, SP, SL>,
+ * #     logger: &L,
+ * #     entropy_source: &ES,
+ * #     node_signer: &dyn lightning::sign::NodeSigner,
+ * #     signer_provider: &lightning::sign::DynSignerProvider,
+ * #     best_block: lightning::chain::BestBlock,
+ * #     current_timestamp: u32,
+ * #     mut reader: R,
+ * # ) -> Result<(), lightning::ln::msgs::DecodeError> {
+ * // Fresh start with no channels
+ * let params = ChainParameters {
+ *     network: Network::Bitcoin,
+ *     best_block,
+ * };
+ * let default_config = UserConfig::default();
+ * let channel_manager = ChannelManager::new(
+ *     fee_estimator, chain_monitor, tx_broadcaster, router, logger, entropy_source, node_signer,
+ *     signer_provider, default_config, params, current_timestamp
+ * );
+ *
+ * // Restart from deserialized data
+ * let mut channel_monitors = read_channel_monitors();
+ * let args = ChannelManagerReadArgs::new(
+ *     entropy_source, node_signer, signer_provider, fee_estimator, chain_monitor, tx_broadcaster,
+ *     router, logger, default_config, channel_monitors.iter_mut().collect()
+ * );
+ * let (block_hash, channel_manager) =
+ *     <(BlockHash, ChannelManager<_, _, _, _, _, _, _, _>)>::read(&mut reader, args)?;
+ *
+ * // Update the ChannelManager and ChannelMonitors with the latest chain data
+ * // ...
+ *
+ * // Move the monitors to the ChannelManager's chain::Watch parameter
+ * for monitor in channel_monitors {
+ *     chain_monitor.watch_channel(monitor.get_funding_txo().0, monitor);
+ * }
+ * # Ok(())
+ * # }
+ * ```
+ *
+ * # Operation
+ *
+ * The following is required for [`ChannelManager`] to function properly:
+ * - Handle messages from peers using its [`ChannelMessageHandler`] implementation (typically
+ *   called by [`PeerManager::read_event`] when processing network I/O)
+ * - Send messages to peers obtained via its [`MessageSendEventsProvider`] implementation
+ *   (typically initiated when [`PeerManager::process_events`] is called)
+ * - Feed on-chain activity using either its [`chain::Listen`] or [`chain::Confirm`] implementation
+ *   as documented by those traits
+ * - Perform any periodic channel and payment checks by calling [`timer_tick_occurred`] roughly
+ *   every minute
+ * - Persist to disk whenever [`get_and_clear_needs_persistence`] returns `true` using a
+ *   [`Persister`] such as a [`KVStore`] implementation
+ * - Handle [`Event`]s obtained via its [`EventsProvider`] implementation
+ *
+ * The [`Future`] returned by [`get_event_or_persistence_needed_future`] is useful in determining
+ * when the last two requirements need to be checked.
+ *
+ * The [`lightning-block-sync`] and [`lightning-transaction-sync`] crates provide utilities that
+ * simplify feeding in on-chain activity using the [`chain::Listen`] and [`chain::Confirm`] traits,
+ * respectively. The remaining requirements can be met using the [`lightning-background-processor`]
+ * crate. For languages other than Rust, the availability of similar utilities may vary.
+ *
+ * # Channels
+ *
+ * [`ChannelManager`]'s primary function involves managing a channel state. Without channels,
+ * payments can't be sent. Use [`list_channels`] or [`list_usable_channels`] for a snapshot of the
+ * currently open channels.
+ *
+ * ```
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let channels = channel_manager.list_usable_channels();
+ * for details in channels {
+ *     println!(\"{:?}\", details);
+ * }
+ * # }
+ * ```
+ *
+ * Each channel is identified using a [`ChannelId`], which will change throughout the channel's
+ * life cycle. Additionally, channels are assigned a `user_channel_id`, which is given in
+ * [`Event`]s associated with the channel and serves as a fixed identifier but is otherwise unused
+ * by [`ChannelManager`].
+ *
+ * ## Opening Channels
+ *
+ * To an open a channel with a peer, call [`create_channel`]. This will initiate the process of
+ * opening an outbound channel, which requires self-funding when handling
+ * [`Event::FundingGenerationReady`].
+ *
+ * ```
+ * # use bitcoin::{ScriptBuf, Transaction};
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # trait Wallet {
+ * #     fn create_funding_transaction(
+ * #         &self, _amount_sats: u64, _output_script: ScriptBuf
+ * #     ) -> Transaction;
+ * # }
+ * #
+ * # fn example<T: AChannelManager, W: Wallet>(channel_manager: T, wallet: W, peer_id: PublicKey) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let value_sats = 1_000_000;
+ * let push_msats = 10_000_000;
+ * match channel_manager.create_channel(peer_id, value_sats, push_msats, 42, None, None) {
+ *     Ok(channel_id) => println!(\"Opening channel {}\", channel_id),
+ *     Err(e) => println!(\"Error opening channel: {:?}\", e),
+ * }
+ *
+ * // On the event processing thread once the peer has responded
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::FundingGenerationReady {
+ *         temporary_channel_id, counterparty_node_id, channel_value_satoshis, output_script,
+ *         user_channel_id, ..
+ *     } => {
+ *         assert_eq!(user_channel_id, 42);
+ *         let funding_transaction = wallet.create_funding_transaction(
+ *             channel_value_satoshis, output_script
+ *         );
+ *         match channel_manager.funding_transaction_generated(
+ *             &temporary_channel_id, &counterparty_node_id, funding_transaction
+ *         ) {
+ *             Ok(()) => println!(\"Funding channel {}\", temporary_channel_id),
+ *             Err(e) => println!(\"Error funding channel {}: {:?}\", temporary_channel_id, e),
+ *         }
+ *     },
+ *     Event::ChannelPending { channel_id, user_channel_id, former_temporary_channel_id, .. } => {
+ *         assert_eq!(user_channel_id, 42);
+ *         println!(
+ *             \"Channel {} now {} pending (funding transaction has been broadcasted)\", channel_id,
+ *             former_temporary_channel_id.unwrap()
+ *         );
+ *     },
+ *     Event::ChannelReady { channel_id, user_channel_id, .. } => {
+ *         assert_eq!(user_channel_id, 42);
+ *         println!(\"Channel {} ready\", channel_id);
+ *     },
+ *     // ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * ## Accepting Channels
  *
- * Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through
- * to individual Channels.
+ * Inbound channels are initiated by peers and are automatically accepted unless [`ChannelManager`]
+ * has [`UserConfig::manually_accept_inbound_channels`] set. In that case, the channel may be
+ * either accepted or rejected when handling [`Event::OpenChannelRequest`].
+ *
+ * ```
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # fn is_trusted(counterparty_node_id: PublicKey) -> bool {
+ * #     // ...
+ * #     unimplemented!()
+ * # }
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::OpenChannelRequest { temporary_channel_id, counterparty_node_id, ..  } => {
+ *         if !is_trusted(counterparty_node_id) {
+ *             match channel_manager.force_close_without_broadcasting_txn(
+ *                 &temporary_channel_id, &counterparty_node_id
+ *             ) {
+ *                 Ok(()) => println!(\"Rejecting channel {}\", temporary_channel_id),
+ *                 Err(e) => println!(\"Error rejecting channel {}: {:?}\", temporary_channel_id, e),
+ *             }
+ *             return;
+ *         }
+ *
+ *         let user_channel_id = 43;
+ *         match channel_manager.accept_inbound_channel(
+ *             &temporary_channel_id, &counterparty_node_id, user_channel_id
+ *         ) {
+ *             Ok(()) => println!(\"Accepting channel {}\", temporary_channel_id),
+ *             Err(e) => println!(\"Error accepting channel {}: {:?}\", temporary_channel_id, e),
+ *         }
+ *     },
+ *     // ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * ## Closing Channels
+ *
+ * There are two ways to close a channel: either cooperatively using [`close_channel`] or
+ * unilaterally using [`force_close_broadcasting_latest_txn`]. The former is ideal as it makes for
+ * lower fees and immediate access to funds. However, the latter may be necessary if the
+ * counterparty isn't behaving properly or has gone offline. [`Event::ChannelClosed`] is generated
+ * once the channel has been closed successfully.
+ *
+ * ```
+ * # use bitcoin::secp256k1::PublicKey;
+ * # use lightning::ln::types::ChannelId;
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::events::{Event, EventsProvider};
+ * #
+ * # fn example<T: AChannelManager>(
+ * #     channel_manager: T, channel_id: ChannelId, counterparty_node_id: PublicKey
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * match channel_manager.close_channel(&channel_id, &counterparty_node_id) {
+ *     Ok(()) => println!(\"Closing channel {}\", channel_id),
+ *     Err(e) => println!(\"Error closing channel {}: {:?}\", channel_id, e),
+ * }
+ *
+ * // On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::ChannelClosed { channel_id, user_channel_id, ..  } => {
+ *         assert_eq!(user_channel_id, 42);
+ *         println!(\"Channel {} closed\", channel_id);
+ *     },
+ *     // ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * # Payments
+ *
+ * [`ChannelManager`] is responsible for sending, forwarding, and receiving payments through its
+ * channels. A payment is typically initiated from a [BOLT 11] invoice or a [BOLT 12] offer, though
+ * spontaneous (i.e., keysend) payments are also possible. Incoming payments don't require
+ * maintaining any additional state as [`ChannelManager`] can reconstruct the [`PaymentPreimage`]
+ * from the [`PaymentSecret`]. Sending payments, however, require tracking in order to retry failed
+ * HTLCs.
+ *
+ * After a payment is initiated, it will appear in [`list_recent_payments`] until a short time
+ * after either an [`Event::PaymentSent`] or [`Event::PaymentFailed`] is handled. Failed HTLCs
+ * for a payment will be retried according to the payment's [`Retry`] strategy or until
+ * [`abandon_payment`] is called.
+ *
+ * ## BOLT 11 Invoices
+ *
+ * The [`lightning-invoice`] crate is useful for creating BOLT 11 invoices. Specifically, use the
+ * functions in its `utils` module for constructing invoices that are compatible with
+ * [`ChannelManager`]. These functions serve as a convenience for building invoices with the
+ * [`PaymentHash`] and [`PaymentSecret`] returned from [`create_inbound_payment`]. To provide your
+ * own [`PaymentHash`], use [`create_inbound_payment_for_hash`] or the corresponding functions in
+ * the [`lightning-invoice`] `utils` module.
+ *
+ * [`ChannelManager`] generates an [`Event::PaymentClaimable`] once the full payment has been
+ * received. Call [`claim_funds`] to release the [`PaymentPreimage`], which in turn will result in
+ * an [`Event::PaymentClaimed`].
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) {
+ * # let channel_manager = channel_manager.get_cm();
+ * // Or use utils::create_invoice_from_channelmanager
+ * let known_payment_hash = match channel_manager.create_inbound_payment(
+ *     Some(10_000_000), 3600, None
+ * ) {
+ *     Ok((payment_hash, _payment_secret)) => {
+ *         println!(\"Creating inbound payment {}\", payment_hash);
+ *         payment_hash
+ *     },
+ *     Err(()) => panic!(\"Error creating inbound payment\"),
+ * };
+ *
+ * // On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ *         PaymentPurpose::Bolt11InvoicePayment { payment_preimage: Some(payment_preimage), .. } => {
+ *             assert_eq!(payment_hash, known_payment_hash);
+ *             println!(\"Claiming payment {}\", payment_hash);
+ *             channel_manager.claim_funds(payment_preimage);
+ *         },
+ *         PaymentPurpose::Bolt11InvoicePayment { payment_preimage: None, .. } => {
+ *             println!(\"Unknown payment hash: {}\", payment_hash);
+ *         },
+ *         PaymentPurpose::SpontaneousPayment(payment_preimage) => {
+ *             assert_ne!(payment_hash, known_payment_hash);
+ *             println!(\"Claiming spontaneous payment {}\", payment_hash);
+ *             channel_manager.claim_funds(payment_preimage);
+ *         },
+ *         // ...
+ * #         _ => {},
+ *     },
+ *     Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ *         assert_eq!(payment_hash, known_payment_hash);
+ *         println!(\"Claimed {} msats\", amount_msat);
+ *     },
+ *     // ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * For paying an invoice, [`lightning-invoice`] provides a `payment` module with convenience
+ * functions for use with [`send_payment`].
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::types::PaymentHash;
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, RecipientOnionFields, Retry};
+ * # use lightning::routing::router::RouteParameters;
+ * #
+ * # fn example<T: AChannelManager>(
+ * #     channel_manager: T, payment_hash: PaymentHash, recipient_onion: RecipientOnionFields,
+ * #     route_params: RouteParameters, retry: Retry
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * // let (payment_hash, recipient_onion, route_params) =
+ * //     payment::payment_parameters_from_invoice(&invoice);
+ * let payment_id = PaymentId([42; 32]);
+ * match channel_manager.send_payment(
+ *     payment_hash, recipient_onion, payment_id, route_params, retry
+ * ) {
+ *     Ok(()) => println!(\"Sending payment with hash {}\", payment_hash),
+ *     Err(e) => println!(\"Failed sending payment with hash {}: {:?}\", payment_hash, e),
+ * }
+ *
+ * let expected_payment_id = payment_id;
+ * let expected_payment_hash = payment_hash;
+ * assert!(
+ *     channel_manager.list_recent_payments().iter().find(|details| matches!(
+ *         details,
+ *         RecentPaymentDetails::Pending {
+ *             payment_id: expected_payment_id,
+ *             payment_hash: expected_payment_hash,
+ *             ..
+ *         }
+ *     )).is_some()
+ * );
+ *
+ * // On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::PaymentSent { payment_hash, .. } => println!(\"Paid {}\", payment_hash),
+ *     Event::PaymentFailed { payment_hash, .. } => println!(\"Failed paying {}\", payment_hash),
+ *     // ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * ## BOLT 12 Offers
+ *
+ * The [`offers`] module is useful for creating BOLT 12 offers. An [`Offer`] is a precursor to a
+ * [`Bolt12Invoice`], which must first be requested by the payer. The interchange of these messages
+ * as defined in the specification is handled by [`ChannelManager`] and its implementation of
+ * [`OffersMessageHandler`]. However, this only works with an [`Offer`] created using a builder
+ * returned by [`create_offer_builder`]. With this approach, BOLT 12 offers and invoices are
+ * stateless just as BOLT 11 invoices are.
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::offers::parse::Bolt12SemanticError;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T) -> Result<(), Bolt12SemanticError> {
+ * # let channel_manager = channel_manager.get_cm();
+ * let offer = channel_manager
+ *     .create_offer_builder()?
+ * # ;
+ * # // Needed for compiling for c_bindings
+ * # let builder: lightning::offers::offer::OfferBuilder<_, _> = offer.into();
+ * # let offer = builder
+ *     .description(\"coffee\".to_string())
+ *     .amount_msats(10_000_000)
+ *     .build()?;
+ * let bech32_offer = offer.to_string();
+ *
+ * // On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ *         PaymentPurpose::Bolt12OfferPayment { payment_preimage: Some(payment_preimage), .. } => {
+ *             println!(\"Claiming payment {}\", payment_hash);
+ *             channel_manager.claim_funds(payment_preimage);
+ *         },
+ *         PaymentPurpose::Bolt12OfferPayment { payment_preimage: None, .. } => {
+ *             println!(\"Unknown payment hash: {}\", payment_hash);
+ *         },
+ *         // ...
+ * #         _ => {},
+ *     },
+ *     Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ *         println!(\"Claimed {} msats\", amount_msat);
+ *     },
+ *     // ...
+ * #     _ => {},
+ * });
+ * # Ok(())
+ * # }
+ * ```
+ *
+ * Use [`pay_for_offer`] to initiated payment, which sends an [`InvoiceRequest`] for an [`Offer`]
+ * and pays the [`Bolt12Invoice`] response. In addition to success and failure events,
+ * [`ChannelManager`] may also generate an [`Event::InvoiceRequestFailed`].
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
+ * # use lightning::offers::offer::Offer;
+ * #
+ * # fn example<T: AChannelManager>(
+ * #     channel_manager: T, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
+ * #     payer_note: Option<String>, retry: Retry, max_total_routing_fee_msat: Option<u64>
+ * # ) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let payment_id = PaymentId([42; 32]);
+ * match channel_manager.pay_for_offer(
+ *     offer, quantity, amount_msats, payer_note, payment_id, retry, max_total_routing_fee_msat
+ * ) {
+ *     Ok(()) => println!(\"Requesting invoice for offer\"),
+ *     Err(e) => println!(\"Unable to request invoice for offer: {:?}\", e),
+ * }
+ *
+ * // First the payment will be waiting on an invoice
+ * let expected_payment_id = payment_id;
+ * assert!(
+ *     channel_manager.list_recent_payments().iter().find(|details| matches!(
+ *         details,
+ *         RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id }
+ *     )).is_some()
+ * );
+ *
+ * // Once the invoice is received, a payment will be sent
+ * assert!(
+ *     channel_manager.list_recent_payments().iter().find(|details| matches!(
+ *         details,
+ *         RecentPaymentDetails::Pending { payment_id: expected_payment_id, ..  }
+ *     )).is_some()
+ * );
+ *
+ * // On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id),
+ *     Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ *     Event::InvoiceRequestFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ *     // ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * ## BOLT 12 Refunds
+ *
+ * A [`Refund`] is a request for an invoice to be paid. Like *paying* for an [`Offer`], *creating*
+ * a [`Refund`] involves maintaining state since it represents a future outbound payment.
+ * Therefore, use [`create_refund_builder`] when creating one, otherwise [`ChannelManager`] will
+ * refuse to pay any corresponding [`Bolt12Invoice`] that it receives.
+ *
+ * ```
+ * # use core::time::Duration;
+ * # use lightning::events::{Event, EventsProvider};
+ * # use lightning::ln::channelmanager::{AChannelManager, PaymentId, RecentPaymentDetails, Retry};
+ * # use lightning::offers::parse::Bolt12SemanticError;
+ * #
+ * # fn example<T: AChannelManager>(
+ * #     channel_manager: T, amount_msats: u64, absolute_expiry: Duration, retry: Retry,
+ * #     max_total_routing_fee_msat: Option<u64>
+ * # ) -> Result<(), Bolt12SemanticError> {
+ * # let channel_manager = channel_manager.get_cm();
+ * let payment_id = PaymentId([42; 32]);
+ * let refund = channel_manager
+ *     .create_refund_builder(
+ *         amount_msats, absolute_expiry, payment_id, retry, max_total_routing_fee_msat
+ *     )?
+ * # ;
+ * # // Needed for compiling for c_bindings
+ * # let builder: lightning::offers::refund::RefundBuilder<_> = refund.into();
+ * # let refund = builder
+ *     .description(\"coffee\".to_string())
+ *     .payer_note(\"refund for order 1234\".to_string())
+ *     .build()?;
+ * let bech32_refund = refund.to_string();
+ *
+ * // First the payment will be waiting on an invoice
+ * let expected_payment_id = payment_id;
+ * assert!(
+ *     channel_manager.list_recent_payments().iter().find(|details| matches!(
+ *         details,
+ *         RecentPaymentDetails::AwaitingInvoice { payment_id: expected_payment_id }
+ *     )).is_some()
+ * );
+ *
+ * // Once the invoice is received, a payment will be sent
+ * assert!(
+ *     channel_manager.list_recent_payments().iter().find(|details| matches!(
+ *         details,
+ *         RecentPaymentDetails::Pending { payment_id: expected_payment_id, ..  }
+ *     )).is_some()
+ * );
+ *
+ * // On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::PaymentSent { payment_id: Some(payment_id), .. } => println!(\"Paid {}\", payment_id),
+ *     Event::PaymentFailed { payment_id, .. } => println!(\"Failed paying {}\", payment_id),
+ *     // ...
+ * #     _ => {},
+ * });
+ * # Ok(())
+ * # }
+ * ```
+ *
+ * Use [`request_refund_payment`] to send a [`Bolt12Invoice`] for receiving the refund. Similar to
+ * *creating* an [`Offer`], this is stateless as it represents an inbound payment.
+ *
+ * ```
+ * # use lightning::events::{Event, EventsProvider, PaymentPurpose};
+ * # use lightning::ln::channelmanager::AChannelManager;
+ * # use lightning::offers::refund::Refund;
+ * #
+ * # fn example<T: AChannelManager>(channel_manager: T, refund: &Refund) {
+ * # let channel_manager = channel_manager.get_cm();
+ * let known_payment_hash = match channel_manager.request_refund_payment(refund) {
+ *     Ok(invoice) => {
+ *         let payment_hash = invoice.payment_hash();
+ *         println!(\"Requesting refund payment {}\", payment_hash);
+ *         payment_hash
+ *     },
+ *     Err(e) => panic!(\"Unable to request payment for refund: {:?}\", e),
+ * };
+ *
+ * // On the event processing thread
+ * channel_manager.process_pending_events(&|event| match event {
+ *     Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
+ *     \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: Some(payment_preimage), .. } => {
+ *             assert_eq!(payment_hash, known_payment_hash);
+ *             println!(\"Claiming payment {}\", payment_hash);
+ *             channel_manager.claim_funds(payment_preimage);
+ *         },
+ *     \tPaymentPurpose::Bolt12RefundPayment { payment_preimage: None, .. } => {
+ *             println!(\"Unknown payment hash: {}\", payment_hash);
+ *     \t},
+ *         // ...
+ * #         _ => {},
+ *     },
+ *     Event::PaymentClaimed { payment_hash, amount_msat, .. } => {
+ *         assert_eq!(payment_hash, known_payment_hash);
+ *         println!(\"Claimed {} msats\", amount_msat);
+ *     },
+ *     // ...
+ * #     _ => {},
+ * });
+ * # }
+ * ```
+ *
+ * # Persistence
  *
  * Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for
  * all peers during write/read (though does not modify this instance, only the instance being
@@ -8929,23 +12342,29 @@ typedef struct LDKRouter {
  * called [`funding_transaction_generated`] for outbound channels) being closed.
  *
  * Note that you can be a bit lazier about writing out `ChannelManager` than you can be with
- * [`ChannelMonitor`]. With [`ChannelMonitor`] you MUST write each monitor update out to disk before
- * returning from [`chain::Watch::watch_channel`]/[`update_channel`], with ChannelManagers, writing updates
- * happens out-of-band (and will prevent any other `ChannelManager` operations from occurring during
- * the serialization process). If the deserialized version is out-of-date compared to the
- * [`ChannelMonitor`] passed by reference to [`read`], those channels will be force-closed based on the
- * `ChannelMonitor` state and no funds will be lost (mod on-chain transaction fees).
+ * [`ChannelMonitor`]. With [`ChannelMonitor`] you MUST durably write each
+ * [`ChannelMonitorUpdate`] before returning from
+ * [`chain::Watch::watch_channel`]/[`update_channel`] or before completing async writes. With
+ * `ChannelManager`s, writing updates happens out-of-band (and will prevent any other
+ * `ChannelManager` operations from occurring during the serialization process). If the
+ * deserialized version is out-of-date compared to the [`ChannelMonitor`] passed by reference to
+ * [`read`], those channels will be force-closed based on the `ChannelMonitor` state and no funds
+ * will be lost (modulo on-chain transaction fees).
  *
  * Note that the deserializer is only implemented for `(`[`BlockHash`]`, `[`ChannelManager`]`)`, which
  * tells you the last block hash which was connected. You should get the best block tip before using the manager.
  * See [`chain::Listen`] and [`chain::Confirm`] for more details.
  *
+ * # `ChannelUpdate` Messages
+ *
  * Note that `ChannelManager` is responsible for tracking liveness of its channels and generating
  * [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid
  * spam due to quick disconnection/reconnection, updates are not sent until the channel has been
  * offline for a full minute. In order to track this, you must call
  * [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect.
  *
+ * # DoS Mitigation
+ *
  * To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and
  * inbound channels without confirmed funding transactions. This may result in nodes which we do
  * not have a channel with being unable to connect to us or open new channels with us if we have
@@ -8955,19 +12374,53 @@ typedef struct LDKRouter {
  * exempted from the count of unfunded channels. Similarly, outbound channels and connections are
  * never limited. Please ensure you limit the count of such channels yourself.
  *
+ * # Type Aliases
+ *
  * Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`]
  * a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but
  * essentially you should default to using a [`SimpleRefChannelManager`], and use a
  * [`SimpleArcChannelManager`] when you require a `ChannelManager` with a static lifetime, such as when
  * you're using lightning-net-tokio.
  *
+ * [`ChainMonitor`]: crate::chain::chainmonitor::ChainMonitor
+ * [`MessageHandler`]: crate::ln::peer_handler::MessageHandler
+ * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+ * [`PeerManager::read_event`]: crate::ln::peer_handler::PeerManager::read_event
+ * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ * [`timer_tick_occurred`]: Self::timer_tick_occurred
+ * [`get_and_clear_needs_persistence`]: Self::get_and_clear_needs_persistence
+ * [`Persister`]: crate::util::persist::Persister
+ * [`KVStore`]: crate::util::persist::KVStore
+ * [`get_event_or_persistence_needed_future`]: Self::get_event_or_persistence_needed_future
+ * [`lightning-block-sync`]: https://docs.rs/lightning_block_sync/latest/lightning_block_sync
+ * [`lightning-transaction-sync`]: https://docs.rs/lightning_transaction_sync/latest/lightning_transaction_sync
+ * [`lightning-background-processor`]: https://docs.rs/lightning_background_processor/lightning_background_processor
+ * [`list_channels`]: Self::list_channels
+ * [`list_usable_channels`]: Self::list_usable_channels
+ * [`create_channel`]: Self::create_channel
+ * [`close_channel`]: Self::force_close_broadcasting_latest_txn
+ * [`force_close_broadcasting_latest_txn`]: Self::force_close_broadcasting_latest_txn
+ * [BOLT 11]: https://github.com/lightning/bolts/blob/master/11-payment-encoding.md
+ * [BOLT 12]: https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md
+ * [`list_recent_payments`]: Self::list_recent_payments
+ * [`abandon_payment`]: Self::abandon_payment
+ * [`lightning-invoice`]: https://docs.rs/lightning_invoice/latest/lightning_invoice
+ * [`create_inbound_payment`]: Self::create_inbound_payment
+ * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
+ * [`claim_funds`]: Self::claim_funds
+ * [`send_payment`]: Self::send_payment
+ * [`offers`]: crate::offers
+ * [`create_offer_builder`]: Self::create_offer_builder
+ * [`pay_for_offer`]: Self::pay_for_offer
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`create_refund_builder`]: Self::create_refund_builder
+ * [`request_refund_payment`]: Self::request_refund_payment
  * [`peer_disconnected`]: msgs::ChannelMessageHandler::peer_disconnected
  * [`funding_created`]: msgs::FundingCreated
  * [`funding_transaction_generated`]: Self::funding_transaction_generated
  * [`BlockHash`]: bitcoin::hash_types::BlockHash
  * [`update_channel`]: chain::Watch::update_channel
  * [`ChannelUpdate`]: msgs::ChannelUpdate
- * [`timer_tick_occurred`]: Self::timer_tick_occurred
  * [`read`]: ReadableArgs::read
  */
 typedef struct MUST_USE_STRUCT LDKChannelManager {
@@ -8988,7 +12441,7 @@ typedef struct MUST_USE_STRUCT LDKChannelManager {
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_BlockHashChannelManagerZ {
+typedef struct LDKC2Tuple_ThirtyTwoBytesChannelManagerZ {
    /**
     * The element at position 0
     */
@@ -8997,43 +12450,43 @@ typedef struct LDKC2Tuple_BlockHashChannelManagerZ {
     * The element at position 1
     */
    struct LDKChannelManager b;
-} LDKC2Tuple_BlockHashChannelManagerZ;
+} LDKC2Tuple_ThirtyTwoBytesChannelManagerZ;
 
 /**
- * The contents of CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ
+ * The contents of CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ
  */
-typedef union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr {
+typedef union LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKC2Tuple_BlockHashChannelManagerZ *result;
+   struct LDKC2Tuple_ThirtyTwoBytesChannelManagerZ *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_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr;
+} LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr;
 
 /**
- * A CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * A CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ 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_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
+typedef struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
    /**
-    * The contents of this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ, accessible via either
+    * The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr contents;
+   union LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr contents;
    /**
-    * Whether this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents a success state.
+    * Whether this CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ;
+} LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ;
 
 /**
- * Options for how to set the max dust HTLC exposure allowed on a channel. See
+ * Options for how to set the max dust exposure allowed on a channel. See
  * [`ChannelConfig::max_dust_htlc_exposure`] for details.
  */
 typedef enum LDKMaxDustHTLCExposure_Tag {
@@ -9050,19 +12503,17 @@ typedef enum LDKMaxDustHTLCExposure_Tag {
     */
    LDKMaxDustHTLCExposure_FixedLimitMsat,
    /**
-    * This sets a multiplier on the estimated high priority feerate (sats/KW, as obtained from
-    * [`FeeEstimator`]) to determine the maximum allowed dust exposure. If this variant is used
-    * then the maximum dust exposure in millisatoshis is calculated as:
-    * `high_priority_feerate_per_kw * value`. For example, with our default value
-    * `FeeRateMultiplier(5000)`:
+    * This sets a multiplier on the [`ConfirmationTarget::OnChainSweep`] feerate (in sats/KW) to
+    * determine the maximum allowed dust exposure. If this variant is used then the maximum dust
+    * exposure in millisatoshis is calculated as:
+    * `feerate_per_kw * value`. For example, with our default value
+    * `FeeRateMultiplier(10_000)`:
     *
     * - For the minimum fee rate of 1 sat/vByte (250 sat/KW, although the minimum
     * defaults to 253 sats/KW for rounding, see [`FeeEstimator`]), the max dust exposure would
-    * be 253 * 5000 = 1,265,000 msats.
+    * be 253 * 10_000 = 2,530,000 msats.
     * - For a fee rate of 30 sat/vByte (7500 sat/KW), the max dust exposure would be
-    * 7500 * 5000 = 37,500,000 msats.
-    *
-    * This allows the maximum dust exposure to automatically scale with fee rate changes.
+    * 7500 * 50_000 = 75,000,000 msats (0.00075 BTC).
     *
     * Note, if you're using a third-party fee estimator, this may leave you more exposed to a
     * fee griefing attack, where your fee estimator may purposely overestimate the fee rate,
@@ -9077,6 +12528,7 @@ typedef enum LDKMaxDustHTLCExposure_Tag {
     * by default this will be set to a [`Self::FixedLimitMsat`] of 5,000,000 msat.
     *
     * [`FeeEstimator`]: crate::chain::chaininterface::FeeEstimator
+    * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
     */
    LDKMaxDustHTLCExposure_FeeRateMultiplier,
    /**
@@ -9400,7 +12852,7 @@ typedef struct LDKCResult_HTLCUpdateDecodeErrorZ {
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_OutPointScriptZ {
+typedef struct LDKC2Tuple_OutPointCVec_u8ZZ {
    /**
     * The element at position 0
     */
@@ -9409,12 +12861,12 @@ typedef struct LDKC2Tuple_OutPointScriptZ {
     * The element at position 1
     */
    struct LDKCVec_u8Z b;
-} LDKC2Tuple_OutPointScriptZ;
+} LDKC2Tuple_OutPointCVec_u8ZZ;
 
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_u32ScriptZ {
+typedef struct LDKC2Tuple_u32CVec_u8ZZ {
    /**
     * The element at position 0
     */
@@ -9423,28 +12875,28 @@ typedef struct LDKC2Tuple_u32ScriptZ {
     * The element at position 1
     */
    struct LDKCVec_u8Z b;
-} LDKC2Tuple_u32ScriptZ;
+} LDKC2Tuple_u32CVec_u8ZZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32ScriptZs of arbitrary size.
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32CVec_u8ZZs of arbitrary size.
  * This corresponds to std::vector in C++
  */
-typedef struct LDKCVec_C2Tuple_u32ScriptZZ {
+typedef struct LDKCVec_C2Tuple_u32CVec_u8ZZZ {
    /**
     * The elements in the array.
     * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   struct LDKC2Tuple_u32ScriptZ *data;
+   struct LDKC2Tuple_u32CVec_u8ZZ *data;
    /**
     * The number of elements pointed to by `data`.
     */
    uintptr_t datalen;
-} LDKCVec_C2Tuple_u32ScriptZZ;
+} LDKCVec_C2Tuple_u32CVec_u8ZZZ;
 
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ {
+typedef struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
    /**
     * The element at position 0
     */
@@ -9452,24 +12904,40 @@ typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ {
    /**
     * The element at position 1
     */
-   struct LDKCVec_C2Tuple_u32ScriptZZ b;
-} LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ;
+   struct LDKCVec_C2Tuple_u32CVec_u8ZZZ b;
+} LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZs of arbitrary size.
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZs of arbitrary size.
  * This corresponds to std::vector in C++
  */
-typedef struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ {
+typedef struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
    /**
     * The elements in the array.
     * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *data;
+   struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ *data;
    /**
     * The number of elements pointed to by `data`.
     */
    uintptr_t datalen;
-} LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ;
+} LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ;
+
+/**
+ * A dynamically-allocated array of crate::lightning::ln::chan_utils::CommitmentTransactions of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_CommitmentTransactionZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKCommitmentTransaction *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_CommitmentTransactionZ;
 
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
@@ -9504,7 +12972,7 @@ typedef struct LDKCVec_C2Tuple_u32TxOutZZ {
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ {
+typedef struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
    /**
     * The element at position 0
     */
@@ -9513,10 +12981,10 @@ typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ {
     * The element at position 1
     */
    struct LDKCVec_C2Tuple_u32TxOutZZ b;
-} LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ;
+} LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZs of arbitrary size.
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZs of arbitrary size.
  * This corresponds to std::vector in C++
  */
 typedef struct LDKCVec_TransactionOutputsZ {
@@ -9524,7 +12992,7 @@ typedef struct LDKCVec_TransactionOutputsZ {
     * The elements in the array.
     * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *data;
+   struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ *data;
    /**
     * The number of elements pointed to by `data`.
     */
@@ -9590,7 +13058,7 @@ typedef struct LDKBalance_LDKClaimableOnChannelClose_Body {
     * The amount available to claim, in satoshis, excluding the on-chain fees which will be
     * required to do so.
     */
-   uint64_t claimable_amount_satoshis;
+   uint64_t amount_satoshis;
 } LDKBalance_LDKClaimableOnChannelClose_Body;
 
 typedef struct LDKBalance_LDKClaimableAwaitingConfirmations_Body {
@@ -9598,7 +13066,7 @@ typedef struct LDKBalance_LDKClaimableAwaitingConfirmations_Body {
     * The amount available to claim, in satoshis, possibly excluding the on-chain fees which
     * were spent in broadcasting the transaction.
     */
-   uint64_t claimable_amount_satoshis;
+   uint64_t amount_satoshis;
    /**
     * The height at which an [`Event::SpendableOutputs`] event will be generated for this
     * amount.
@@ -9611,7 +13079,7 @@ typedef struct LDKBalance_LDKContentiousClaimable_Body {
     * The amount available to claim, in satoshis, excluding the on-chain fees which will be
     * required to do so.
     */
-   uint64_t claimable_amount_satoshis;
+   uint64_t amount_satoshis;
    /**
     * The height at which the counterparty may be able to claim the balance if we have not
     * done so.
@@ -9632,7 +13100,7 @@ typedef struct LDKBalance_LDKMaybeTimeoutClaimableHTLC_Body {
     * The amount potentially available to claim, in satoshis, excluding the on-chain fees
     * which will be required to do so.
     */
-   uint64_t claimable_amount_satoshis;
+   uint64_t amount_satoshis;
    /**
     * The height at which we will be able to claim the balance if our counterparty has not
     * done so.
@@ -9649,7 +13117,7 @@ typedef struct LDKBalance_LDKMaybePreimageClaimableHTLC_Body {
     * The amount potentially available to claim, in satoshis, excluding the on-chain fees
     * which will be required to do so.
     */
-   uint64_t claimable_amount_satoshis;
+   uint64_t amount_satoshis;
    /**
     * The height at which our counterparty will be able to claim the balance if we have not
     * yet received the preimage and claimed it ourselves.
@@ -9668,7 +13136,7 @@ typedef struct LDKBalance_LDKCounterpartyRevokedOutputClaimable_Body {
     * Note that for outputs from HTLC balances this may be excluding some on-chain fees that
     * were already spent.
     */
-   uint64_t claimable_amount_satoshis;
+   uint64_t amount_satoshis;
 } LDKBalance_LDKCounterpartyRevokedOutputClaimable_Body;
 
 typedef struct MUST_USE_STRUCT LDKBalance {
@@ -9702,7 +13170,7 @@ typedef struct LDKCVec_BalanceZ {
 /**
  * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_BlockHashChannelMonitorZ {
+typedef struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ {
    /**
     * The element at position 0
     */
@@ -9711,40 +13179,40 @@ typedef struct LDKC2Tuple_BlockHashChannelMonitorZ {
     * The element at position 1
     */
    struct LDKChannelMonitor b;
-} LDKC2Tuple_BlockHashChannelMonitorZ;
+} LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ;
 
 /**
- * The contents of CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ
+ * The contents of CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ
  */
-typedef union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr {
+typedef union LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKC2Tuple_BlockHashChannelMonitorZ *result;
+   struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ *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_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr;
+} LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr;
 
 /**
- * A CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * A CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ 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_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
+typedef struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
    /**
-    * The contents of this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ, accessible via either
+    * The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr contents;
+   union LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr contents;
    /**
-    * Whether this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents a success state.
+    * Whether this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ;
+} LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ;
 
 /**
  * Defines a type identifier for sending messages over the wire.
@@ -9769,6 +13237,12 @@ typedef struct LDKType {
     * Serialize the object into a byte array
     */
    struct LDKCVec_u8Z (*write)(const void *this_arg);
+   /**
+    * Called, if set, after this Type has been cloned into a duplicate object.
+    * The new Type is provided, and should be mutated as needed to perform a
+    * deep copy of the object pointed to by this_arg or avoid any double-freeing.
+    */
+   void (*cloned)(struct LDKType *NONNULL_PTR new_Type);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -9806,156 +13280,40 @@ typedef struct LDKCVec_C2Tuple_PublicKeyTypeZZ {
    uintptr_t datalen;
 } LDKCVec_C2Tuple_PublicKeyTypeZZ;
 
-
-
-/**
- * An `InvoiceRequest` is a request for a [`Bolt12Invoice`] formulated from an [`Offer`].
- *
- * An offer may provide choices such as quantity, amount, chain, features, etc. An invoice request
- * specifies these such that its recipient can send an invoice for payment.
- *
- * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
- * [`Offer`]: crate::offers::offer::Offer
- */
-typedef struct MUST_USE_STRUCT LDKInvoiceRequest {
-   /**
-    * 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.
-    */
-   LDKnativeInvoiceRequest *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;
-} LDKInvoiceRequest;
-
-
-
-/**
- * A `Bolt12Invoice` is a payment request, typically corresponding to an [`Offer`] or a [`Refund`].
- *
- * An invoice may be sent in response to an [`InvoiceRequest`] in the case of an offer or sent
- * directly after scanning a refund. It includes all the information needed to pay a recipient.
- *
- * [`Offer`]: crate::offers::offer::Offer
- * [`Refund`]: crate::offers::refund::Refund
- * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
- */
-typedef struct MUST_USE_STRUCT LDKBolt12Invoice {
-   /**
-    * 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.
-    */
-   LDKnativeBolt12Invoice *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;
-} LDKBolt12Invoice;
-
-
-
-/**
- * An error in response to an [`InvoiceRequest`] or an [`Bolt12Invoice`].
- *
- * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
- * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
- */
-typedef struct MUST_USE_STRUCT LDKInvoiceError {
-   /**
-    * 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.
-    */
-   LDKnativeInvoiceError *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;
-} LDKInvoiceError;
-
 /**
- * Possible BOLT 12 Offers messages sent and received via an [`OnionMessage`].
- *
- * [`OnionMessage`]: crate::ln::msgs::OnionMessage
+ * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef enum LDKOffersMessage_Tag {
-   /**
-    * A request for a [`Bolt12Invoice`] for a particular [`Offer`].
-    *
-    * [`Offer`]: crate::offers::offer::Offer
-    */
-   LDKOffersMessage_InvoiceRequest,
+typedef struct LDKC2Tuple_PublicKeyCVec_SocketAddressZZ {
    /**
-    * A [`Bolt12Invoice`] sent in response to an [`InvoiceRequest`] or a [`Refund`].
-    *
-    * [`Refund`]: crate::offers::refund::Refund
-    */
-   LDKOffersMessage_Invoice,
-   /**
-    * An error from handling an [`OffersMessage`].
+    * The element at position 0
     */
-   LDKOffersMessage_InvoiceError,
+   struct LDKPublicKey a;
    /**
-    * Must be last for serialization purposes
+    * The element at position 1
     */
-   LDKOffersMessage_Sentinel,
-} LDKOffersMessage_Tag;
-
-typedef struct MUST_USE_STRUCT LDKOffersMessage {
-   LDKOffersMessage_Tag tag;
-   union {
-      struct {
-         struct LDKInvoiceRequest invoice_request;
-      };
-      struct {
-         struct LDKBolt12Invoice invoice;
-      };
-      struct {
-         struct LDKInvoiceError invoice_error;
-      };
-   };
-} LDKOffersMessage;
+   struct LDKCVec_SocketAddressZ b;
+} LDKC2Tuple_PublicKeyCVec_SocketAddressZZ;
 
 /**
- * An enum which can either contain a crate::lightning::onion_message::offers::OffersMessage or not
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZs of arbitrary size.
+ * This corresponds to std::vector in C++
  */
-typedef enum LDKCOption_OffersMessageZ_Tag {
+typedef struct LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
    /**
-    * When we're in this state, this COption_OffersMessageZ contains a crate::lightning::onion_message::offers::OffersMessage
-    */
-   LDKCOption_OffersMessageZ_Some,
-   /**
-    * When we're in this state, this COption_OffersMessageZ contains nothing
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   LDKCOption_OffersMessageZ_None,
+   struct LDKC2Tuple_PublicKeyCVec_SocketAddressZZ *data;
    /**
-    * Must be last for serialization purposes
+    * The number of elements pointed to by `data`.
     */
-   LDKCOption_OffersMessageZ_Sentinel,
-} LDKCOption_OffersMessageZ_Tag;
-
-typedef struct LDKCOption_OffersMessageZ {
-   LDKCOption_OffersMessageZ_Tag tag;
-   union {
-      struct {
-         struct LDKOffersMessage some;
-      };
-   };
-} LDKCOption_OffersMessageZ;
+   uintptr_t datalen;
+} LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ;
 
 /**
- * The contents of a custom onion message.
+ * The contents of an onion message.
  */
-typedef struct LDKCustomOnionMessageContents {
+typedef struct LDKOnionMessageContents {
    /**
     * An opaque pointer which is passed to your function implementations as an argument.
     * This has no meaning in the LDK, and can be NULL or any other value.
@@ -9969,72 +13327,116 @@ typedef struct LDKCustomOnionMessageContents {
     * Serialize the object into a byte array
     */
    struct LDKCVec_u8Z (*write)(const void *this_arg);
+   /**
+    * Return a human-readable "debug" string describing this object
+    */
+   struct LDKStr (*debug_str)(const void *this_arg);
+   /**
+    * Called, if set, after this OnionMessageContents has been cloned into a duplicate object.
+    * The new OnionMessageContents is provided, and should be mutated as needed to perform a
+    * deep copy of the object pointed to by this_arg or avoid any double-freeing.
+    */
+   void (*cloned)(struct LDKOnionMessageContents *NONNULL_PTR new_OnionMessageContents);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
     */
    void (*free)(void *this_arg);
-} LDKCustomOnionMessageContents;
+} LDKOnionMessageContents;
 
 /**
- * An enum which can either contain a crate::lightning::onion_message::packet::CustomOnionMessageContents or not
+ * An enum which can either contain a crate::lightning::onion_message::packet::OnionMessageContents or not
  */
-typedef enum LDKCOption_CustomOnionMessageContentsZ_Tag {
+typedef enum LDKCOption_OnionMessageContentsZ_Tag {
    /**
-    * When we're in this state, this COption_CustomOnionMessageContentsZ contains a crate::lightning::onion_message::packet::CustomOnionMessageContents
+    * When we're in this state, this COption_OnionMessageContentsZ contains a crate::lightning::onion_message::packet::OnionMessageContents
     */
-   LDKCOption_CustomOnionMessageContentsZ_Some,
+   LDKCOption_OnionMessageContentsZ_Some,
    /**
-    * When we're in this state, this COption_CustomOnionMessageContentsZ contains nothing
+    * When we're in this state, this COption_OnionMessageContentsZ contains nothing
     */
-   LDKCOption_CustomOnionMessageContentsZ_None,
+   LDKCOption_OnionMessageContentsZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_CustomOnionMessageContentsZ_Sentinel,
-} LDKCOption_CustomOnionMessageContentsZ_Tag;
+   LDKCOption_OnionMessageContentsZ_Sentinel,
+} LDKCOption_OnionMessageContentsZ_Tag;
 
-typedef struct LDKCOption_CustomOnionMessageContentsZ {
-   LDKCOption_CustomOnionMessageContentsZ_Tag tag;
+typedef struct LDKCOption_OnionMessageContentsZ {
+   LDKCOption_OnionMessageContentsZ_Tag tag;
    union {
       struct {
-         struct LDKCustomOnionMessageContents some;
+         struct LDKOnionMessageContents some;
       };
    };
-} LDKCOption_CustomOnionMessageContentsZ;
+} LDKCOption_OnionMessageContentsZ;
 
 /**
- * The contents of CResult_COption_CustomOnionMessageContentsZDecodeErrorZ
+ * The contents of CResult_COption_OnionMessageContentsZDecodeErrorZ
  */
-typedef union LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZPtr {
+typedef union LDKCResult_COption_OnionMessageContentsZDecodeErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKCOption_CustomOnionMessageContentsZ *result;
+   struct LDKCOption_OnionMessageContentsZ *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_COption_CustomOnionMessageContentsZDecodeErrorZPtr;
+} LDKCResult_COption_OnionMessageContentsZDecodeErrorZPtr;
 
 /**
- * A CResult_COption_CustomOnionMessageContentsZDecodeErrorZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::COption_CustomOnionMessageContentsZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * A CResult_COption_OnionMessageContentsZDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::COption_OnionMessageContentsZ 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_COption_CustomOnionMessageContentsZDecodeErrorZ {
+typedef struct LDKCResult_COption_OnionMessageContentsZDecodeErrorZ {
    /**
-    * The contents of this CResult_COption_CustomOnionMessageContentsZDecodeErrorZ, accessible via either
+    * The contents of this CResult_COption_OnionMessageContentsZDecodeErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZPtr contents;
+   union LDKCResult_COption_OnionMessageContentsZDecodeErrorZPtr contents;
    /**
-    * Whether this CResult_COption_CustomOnionMessageContentsZDecodeErrorZ represents a success state.
+    * Whether this CResult_COption_OnionMessageContentsZDecodeErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ;
+} LDKCResult_COption_OnionMessageContentsZDecodeErrorZ;
+
+/**
+ * A tuple of 3 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ {
+   /**
+    * The element at position 0
+    */
+   struct LDKOnionMessageContents a;
+   /**
+    * The element at position 1
+    */
+   struct LDKDestination b;
+   /**
+    * The element at position 2
+    */
+   struct LDKBlindedPath c;
+} LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ;
 
 /**
  * An enum which can either contain a crate::lightning::ln::wire::Type or not
@@ -10097,61 +13499,67 @@ typedef struct LDKCResult_COption_TypeZDecodeErrorZ {
 } LDKCResult_COption_TypeZDecodeErrorZ;
 
 /**
- * An enum which can either contain a crate::lightning::ln::msgs::NetAddress or not
+ * An enum which can either contain a crate::lightning::ln::msgs::SocketAddress or not
  */
-typedef enum LDKCOption_NetAddressZ_Tag {
+typedef enum LDKCOption_SocketAddressZ_Tag {
    /**
-    * When we're in this state, this COption_NetAddressZ contains a crate::lightning::ln::msgs::NetAddress
+    * When we're in this state, this COption_SocketAddressZ contains a crate::lightning::ln::msgs::SocketAddress
     */
-   LDKCOption_NetAddressZ_Some,
+   LDKCOption_SocketAddressZ_Some,
    /**
-    * When we're in this state, this COption_NetAddressZ contains nothing
+    * When we're in this state, this COption_SocketAddressZ contains nothing
     */
-   LDKCOption_NetAddressZ_None,
+   LDKCOption_SocketAddressZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_NetAddressZ_Sentinel,
-} LDKCOption_NetAddressZ_Tag;
+   LDKCOption_SocketAddressZ_Sentinel,
+} LDKCOption_SocketAddressZ_Tag;
 
-typedef struct LDKCOption_NetAddressZ {
-   LDKCOption_NetAddressZ_Tag tag;
+typedef struct LDKCOption_SocketAddressZ {
+   LDKCOption_SocketAddressZ_Tag tag;
    union {
       struct {
-         struct LDKNetAddress some;
+         struct LDKSocketAddress some;
       };
    };
-} LDKCOption_NetAddressZ;
+} LDKCOption_SocketAddressZ;
+
+
 
 /**
- * A tuple of 2 elements. See the individual fields for the types contained.
+ * Details of a connected peer as returned by [`PeerManager::list_peers`].
  */
-typedef struct LDKC2Tuple_PublicKeyCOption_NetAddressZZ {
+typedef struct MUST_USE_STRUCT LDKPeerDetails {
    /**
-    * The element at position 0
+    * 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.
     */
-   struct LDKPublicKey a;
+   LDKnativePeerDetails *inner;
    /**
-    * The element at position 1
+    * 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.
     */
-   struct LDKCOption_NetAddressZ b;
-} LDKC2Tuple_PublicKeyCOption_NetAddressZZ;
+   bool is_owned;
+} LDKPeerDetails;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_PublicKeyCOption_NetAddressZZs of arbitrary size.
+ * A dynamically-allocated array of crate::lightning::ln::peer_handler::PeerDetailss of arbitrary size.
  * This corresponds to std::vector in C++
  */
-typedef struct LDKCVec_C2Tuple_PublicKeyCOption_NetAddressZZZ {
+typedef struct LDKCVec_PeerDetailsZ {
    /**
     * The elements in the array.
     * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   struct LDKC2Tuple_PublicKeyCOption_NetAddressZZ *data;
+   struct LDKPeerDetails *data;
    /**
     * The number of elements pointed to by `data`.
     */
    uintptr_t datalen;
-} LDKCVec_C2Tuple_PublicKeyCOption_NetAddressZZZ;
+} LDKCVec_PeerDetailsZ;
 
 
 
@@ -10323,7 +13731,7 @@ typedef union LDKCResult_u32GraphSyncErrorZPtr {
 
 /**
  * A CResult_u32GraphSyncErrorZ represents the result of a fallible operation,
- * containing a u32 on success and a crate::lightning_rapid_gossip_sync::error::GraphSyncError on failure.
+ * containing a u32 on success and a crate::lightning_rapid_gossip_sync::GraphSyncError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
 typedef struct LDKCResult_u32GraphSyncErrorZ {
@@ -10338,6 +13746,236 @@ typedef struct LDKCResult_u32GraphSyncErrorZ {
    bool result_ok;
 } LDKCResult_u32GraphSyncErrorZ;
 
+/**
+ * The contents of CResult_CVec_u8ZIOErrorZ
+ */
+typedef union LDKCResult_CVec_u8ZIOErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKCVec_u8Z *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKIOError *err;
+} LDKCResult_CVec_u8ZIOErrorZPtr;
+
+/**
+ * A CResult_CVec_u8ZIOErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::CVec_u8Z on success and a crate::c_types::IOError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_CVec_u8ZIOErrorZ {
+   /**
+    * The contents of this CResult_CVec_u8ZIOErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_CVec_u8ZIOErrorZPtr contents;
+   /**
+    * Whether this CResult_CVec_u8ZIOErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_CVec_u8ZIOErrorZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::Strs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_StrZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKStr *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_StrZ;
+
+/**
+ * The contents of CResult_CVec_StrZIOErrorZ
+ */
+typedef union LDKCResult_CVec_StrZIOErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKCVec_StrZ *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKIOError *err;
+} LDKCResult_CVec_StrZIOErrorZPtr;
+
+/**
+ * A CResult_CVec_StrZIOErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::CVec_StrZ on success and a crate::c_types::IOError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_CVec_StrZIOErrorZ {
+   /**
+    * The contents of this CResult_CVec_StrZIOErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_CVec_StrZIOErrorZPtr contents;
+   /**
+    * Whether this CResult_CVec_StrZIOErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_CVec_StrZIOErrorZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ;
+
+/**
+ * The contents of CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ
+ */
+typedef union LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKIOError *err;
+} LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr;
+
+/**
+ * A CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ on success and a crate::c_types::IOError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+   /**
+    * The contents of this CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr contents;
+   /**
+    * Whether this CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ;
+
+/**
+ * The contents of CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ
+ */
+typedef union LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKIOError *err;
+} LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr;
+
+/**
+ * A CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ on success and a crate::c_types::IOError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
+   /**
+    * The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr contents;
+   /**
+    * Whether this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ;
+
+/**
+ * The contents of CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKUnsignedInvoiceRequest *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice_request::UnsignedInvoiceRequest on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ;
+
+/**
+ * The contents of CResult_InvoiceRequestBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_InvoiceRequestBolt12SemanticErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKInvoiceRequest *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_InvoiceRequestBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_InvoiceRequestBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice_request::InvoiceRequest on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_InvoiceRequestBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_InvoiceRequestBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_InvoiceRequestBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_InvoiceRequestBolt12SemanticErrorZ;
+
 /**
  * Represents a valid secp256k1 secret key serialized as a 32 byte array.
  */
@@ -10351,88 +13989,259 @@ typedef struct LDKSecretKey {
 /**
  * An enum which can either contain a crate::c_types::SecretKey or not
  */
-typedef enum LDKCOption_KeyPairZ_Tag {
+typedef enum LDKCOption_SecretKeyZ_Tag {
    /**
-    * When we're in this state, this COption_KeyPairZ contains a crate::c_types::SecretKey
+    * When we're in this state, this COption_SecretKeyZ contains a crate::c_types::SecretKey
     */
-   LDKCOption_KeyPairZ_Some,
+   LDKCOption_SecretKeyZ_Some,
    /**
-    * When we're in this state, this COption_KeyPairZ contains nothing
+    * When we're in this state, this COption_SecretKeyZ contains nothing
     */
-   LDKCOption_KeyPairZ_None,
+   LDKCOption_SecretKeyZ_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_KeyPairZ_Sentinel,
-} LDKCOption_KeyPairZ_Tag;
+   LDKCOption_SecretKeyZ_Sentinel,
+} LDKCOption_SecretKeyZ_Tag;
 
-typedef struct LDKCOption_KeyPairZ {
-   LDKCOption_KeyPairZ_Tag tag;
+typedef struct LDKCOption_SecretKeyZ {
+   LDKCOption_SecretKeyZ_Tag tag;
    union {
       struct {
          struct LDKSecretKey some;
       };
    };
-} LDKCOption_KeyPairZ;
+} LDKCOption_SecretKeyZ;
+
+
+
+/**
+ * Builds a [`Bolt12Invoice`] from either:
+ * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or
+ * - a [`Refund`] for the \"offer for money\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Refund`]: crate::offers::refund::Refund
+ * [module-level documentation]: self
+ */
+typedef struct MUST_USE_STRUCT LDKInvoiceWithExplicitSigningPubkeyBuilder {
+   /**
+    * 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.
+    */
+   LDKnativeInvoiceWithExplicitSigningPubkeyBuilder *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;
+} LDKInvoiceWithExplicitSigningPubkeyBuilder;
+
+/**
+ * The contents of CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKInvoiceWithExplicitSigningPubkeyBuilder *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ;
+
+
 
 /**
- * The contents of CResult_COption_KeyPairZNoneZ
+ * An [`InvoiceRequest`] that has been verified by [`InvoiceRequest::verify`] and exposes different
+ * ways to respond depending on whether the signing keys were derived.
  */
-typedef union LDKCResult_COption_KeyPairZNoneZPtr {
+typedef struct MUST_USE_STRUCT LDKVerifiedInvoiceRequest {
+   /**
+    * 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.
+    */
+   LDKnativeVerifiedInvoiceRequest *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;
+} LDKVerifiedInvoiceRequest;
+
+/**
+ * The contents of CResult_VerifiedInvoiceRequestNoneZ
+ */
+typedef union LDKCResult_VerifiedInvoiceRequestNoneZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKCOption_KeyPairZ *result;
+   struct LDKVerifiedInvoiceRequest *result;
    /**
     * Note that this value is always NULL, as there are no contents in the Err variant
     */
    void *err;
-} LDKCResult_COption_KeyPairZNoneZPtr;
+} LDKCResult_VerifiedInvoiceRequestNoneZPtr;
 
 /**
- * A CResult_COption_KeyPairZNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::COption_KeyPairZ on success and a () on failure.
+ * A CResult_VerifiedInvoiceRequestNoneZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice_request::VerifiedInvoiceRequest on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_COption_KeyPairZNoneZ {
+typedef struct LDKCResult_VerifiedInvoiceRequestNoneZ {
    /**
-    * The contents of this CResult_COption_KeyPairZNoneZ, accessible via either
+    * The contents of this CResult_VerifiedInvoiceRequestNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_COption_KeyPairZNoneZPtr contents;
+   union LDKCResult_VerifiedInvoiceRequestNoneZPtr contents;
    /**
-    * Whether this CResult_COption_KeyPairZNoneZ represents a success state.
+    * Whether this CResult_VerifiedInvoiceRequestNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_COption_KeyPairZNoneZ;
+} LDKCResult_VerifiedInvoiceRequestNoneZ;
+
+
 
 /**
- * An enum which can either contain a crate::c_types::derived::CVec_u8Z or not
+ * Builds a [`Bolt12Invoice`] from either:
+ * - an [`InvoiceRequest`] for the \"offer to be paid\" flow or
+ * - a [`Refund`] for the \"offer for money\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Refund`]: crate::offers::refund::Refund
+ * [module-level documentation]: self
  */
-typedef enum LDKCOption_ScriptZ_Tag {
+typedef struct MUST_USE_STRUCT LDKInvoiceWithDerivedSigningPubkeyBuilder {
    /**
-    * When we're in this state, this COption_ScriptZ contains a crate::c_types::derived::CVec_u8Z
+    * 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.
     */
-   LDKCOption_ScriptZ_Some,
+   LDKnativeInvoiceWithDerivedSigningPubkeyBuilder *inner;
    /**
-    * When we're in this state, this COption_ScriptZ contains nothing
+    * 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.
     */
-   LDKCOption_ScriptZ_None,
+   bool is_owned;
+} LDKInvoiceWithDerivedSigningPubkeyBuilder;
+
+/**
+ * The contents of CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ
+ */
+typedef union LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr {
    /**
-    * Must be last for serialization purposes
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   LDKCOption_ScriptZ_Sentinel,
-} LDKCOption_ScriptZ_Tag;
+   struct LDKInvoiceWithDerivedSigningPubkeyBuilder *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   enum LDKBolt12SemanticError *err;
+} LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr;
+
+/**
+ * A CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+   /**
+    * The contents of this CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr contents;
+   /**
+    * Whether this CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ;
+
 
-typedef struct LDKCOption_ScriptZ {
-   LDKCOption_ScriptZ_Tag tag;
-   union {
-      struct {
-         struct LDKCVec_u8Z some;
-      };
-   };
-} LDKCOption_ScriptZ;
+
+/**
+ * Fields sent in an [`InvoiceRequest`] message to include in [`PaymentContext::Bolt12Offer`].
+ *
+ * [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
+ */
+typedef struct MUST_USE_STRUCT LDKInvoiceRequestFields {
+   /**
+    * 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.
+    */
+   LDKnativeInvoiceRequestFields *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;
+} LDKInvoiceRequestFields;
+
+/**
+ * The contents of CResult_InvoiceRequestFieldsDecodeErrorZ
+ */
+typedef union LDKCResult_InvoiceRequestFieldsDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKInvoiceRequestFields *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_InvoiceRequestFieldsDecodeErrorZPtr;
+
+/**
+ * A CResult_InvoiceRequestFieldsDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::offers::invoice_request::InvoiceRequestFields 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_InvoiceRequestFieldsDecodeErrorZ {
+   /**
+    * The contents of this CResult_InvoiceRequestFieldsDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_InvoiceRequestFieldsDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_InvoiceRequestFieldsDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_InvoiceRequestFieldsDecodeErrorZ;
 
 /**
  * A dynamically-allocated array of crate::c_types::Witnesss of arbitrary size.
@@ -10450,6 +14259,33 @@ typedef struct LDKCVec_WitnessZ {
    uintptr_t datalen;
 } LDKCVec_WitnessZ;
 
+/**
+ * An enum which can either contain a crate::c_types::ECDSASignature or not
+ */
+typedef enum LDKCOption_ECDSASignatureZ_Tag {
+   /**
+    * When we're in this state, this COption_ECDSASignatureZ contains a crate::c_types::ECDSASignature
+    */
+   LDKCOption_ECDSASignatureZ_Some,
+   /**
+    * When we're in this state, this COption_ECDSASignatureZ contains nothing
+    */
+   LDKCOption_ECDSASignatureZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_ECDSASignatureZ_Sentinel,
+} LDKCOption_ECDSASignatureZ_Tag;
+
+typedef struct LDKCOption_ECDSASignatureZ {
+   LDKCOption_ECDSASignatureZ_Tag tag;
+   union {
+      struct {
+         struct LDKECDSASignature some;
+      };
+   };
+} LDKCOption_ECDSASignatureZ;
+
 /**
  * An enum which can either contain a i64 or not
  */
@@ -10478,64 +14314,70 @@ typedef struct LDKCOption_i64Z {
 } LDKCOption_i64Z;
 
 /**
- * An enum which can either contain a crate::c_types::ThirtyTwoBytes or not
+ * The contents of CResult_SocketAddressDecodeErrorZ
  */
-typedef enum LDKCOption_TxidZ_Tag {
+typedef union LDKCResult_SocketAddressDecodeErrorZPtr {
    /**
-    * When we're in this state, this COption_TxidZ contains a crate::c_types::ThirtyTwoBytes
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   LDKCOption_TxidZ_Some,
+   struct LDKSocketAddress *result;
    /**
-    * When we're in this state, this COption_TxidZ contains nothing
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   LDKCOption_TxidZ_None,
+   struct LDKDecodeError *err;
+} LDKCResult_SocketAddressDecodeErrorZPtr;
+
+/**
+ * A CResult_SocketAddressDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::SocketAddress 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_SocketAddressDecodeErrorZ {
    /**
-    * Must be last for serialization purposes
+    * The contents of this CResult_SocketAddressDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
     */
-   LDKCOption_TxidZ_Sentinel,
-} LDKCOption_TxidZ_Tag;
-
-typedef struct LDKCOption_TxidZ {
-   LDKCOption_TxidZ_Tag tag;
-   union {
-      struct {
-         struct LDKThirtyTwoBytes some;
-      };
-   };
-} LDKCOption_TxidZ;
+   union LDKCResult_SocketAddressDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_SocketAddressDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_SocketAddressDecodeErrorZ;
 
 /**
- * The contents of CResult_NetAddressDecodeErrorZ
+ * The contents of CResult_SocketAddressSocketAddressParseErrorZ
  */
-typedef union LDKCResult_NetAddressDecodeErrorZPtr {
+typedef union LDKCResult_SocketAddressSocketAddressParseErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKNetAddress *result;
+   struct LDKSocketAddress *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_NetAddressDecodeErrorZPtr;
+   enum LDKSocketAddressParseError *err;
+} LDKCResult_SocketAddressSocketAddressParseErrorZPtr;
 
 /**
- * A CResult_NetAddressDecodeErrorZ represents the result of a fallible operation,
- * containing a crate::lightning::ln::msgs::NetAddress on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * A CResult_SocketAddressSocketAddressParseErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::SocketAddress on success and a crate::lightning::ln::msgs::SocketAddressParseError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_NetAddressDecodeErrorZ {
+typedef struct LDKCResult_SocketAddressSocketAddressParseErrorZ {
    /**
-    * The contents of this CResult_NetAddressDecodeErrorZ, accessible via either
+    * The contents of this CResult_SocketAddressSocketAddressParseErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_NetAddressDecodeErrorZPtr contents;
+   union LDKCResult_SocketAddressSocketAddressParseErrorZPtr contents;
    /**
-    * Whether this CResult_NetAddressDecodeErrorZ represents a success state.
+    * Whether this CResult_SocketAddressSocketAddressParseErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_NetAddressDecodeErrorZ;
+} LDKCResult_SocketAddressSocketAddressParseErrorZ;
 
 
 
@@ -10755,6 +14597,138 @@ typedef struct LDKCResult_AcceptChannelV2DecodeErrorZ {
    bool result_ok;
 } LDKCResult_AcceptChannelV2DecodeErrorZ;
 
+/**
+ * The contents of CResult_StfuDecodeErrorZ
+ */
+typedef union LDKCResult_StfuDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKStfu *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_StfuDecodeErrorZPtr;
+
+/**
+ * A CResult_StfuDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::Stfu 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_StfuDecodeErrorZ {
+   /**
+    * The contents of this CResult_StfuDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_StfuDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_StfuDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_StfuDecodeErrorZ;
+
+/**
+ * The contents of CResult_SpliceDecodeErrorZ
+ */
+typedef union LDKCResult_SpliceDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKSplice *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_SpliceDecodeErrorZPtr;
+
+/**
+ * A CResult_SpliceDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::Splice 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_SpliceDecodeErrorZ {
+   /**
+    * The contents of this CResult_SpliceDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_SpliceDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_SpliceDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_SpliceDecodeErrorZ;
+
+/**
+ * The contents of CResult_SpliceAckDecodeErrorZ
+ */
+typedef union LDKCResult_SpliceAckDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKSpliceAck *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_SpliceAckDecodeErrorZPtr;
+
+/**
+ * A CResult_SpliceAckDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::SpliceAck 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_SpliceAckDecodeErrorZ {
+   /**
+    * The contents of this CResult_SpliceAckDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_SpliceAckDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_SpliceAckDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_SpliceAckDecodeErrorZ;
+
+/**
+ * The contents of CResult_SpliceLockedDecodeErrorZ
+ */
+typedef union LDKCResult_SpliceLockedDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKSpliceLocked *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_SpliceLockedDecodeErrorZPtr;
+
+/**
+ * A CResult_SpliceLockedDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::SpliceLocked 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_SpliceLockedDecodeErrorZ {
+   /**
+    * The contents of this CResult_SpliceLockedDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_SpliceLockedDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_SpliceLockedDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_SpliceLockedDecodeErrorZ;
+
 /**
  * The contents of CResult_TxAddInputDecodeErrorZ
  */
@@ -11019,27 +14993,6 @@ typedef struct LDKCResult_TxAckRbfDecodeErrorZ {
    bool result_ok;
 } LDKCResult_TxAckRbfDecodeErrorZ;
 
-
-
-/**
- * A tx_abort message which signals the cancellation of an in-progress transaction negotiation.
- *
- */
-typedef struct MUST_USE_STRUCT LDKTxAbort {
-   /**
-    * 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.
-    */
-   LDKnativeTxAbort *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;
-} LDKTxAbort;
-
 /**
  * The contents of CResult_TxAbortDecodeErrorZ
  */
@@ -11723,6 +15676,39 @@ typedef struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ {
    bool result_ok;
 } LDKCResult_UpdateFulfillHTLCDecodeErrorZ;
 
+/**
+ * The contents of CResult_OnionPacketDecodeErrorZ
+ */
+typedef union LDKCResult_OnionPacketDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKOnionPacket *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_OnionPacketDecodeErrorZPtr;
+
+/**
+ * A CResult_OnionPacketDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::OnionPacket 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_OnionPacketDecodeErrorZ {
+   /**
+    * The contents of this CResult_OnionPacketDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_OnionPacketDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_OnionPacketDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_OnionPacketDecodeErrorZ;
+
 /**
  * The contents of CResult_UpdateAddHTLCDecodeErrorZ
  */
@@ -11810,6 +15796,39 @@ typedef struct LDKCResult_OnionMessageDecodeErrorZ {
    bool result_ok;
 } LDKCResult_OnionMessageDecodeErrorZ;
 
+/**
+ * The contents of CResult_FinalOnionHopDataDecodeErrorZ
+ */
+typedef union LDKCResult_FinalOnionHopDataDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKFinalOnionHopData *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_FinalOnionHopDataDecodeErrorZPtr;
+
+/**
+ * A CResult_FinalOnionHopDataDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::FinalOnionHopData 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_FinalOnionHopDataDecodeErrorZ {
+   /**
+    * The contents of this CResult_FinalOnionHopDataDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_FinalOnionHopDataDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_FinalOnionHopDataDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_FinalOnionHopDataDecodeErrorZ;
+
 
 
 /**
@@ -12482,8 +16501,6 @@ typedef struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ {
 
 /**
  * A simple future which can complete once, and calls some callback(s) when it does so.
- *
- * Clones can be made and all futures cloned from the same source will complete at the same time.
  */
 typedef struct MUST_USE_STRUCT LDKFuture {
    /**
@@ -13082,36 +17099,63 @@ typedef struct LDKCResult_TrustedCommitmentTransactionNoneZ {
 } LDKCResult_TrustedCommitmentTransactionNoneZ;
 
 /**
- * The contents of CResult_CVec_SignatureZNoneZ
+ * The contents of CResult_CVec_ECDSASignatureZNoneZ
  */
-typedef union LDKCResult_CVec_SignatureZNoneZPtr {
+typedef union LDKCResult_CVec_ECDSASignatureZNoneZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKCVec_SignatureZ *result;
+   struct LDKCVec_ECDSASignatureZ *result;
    /**
     * Note that this value is always NULL, as there are no contents in the Err variant
     */
    void *err;
-} LDKCResult_CVec_SignatureZNoneZPtr;
+} LDKCResult_CVec_ECDSASignatureZNoneZPtr;
 
 /**
- * A CResult_CVec_SignatureZNoneZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::CVec_SignatureZ on success and a () on failure.
+ * A CResult_CVec_ECDSASignatureZNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::CVec_ECDSASignatureZ on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_CVec_SignatureZNoneZ {
+typedef struct LDKCResult_CVec_ECDSASignatureZNoneZ {
    /**
-    * The contents of this CResult_CVec_SignatureZNoneZ, accessible via either
+    * The contents of this CResult_CVec_ECDSASignatureZNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_CVec_SignatureZNoneZPtr contents;
+   union LDKCResult_CVec_ECDSASignatureZNoneZPtr contents;
    /**
-    * Whether this CResult_CVec_SignatureZNoneZ represents a success state.
+    * Whether this CResult_CVec_ECDSASignatureZNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_CVec_SignatureZNoneZ;
+} LDKCResult_CVec_ECDSASignatureZNoneZ;
+
+/**
+ * An enum which can either contain a usize or not
+ */
+typedef enum LDKCOption_usizeZ_Tag {
+   /**
+    * When we're in this state, this COption_usizeZ contains a usize
+    */
+   LDKCOption_usizeZ_Some,
+   /**
+    * When we're in this state, this COption_usizeZ contains nothing
+    */
+   LDKCOption_usizeZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_usizeZ_Sentinel,
+} LDKCOption_usizeZ_Tag;
+
+typedef struct LDKCOption_usizeZ {
+   LDKCOption_usizeZ_Tag tag;
+   union {
+      struct {
+         uintptr_t some;
+      };
+   };
+} LDKCOption_usizeZ;
 
 /**
  * The contents of CResult_ShutdownScriptDecodeErrorZ
@@ -13149,7 +17193,7 @@ typedef struct LDKCResult_ShutdownScriptDecodeErrorZ {
 
 
 /**
- * An error occurring when converting from [`Script`] to [`ShutdownScript`].
+ * An error occurring when converting from [`ScriptBuf`] to [`ShutdownScript`].
  */
 typedef struct MUST_USE_STRUCT LDKInvalidShutdownScript {
    /**
@@ -13205,9 +17249,21 @@ typedef struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ {
  */
 typedef enum LDKPaymentPurpose_Tag {
    /**
-    * Information for receiving a payment that we generated an invoice for.
+    * A payment for a BOLT 11 invoice.
+    */
+   LDKPaymentPurpose_Bolt11InvoicePayment,
+   /**
+    * A payment for a BOLT 12 [`Offer`].
+    *
+    * [`Offer`]: crate::offers::offer::Offer
+    */
+   LDKPaymentPurpose_Bolt12OfferPayment,
+   /**
+    * A payment for a BOLT 12 [`Refund`].
+    *
+    * [`Refund`]: crate::offers::refund::Refund
     */
-   LDKPaymentPurpose_InvoicePayment,
+   LDKPaymentPurpose_Bolt12RefundPayment,
    /**
     * Because this is a spontaneous payment, the payer generated their own preimage rather than us
     * (the payee) providing a preimage.
@@ -13219,16 +17275,17 @@ typedef enum LDKPaymentPurpose_Tag {
    LDKPaymentPurpose_Sentinel,
 } LDKPaymentPurpose_Tag;
 
-typedef struct LDKPaymentPurpose_LDKInvoicePayment_Body {
+typedef struct LDKPaymentPurpose_LDKBolt11InvoicePayment_Body {
    /**
     * The preimage to the payment_hash, if the payment hash (and secret) were fetched via
-    * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to
-    * [`ChannelManager::claim_funds`].
+    * [`ChannelManager::create_inbound_payment`]. When handling [`Event::PaymentClaimable`],
+    * this can be passed directly to [`ChannelManager::claim_funds`] to claim the payment. No
+    * action is needed when seen in [`Event::PaymentClaimed`].
     *
     * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment
     * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
     */
-   struct LDKCOption_PaymentPreimageZ payment_preimage;
+   struct LDKCOption_ThirtyTwoBytesZ payment_preimage;
    /**
     * The \"payment secret\". This authenticates the sender to the recipient, preventing a
     * number of deanonymization attacks during the routing process.
@@ -13242,12 +17299,64 @@ typedef struct LDKPaymentPurpose_LDKInvoicePayment_Body {
     * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash
     */
    struct LDKThirtyTwoBytes payment_secret;
-} LDKPaymentPurpose_LDKInvoicePayment_Body;
+} LDKPaymentPurpose_LDKBolt11InvoicePayment_Body;
+
+typedef struct LDKPaymentPurpose_LDKBolt12OfferPayment_Body {
+   /**
+    * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be
+    * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed
+    * when seen in [`Event::PaymentClaimed`].
+    *
+    * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
+    */
+   struct LDKCOption_ThirtyTwoBytesZ payment_preimage;
+   /**
+    * The secret used to authenticate the sender to the recipient, preventing a number of
+    * de-anonymization attacks while routing a payment.
+    *
+    * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details.
+    */
+   struct LDKThirtyTwoBytes payment_secret;
+   /**
+    * The context of the payment such as information about the corresponding [`Offer`] and
+    * [`InvoiceRequest`].
+    *
+    * [`Offer`]: crate::offers::offer::Offer
+    * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+    */
+   struct LDKBolt12OfferContext payment_context;
+} LDKPaymentPurpose_LDKBolt12OfferPayment_Body;
+
+typedef struct LDKPaymentPurpose_LDKBolt12RefundPayment_Body {
+   /**
+    * The preimage to the payment hash. When handling [`Event::PaymentClaimable`], this can be
+    * passed directly to [`ChannelManager::claim_funds`], if provided. No action is needed
+    * when seen in [`Event::PaymentClaimed`].
+    *
+    * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
+    */
+   struct LDKCOption_ThirtyTwoBytesZ payment_preimage;
+   /**
+    * The secret used to authenticate the sender to the recipient, preventing a number of
+    * de-anonymization attacks while routing a payment.
+    *
+    * See [`PaymentPurpose::Bolt11InvoicePayment::payment_secret`] for further details.
+    */
+   struct LDKThirtyTwoBytes payment_secret;
+   /**
+    * The context of the payment such as information about the corresponding [`Refund`].
+    *
+    * [`Refund`]: crate::offers::refund::Refund
+    */
+   struct LDKBolt12RefundContext payment_context;
+} LDKPaymentPurpose_LDKBolt12RefundPayment_Body;
 
 typedef struct MUST_USE_STRUCT LDKPaymentPurpose {
    LDKPaymentPurpose_Tag tag;
    union {
-      LDKPaymentPurpose_LDKInvoicePayment_Body invoice_payment;
+      LDKPaymentPurpose_LDKBolt11InvoicePayment_Body bolt11_invoice_payment;
+      LDKPaymentPurpose_LDKBolt12OfferPayment_Body bolt12_offer_payment;
+      LDKPaymentPurpose_LDKBolt12RefundPayment_Body bolt12_refund_payment;
       struct {
          struct LDKThirtyTwoBytes spontaneous_payment;
       };
@@ -13287,6 +17396,59 @@ typedef struct LDKCResult_PaymentPurposeDecodeErrorZ {
    bool result_ok;
 } LDKCResult_PaymentPurposeDecodeErrorZ;
 
+
+
+/**
+ * Information about an HTLC that is part of a payment that can be claimed.
+ */
+typedef struct MUST_USE_STRUCT LDKClaimedHTLC {
+   /**
+    * 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.
+    */
+   LDKnativeClaimedHTLC *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;
+} LDKClaimedHTLC;
+
+/**
+ * The contents of CResult_ClaimedHTLCDecodeErrorZ
+ */
+typedef union LDKCResult_ClaimedHTLCDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKClaimedHTLC *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_ClaimedHTLCDecodeErrorZPtr;
+
+/**
+ * A CResult_ClaimedHTLCDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::events::ClaimedHTLC 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_ClaimedHTLCDecodeErrorZ {
+   /**
+    * The contents of this CResult_ClaimedHTLCDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_ClaimedHTLCDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_ClaimedHTLCDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_ClaimedHTLCDecodeErrorZ;
+
 /**
  * When the payment path failure took place and extra details about it. [`PathFailure::OnPath`] may
  * contain a [`NetworkUpdate`] that needs to be applied to the [`NetworkGraph`].
@@ -13396,122 +17558,6 @@ typedef struct LDKCResult_COption_PathFailureZDecodeErrorZ {
    bool result_ok;
 } LDKCResult_COption_PathFailureZDecodeErrorZ;
 
-
-
-/**
- * Struct to `Display` fields in a safe way using `PrintableString`
- */
-typedef struct MUST_USE_STRUCT LDKUntrustedString {
-   /**
-    * 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.
-    */
-   LDKnativeUntrustedString *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;
-} LDKUntrustedString;
-
-/**
- * The reason the channel was closed. See individual variants for more details.
- */
-typedef enum LDKClosureReason_Tag {
-   /**
-    * Closure generated from receiving a peer error message.
-    *
-    * Our counterparty may have broadcasted their latest commitment state, and we have
-    * as well.
-    */
-   LDKClosureReason_CounterpartyForceClosed,
-   /**
-    * Closure generated from [`ChannelManager::force_close_channel`], called by the user.
-    *
-    * [`ChannelManager::force_close_channel`]: crate::ln::channelmanager::ChannelManager::force_close_channel.
-    */
-   LDKClosureReason_HolderForceClosed,
-   /**
-    * The channel was closed after negotiating a cooperative close and we've now broadcasted
-    * the cooperative close transaction. Note the shutdown may have been initiated by us.
-    */
-   LDKClosureReason_CooperativeClosure,
-   /**
-    * A commitment transaction was confirmed on chain, closing the channel. Most likely this
-    * commitment transaction came from our counterparty, but it may also have come from
-    * a copy of our own `ChannelMonitor`.
-    */
-   LDKClosureReason_CommitmentTxConfirmed,
-   /**
-    * The funding transaction failed to confirm in a timely manner on an inbound channel.
-    */
-   LDKClosureReason_FundingTimedOut,
-   /**
-    * Closure generated from processing an event, likely a HTLC forward/relay/reception.
-    */
-   LDKClosureReason_ProcessingError,
-   /**
-    * The peer disconnected prior to funding completing. In this case the spec mandates that we
-    * forget the channel entirely - we can attempt again if the peer reconnects.
-    *
-    * This includes cases where we restarted prior to funding completion, including prior to the
-    * initial [`ChannelMonitor`] persistence completing.
-    *
-    * In LDK versions prior to 0.0.107 this could also occur if we were unable to connect to the
-    * peer because of mutual incompatibility between us and our channel counterparty.
-    *
-    * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
-    */
-   LDKClosureReason_DisconnectedPeer,
-   /**
-    * Closure generated from `ChannelManager::read` if the [`ChannelMonitor`] is newer than
-    * the [`ChannelManager`] deserialized.
-    *
-    * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
-    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
-    */
-   LDKClosureReason_OutdatedChannelManager,
-   /**
-    * The counterparty requested a cooperative close of a channel that had not been funded yet.
-    * The channel has been immediately closed.
-    */
-   LDKClosureReason_CounterpartyCoopClosedUnfundedChannel,
-   /**
-    * Must be last for serialization purposes
-    */
-   LDKClosureReason_Sentinel,
-} LDKClosureReason_Tag;
-
-typedef struct LDKClosureReason_LDKCounterpartyForceClosed_Body {
-   /**
-    * The error which the peer sent us.
-    *
-    * Be careful about printing the peer_msg, a well-crafted message could exploit
-    * a security vulnerability in the terminal emulator or the logging subsystem.
-    * To be safe, use `Display` on `UntrustedString`
-    *
-    * [`UntrustedString`]: crate::util::string::UntrustedString
-    */
-   struct LDKUntrustedString peer_msg;
-} LDKClosureReason_LDKCounterpartyForceClosed_Body;
-
-typedef struct LDKClosureReason_LDKProcessingError_Body {
-   /**
-    * A developer-readable error message which we generated.
-    */
-   struct LDKStr err;
-} LDKClosureReason_LDKProcessingError_Body;
-
-typedef struct MUST_USE_STRUCT LDKClosureReason {
-   LDKClosureReason_Tag tag;
-   union {
-      LDKClosureReason_LDKCounterpartyForceClosed_Body counterparty_force_closed;
-      LDKClosureReason_LDKProcessingError_Body processing_error;
-   };
-} LDKClosureReason;
-
 /**
  * An enum which can either contain a crate::lightning::events::ClosureReason or not
  */
@@ -13590,6 +17636,10 @@ typedef enum LDKHTLCDestination_Tag {
     * intercept HTLC.
     */
    LDKHTLCDestination_InvalidForward,
+   /**
+    * We couldn't decode the incoming onion to obtain the forwarding details.
+    */
+   LDKHTLCDestination_InvalidOnion,
    /**
     * Failure scenario where an HTLC may have been forwarded to be intended for us,
     * but is invalid for some reason, so we reject it.
@@ -13621,7 +17671,7 @@ typedef struct LDKHTLCDestination_LDKNextHopChannel_Body {
    /**
     * The outgoing `channel_id` between us and the next node.
     */
-   struct LDKThirtyTwoBytes channel_id;
+   struct LDKChannelId channel_id;
 } LDKHTLCDestination_LDKNextHopChannel_Body;
 
 typedef struct LDKHTLCDestination_LDKUnknownNextHop_Body {
@@ -13751,56 +17801,45 @@ typedef struct LDKCResult_PaymentFailureReasonDecodeErrorZ {
 /**
  * An enum which can either contain a crate::c_types::U128 or not
  */
-typedef enum LDKCOption_u128Z_Tag {
+typedef enum LDKCOption_U128Z_Tag {
    /**
-    * When we're in this state, this COption_u128Z contains a crate::c_types::U128
+    * When we're in this state, this COption_U128Z contains a crate::c_types::U128
     */
-   LDKCOption_u128Z_Some,
+   LDKCOption_U128Z_Some,
    /**
-    * When we're in this state, this COption_u128Z contains nothing
+    * When we're in this state, this COption_U128Z contains nothing
     */
-   LDKCOption_u128Z_None,
+   LDKCOption_U128Z_None,
    /**
     * Must be last for serialization purposes
     */
-   LDKCOption_u128Z_Sentinel,
-} LDKCOption_u128Z_Tag;
+   LDKCOption_U128Z_Sentinel,
+} LDKCOption_U128Z_Tag;
 
-typedef struct LDKCOption_u128Z {
-   LDKCOption_u128Z_Tag tag;
+typedef struct LDKCOption_U128Z {
+   LDKCOption_U128Z_Tag tag;
    union {
       struct {
          struct LDKU128 some;
       };
    };
-} LDKCOption_u128Z;
+} LDKCOption_U128Z;
 
 /**
- * An enum which can either contain a crate::c_types::ThirtyTwoBytes or not
+ * A dynamically-allocated array of crate::lightning::events::ClaimedHTLCs of arbitrary size.
+ * This corresponds to std::vector in C++
  */
-typedef enum LDKCOption_PaymentIdZ_Tag {
-   /**
-    * When we're in this state, this COption_PaymentIdZ contains a crate::c_types::ThirtyTwoBytes
-    */
-   LDKCOption_PaymentIdZ_Some,
+typedef struct LDKCVec_ClaimedHTLCZ {
    /**
-    * When we're in this state, this COption_PaymentIdZ contains nothing
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   LDKCOption_PaymentIdZ_None,
+   struct LDKClaimedHTLC *data;
    /**
-    * Must be last for serialization purposes
+    * The number of elements pointed to by `data`.
     */
-   LDKCOption_PaymentIdZ_Sentinel,
-} LDKCOption_PaymentIdZ_Tag;
-
-typedef struct LDKCOption_PaymentIdZ {
-   LDKCOption_PaymentIdZ_Tag tag;
-   union {
-      struct {
-         struct LDKThirtyTwoBytes some;
-      };
-   };
-} LDKCOption_PaymentIdZ;
+   uintptr_t datalen;
+} LDKCVec_ClaimedHTLCZ;
 
 /**
  * An enum which can either contain a crate::lightning::events::PaymentFailureReason or not
@@ -13890,8 +17929,8 @@ typedef enum LDKBumpTransactionEvent_Tag {
     * an empty `pending_htlcs`), confirmation of the commitment transaction can be considered to
     * be not urgent.
     *
-    * [`EcdsaChannelSigner`]: crate::sign::EcdsaChannelSigner
-    * [`EcdsaChannelSigner::sign_holder_anchor_input`]: crate::sign::EcdsaChannelSigner::sign_holder_anchor_input
+    * [`EcdsaChannelSigner`]: crate::sign::ecdsa::EcdsaChannelSigner
+    * [`EcdsaChannelSigner::sign_holder_anchor_input`]: crate::sign::ecdsa::EcdsaChannelSigner::sign_holder_anchor_input
     * [`build_anchor_input_witness`]: crate::ln::chan_utils::build_anchor_input_witness
     */
    LDKBumpTransactionEvent_ChannelClose,
@@ -13923,9 +17962,8 @@ typedef enum LDKBumpTransactionEvent_Tag {
     * longer able to commit external confirmed funds to the HTLC transaction or the fee committed
     * to the HTLC transaction is greater in value than the HTLCs being claimed.
     *
-    * [`EcdsaChannelSigner`]: crate::sign::EcdsaChannelSigner
-    * [`EcdsaChannelSigner::sign_holder_htlc_transaction`]: crate::sign::EcdsaChannelSigner::sign_holder_htlc_transaction
-    * [`HTLCDescriptor::tx_input_witness`]: HTLCDescriptor::tx_input_witness
+    * [`EcdsaChannelSigner`]: crate::sign::ecdsa::EcdsaChannelSigner
+    * [`EcdsaChannelSigner::sign_holder_htlc_transaction`]: crate::sign::ecdsa::EcdsaChannelSigner::sign_holder_htlc_transaction
     */
    LDKBumpTransactionEvent_HTLCResolution,
    /**
@@ -13935,6 +17973,14 @@ typedef enum LDKBumpTransactionEvent_Tag {
 } LDKBumpTransactionEvent_Tag;
 
 typedef struct LDKBumpTransactionEvent_LDKChannelClose_Body {
+   /**
+    * The `channel_id` of the channel which has been closed.
+    */
+   struct LDKChannelId channel_id;
+   /**
+    * Counterparty in the closed channel.
+    */
+   struct LDKPublicKey counterparty_node_id;
    /**
     * The unique identifier for the claim of the anchor output in the commitment transaction.
     *
@@ -13972,6 +18018,14 @@ typedef struct LDKBumpTransactionEvent_LDKChannelClose_Body {
 } LDKBumpTransactionEvent_LDKChannelClose_Body;
 
 typedef struct LDKBumpTransactionEvent_LDKHTLCResolution_Body {
+   /**
+    * The `channel_id` of the channel which has been closed.
+    */
+   struct LDKChannelId channel_id;
+   /**
+    * Counterparty in the closed channel.
+    */
+   struct LDKPublicKey counterparty_node_id;
    /**
     * The unique identifier for the claim of the HTLCs in the confirmed commitment
     * transaction.
@@ -14030,9 +18084,19 @@ typedef enum LDKEvent_Tag {
     * Note that if the preimage is not known, you should call
     * [`ChannelManager::fail_htlc_backwards`] or [`ChannelManager::fail_htlc_backwards_with_reason`]
     * to free up resources for this HTLC and avoid network congestion.
-    * If you fail to call either [`ChannelManager::claim_funds`], [`ChannelManager::fail_htlc_backwards`],
-    * or [`ChannelManager::fail_htlc_backwards_with_reason`] within the HTLC's timeout, the HTLC will be
-    * automatically failed.
+    *
+    * If [`Event::PaymentClaimable::onion_fields`] is `Some`, and includes custom TLVs with even type
+    * numbers, you should use [`ChannelManager::fail_htlc_backwards_with_reason`] with
+    * [`FailureCode::InvalidOnionPayload`] if you fail to understand and handle the contents, or
+    * [`ChannelManager::claim_funds_with_known_custom_tlvs`] upon successful handling.
+    * If you don't intend to check for custom TLVs, you can simply use
+    * [`ChannelManager::claim_funds`], which will automatically fail back even custom TLVs.
+    *
+    * If you fail to call [`ChannelManager::claim_funds`],
+    * [`ChannelManager::claim_funds_with_known_custom_tlvs`],
+    * [`ChannelManager::fail_htlc_backwards`], or
+    * [`ChannelManager::fail_htlc_backwards_with_reason`] within the HTLC's timeout, the HTLC will
+    * be automatically failed.
     *
     * # Note
     * LDK will not stop an inbound payment from being paid multiple times, so multiple
@@ -14044,6 +18108,8 @@ typedef enum LDKEvent_Tag {
     * This event used to be called `PaymentReceived` in LDK versions 0.0.112 and earlier.
     *
     * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
+    * [`ChannelManager::claim_funds_with_known_custom_tlvs`]: crate::ln::channelmanager::ChannelManager::claim_funds_with_known_custom_tlvs
+    * [`FailureCode::InvalidOnionPayload`]: crate::ln::channelmanager::FailureCode::InvalidOnionPayload
     * [`ChannelManager::fail_htlc_backwards`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards
     * [`ChannelManager::fail_htlc_backwards_with_reason`]: crate::ln::channelmanager::ChannelManager::fail_htlc_backwards_with_reason
     */
@@ -14065,6 +18131,33 @@ typedef enum LDKEvent_Tag {
     * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds
     */
    LDKEvent_PaymentClaimed,
+   /**
+    * Indicates that a peer connection with a node is needed in order to send an [`OnionMessage`].
+    *
+    * Typically, this happens when a [`MessageRouter`] is unable to find a complete path to a
+    * [`Destination`]. Once a connection is established, any messages buffered by an
+    * [`OnionMessageHandler`] may be sent.
+    *
+    * This event will not be generated for onion message forwards; only for sends including
+    * replies. Handlers should connect to the node otherwise any buffered messages may be lost.
+    *
+    * [`OnionMessage`]: msgs::OnionMessage
+    * [`MessageRouter`]: crate::onion_message::messenger::MessageRouter
+    * [`Destination`]: crate::onion_message::messenger::Destination
+    * [`OnionMessageHandler`]: crate::ln::msgs::OnionMessageHandler
+    */
+   LDKEvent_ConnectionNeeded,
+   /**
+    * Indicates a request for an invoice failed to yield a response in a reasonable amount of time
+    * or was explicitly abandoned by [`ChannelManager::abandon_payment`]. This may be for an
+    * [`InvoiceRequest`] sent for an [`Offer`] or for a [`Refund`] that hasn't been redeemed.
+    *
+    * [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
+    * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+    * [`Offer`]: crate::offers::offer::Offer
+    * [`Refund`]: crate::offers::refund::Refund
+    */
+   LDKEvent_InvoiceRequestFailed,
    /**
     * Indicates an outbound payment we made succeeded (i.e. it made it all the way to its target
     * and we got back the payment preimage for it).
@@ -14081,6 +18174,11 @@ typedef enum LDKEvent_Tag {
     * payment is no longer retryable, due either to the [`Retry`] provided or
     * [`ChannelManager::abandon_payment`] having been called for the corresponding payment.
     *
+    * In exceedingly rare cases, it is possible that an [`Event::PaymentFailed`] is generated for
+    * a payment after an [`Event::PaymentSent`] event for this same payment has already been
+    * received and processed. In this case, the [`Event::PaymentFailed`] event MUST be ignored,
+    * and the payment MUST be treated as having succeeded.
+    *
     * [`Retry`]: crate::ln::channelmanager::Retry
     * [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
     */
@@ -14138,9 +18236,15 @@ typedef enum LDKEvent_Tag {
    /**
     * Used to indicate that an output which you should know how to spend was confirmed on chain
     * and is now spendable.
-    * Such an output will *not* ever be spent by rust-lightning, and are not at risk of your
+    *
+    * Such an output will *never* be spent directly by LDK, and are not at risk of your
     * counterparty spending them due to some kind of timeout. Thus, you need to store them
     * somewhere and spend them when you create on-chain transactions.
+    *
+    * You may hand them to the [`OutputSweeper`] utility which will store and (re-)generate spending
+    * transactions for you.
+    *
+    * [`OutputSweeper`]: crate::util::sweep::OutputSweeper
     */
    LDKEvent_SpendableOutputs,
    /**
@@ -14165,20 +18269,30 @@ typedef enum LDKEvent_Tag {
     */
    LDKEvent_ChannelReady,
    /**
-    * Used to indicate that a previously opened channel with the given `channel_id` is in the
-    * process of closure.
+    * Used to indicate that a channel that got past the initial handshake with the given `channel_id` is in the
+    * process of closure. This includes previously opened channels, and channels that time out from not being funded.
+    *
+    * Note that this event is only triggered for accepted channels: if the
+    * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true and the channel is
+    * rejected, no `ChannelClosed` event will be sent.
+    *
+    * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
+    * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
     */
    LDKEvent_ChannelClosed,
    /**
     * Used to indicate to the user that they can abandon the funding transaction and recycle the
     * inputs for another purpose.
+    *
+    * This event is not guaranteed to be generated for channels that are closed due to a restart.
     */
    LDKEvent_DiscardFunding,
    /**
     * Indicates a request to open a new channel by a peer.
     *
-    * To accept the request, call [`ChannelManager::accept_inbound_channel`]. To reject the
-    * request, call [`ChannelManager::force_close_without_broadcasting_txn`].
+    * To accept the request, call [`ChannelManager::accept_inbound_channel`]. To reject the request,
+    * call [`ChannelManager::force_close_without_broadcasting_txn`]. Note that a ['ChannelClosed`]
+    * event will _not_ be triggered if the channel is rejected.
     *
     * The event is only triggered when a new open channel request is received and the
     * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true.
@@ -14227,7 +18341,7 @@ typedef struct LDKEvent_LDKFundingGenerationReady_Body {
     *
     * [`ChannelManager::funding_transaction_generated`]: crate::ln::channelmanager::ChannelManager::funding_transaction_generated
     */
-   struct LDKThirtyTwoBytes temporary_channel_id;
+   struct LDKChannelId temporary_channel_id;
    /**
     * The counterparty's node_id, which you'll need to pass back into
     * [`ChannelManager::funding_transaction_generated`].
@@ -14244,11 +18358,15 @@ typedef struct LDKEvent_LDKFundingGenerationReady_Body {
     */
    struct LDKCVec_u8Z output_script;
    /**
-    * The `user_channel_id` value passed in to [`ChannelManager::create_channel`], or a
-    * random value for an inbound channel. This may be zero for objects serialized with LDK
-    * versions prior to 0.0.113.
+    * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
+    * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
+    * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
+    * `user_channel_id` will be randomized for an inbound channel.  This may be zero for objects
+    * serialized with LDK versions prior to 0.0.113.
     *
     * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
+    * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
+    * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
     */
    struct LDKU128 user_channel_id;
 } LDKEvent_LDKFundingGenerationReady_Body;
@@ -14312,11 +18430,11 @@ typedef struct LDKEvent_LDKPaymentClaimable_Body {
     *
     * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
     */
-   struct LDKThirtyTwoBytes via_channel_id;
+   struct LDKChannelId via_channel_id;
    /**
     * The `user_channel_id` indicating over which channel we received the payment.
     */
-   struct LDKCOption_u128Z via_user_channel_id;
+   struct LDKCOption_U128Z via_user_channel_id;
    /**
     * The block height at which this payment will be failed back and will no longer be
     * eligible for claiming.
@@ -14356,15 +18474,43 @@ typedef struct LDKEvent_LDKPaymentClaimed_Body {
     * spontaneous payment.
     */
    struct LDKPaymentPurpose purpose;
+   /**
+    * The HTLCs that comprise the claimed payment. This will be empty for events serialized prior
+    * to LDK version 0.0.117.
+    */
+   struct LDKCVec_ClaimedHTLCZ htlcs;
+   /**
+    * The sender-intended sum total of all the MPP parts. This will be `None` for events
+    * serialized prior to LDK version 0.0.117.
+    */
+   struct LDKCOption_u64Z sender_intended_total_msat;
 } LDKEvent_LDKPaymentClaimed_Body;
 
+typedef struct LDKEvent_LDKConnectionNeeded_Body {
+   /**
+    * The node id for the node needing a connection.
+    */
+   struct LDKPublicKey node_id;
+   /**
+    * Sockets for connecting to the node.
+    */
+   struct LDKCVec_SocketAddressZ addresses;
+} LDKEvent_LDKConnectionNeeded_Body;
+
+typedef struct LDKEvent_LDKInvoiceRequestFailed_Body {
+   /**
+    * The `payment_id` to have been associated with payment for the requested invoice.
+    */
+   struct LDKThirtyTwoBytes payment_id;
+} LDKEvent_LDKInvoiceRequestFailed_Body;
+
 typedef struct LDKEvent_LDKPaymentSent_Body {
    /**
     * The `payment_id` passed to [`ChannelManager::send_payment`].
     *
     * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
     */
-   struct LDKCOption_PaymentIdZ payment_id;
+   struct LDKCOption_ThirtyTwoBytesZ payment_id;
    /**
     * The preimage to the hash given to ChannelManager::send_payment.
     * Note that this serves as a payment receipt, if you wish to have such a thing, you must
@@ -14425,7 +18571,7 @@ typedef struct LDKEvent_LDKPaymentPathSuccessful_Body {
     *
     * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
     */
-   struct LDKCOption_PaymentHashZ payment_hash;
+   struct LDKCOption_ThirtyTwoBytesZ payment_hash;
    /**
     * The payment path that was successful.
     *
@@ -14443,7 +18589,7 @@ typedef struct LDKEvent_LDKPaymentPathFailed_Body {
     * [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
     * [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
     */
-   struct LDKCOption_PaymentIdZ payment_id;
+   struct LDKCOption_ThirtyTwoBytesZ payment_id;
    /**
     * The hash that was given to [`ChannelManager::send_payment`].
     *
@@ -14573,25 +18719,49 @@ typedef struct LDKEvent_LDKSpendableOutputs_Body {
     * The outputs which you should store as spendable by you.
     */
    struct LDKCVec_SpendableOutputDescriptorZ outputs;
+   /**
+    * The `channel_id` indicating which channel the spendable outputs belong to.
+    *
+    * This will always be `Some` for events generated by LDK versions 0.0.117 and above.
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKChannelId channel_id;
 } LDKEvent_LDKSpendableOutputs_Body;
 
 typedef struct LDKEvent_LDKPaymentForwarded_Body {
    /**
-    * The incoming channel between the previous node and us. This is only `None` for events
-    * generated or serialized by versions prior to 0.0.107.
+    * The channel id of the incoming channel between the previous node and us.
+    *
+    * This is only `None` for events generated or serialized by versions prior to 0.0.107.
     *
     * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
     */
-   struct LDKThirtyTwoBytes prev_channel_id;
+   struct LDKChannelId prev_channel_id;
    /**
-    * The outgoing channel between the next node and us. This is only `None` for events
-    * generated or serialized by versions prior to 0.0.107.
+    * The channel id of the outgoing channel between the next node and us.
+    *
+    * This is only `None` for events generated or serialized by versions prior to 0.0.107.
     *
     * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
     */
-   struct LDKThirtyTwoBytes next_channel_id;
+   struct LDKChannelId next_channel_id;
+   /**
+    * The `user_channel_id` of the incoming channel between the previous node and us.
+    *
+    * This is only `None` for events generated or serialized by versions prior to 0.0.122.
+    */
+   struct LDKCOption_U128Z prev_user_channel_id;
    /**
-    * The fee, in milli-satoshis, which was earned as a result of the payment.
+    * The `user_channel_id` of the outgoing channel between the next node and us.
+    *
+    * This will be `None` if the payment was settled via an on-chain transaction. See the
+    * caveat described for the `total_fee_earned_msat` field. Moreover it will be `None` for
+    * events generated or serialized by versions prior to 0.0.122.
+    */
+   struct LDKCOption_U128Z next_user_channel_id;
+   /**
+    * The total fee, in milli-satoshis, which was earned as a result of the payment.
     *
     * Note that if we force-closed the channel over which we forwarded an HTLC while the HTLC
     * was pending, the amount the next hop claimed will have been rounded down to the nearest
@@ -14602,10 +18772,26 @@ typedef struct LDKEvent_LDKPaymentForwarded_Body {
     * If the channel which sent us the payment has been force-closed, we will claim the funds
     * via an on-chain transaction. In that case we do not yet know the on-chain transaction
     * fees which we will spend and will instead set this to `None`. It is possible duplicate
-    * `PaymentForwarded` events are generated for the same payment iff `fee_earned_msat` is
+    * `PaymentForwarded` events are generated for the same payment iff `total_fee_earned_msat` is
     * `None`.
     */
-   struct LDKCOption_u64Z fee_earned_msat;
+   struct LDKCOption_u64Z total_fee_earned_msat;
+   /**
+    * The share of the total fee, in milli-satoshis, which was withheld in addition to the
+    * forwarding fee.
+    *
+    * This will only be `Some` if we forwarded an intercepted HTLC with less than the
+    * expected amount. This means our counterparty accepted to receive less than the invoice
+    * amount, e.g., by claiming the payment featuring a corresponding
+    * [`PaymentClaimable::counterparty_skimmed_fee_msat`].
+    *
+    * Will also always be `None` for events serialized with LDK prior to version 0.0.122.
+    *
+    * The caveat described above the `total_fee_earned_msat` field applies here as well.
+    *
+    * [`PaymentClaimable::counterparty_skimmed_fee_msat`]: Self::PaymentClaimable::counterparty_skimmed_fee_msat
+    */
+   struct LDKCOption_u64Z skimmed_fee_msat;
    /**
     * If this is `true`, the forwarded HTLC was claimed by our counterparty via an on-chain
     * transaction.
@@ -14614,7 +18800,7 @@ typedef struct LDKEvent_LDKPaymentForwarded_Body {
    /**
     * The final amount forwarded, in milli-satoshis, after the fee is deducted.
     *
-    * The caveat described above the `fee_earned_msat` field applies here as well.
+    * The caveat described above the `total_fee_earned_msat` field applies here as well.
     */
    struct LDKCOption_u64Z outbound_amount_forwarded_msat;
 } LDKEvent_LDKPaymentForwarded_Body;
@@ -14623,7 +18809,7 @@ typedef struct LDKEvent_LDKChannelPending_Body {
    /**
     * The `channel_id` of the channel that is pending confirmation.
     */
-   struct LDKThirtyTwoBytes channel_id;
+   struct LDKChannelId channel_id;
    /**
     * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
     * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
@@ -14642,7 +18828,7 @@ typedef struct LDKEvent_LDKChannelPending_Body {
     *
     * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
     */
-   struct LDKThirtyTwoBytes former_temporary_channel_id;
+   struct LDKChannelId former_temporary_channel_id;
    /**
     * The `node_id` of the channel counterparty.
     */
@@ -14651,13 +18837,21 @@ typedef struct LDKEvent_LDKChannelPending_Body {
     * The outpoint of the channel's funding transaction.
     */
    struct LDKOutPoint funding_txo;
+   /**
+    * The features that this channel will operate with.
+    *
+    * Will be `None` for channels created prior to LDK version 0.0.122.
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKChannelTypeFeatures channel_type;
 } LDKEvent_LDKChannelPending_Body;
 
 typedef struct LDKEvent_LDKChannelReady_Body {
    /**
     * The `channel_id` of the channel that is ready.
     */
-   struct LDKThirtyTwoBytes channel_id;
+   struct LDKChannelId channel_id;
    /**
     * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
     * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
@@ -14684,7 +18878,7 @@ typedef struct LDKEvent_LDKChannelClosed_Body {
     * The `channel_id` of the channel which has been closed. Note that on-chain transactions
     * resolving the channel are likely still awaiting confirmation.
     */
-   struct LDKThirtyTwoBytes channel_id;
+   struct LDKChannelId channel_id;
    /**
     * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
     * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
@@ -14702,13 +18896,35 @@ typedef struct LDKEvent_LDKChannelClosed_Body {
     * The reason the channel was closed.
     */
    struct LDKClosureReason reason;
+   /**
+    * Counterparty in the closed channel.
+    *
+    * This field will be `None` for objects serialized prior to LDK 0.0.117.
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKPublicKey counterparty_node_id;
+   /**
+    * Channel capacity of the closing channel (sats).
+    *
+    * This field will be `None` for objects serialized prior to LDK 0.0.117.
+    */
+   struct LDKCOption_u64Z channel_capacity_sats;
+   /**
+    * The original channel funding TXO; this helps checking for the existence and confirmation
+    * status of the closing tx.
+    * Note that for instances serialized in v0.0.119 or prior this will be missing (None).
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKOutPoint channel_funding_txo;
 } LDKEvent_LDKChannelClosed_Body;
 
 typedef struct LDKEvent_LDKDiscardFunding_Body {
    /**
     * The channel_id of the channel which has been closed.
     */
-   struct LDKThirtyTwoBytes channel_id;
+   struct LDKChannelId channel_id;
    /**
     * The full transaction received from the user
     */
@@ -14726,7 +18942,7 @@ typedef struct LDKEvent_LDKOpenChannelRequest_Body {
     * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
     * [`ChannelManager::force_close_without_broadcasting_txn`]: crate::ln::channelmanager::ChannelManager::force_close_without_broadcasting_txn
     */
-   struct LDKThirtyTwoBytes temporary_channel_id;
+   struct LDKChannelId temporary_channel_id;
    /**
     * The node_id of the counterparty requesting to open the channel.
     *
@@ -14771,7 +18987,7 @@ typedef struct LDKEvent_LDKHTLCHandlingFailed_Body {
    /**
     * The channel over which the HTLC was received.
     */
-   struct LDKThirtyTwoBytes prev_channel_id;
+   struct LDKChannelId prev_channel_id;
    /**
     * Destination of the HTLC that failed to be processed.
     */
@@ -14784,6 +19000,8 @@ typedef struct MUST_USE_STRUCT LDKEvent {
       LDKEvent_LDKFundingGenerationReady_Body funding_generation_ready;
       LDKEvent_LDKPaymentClaimable_Body payment_claimable;
       LDKEvent_LDKPaymentClaimed_Body payment_claimed;
+      LDKEvent_LDKConnectionNeeded_Body connection_needed;
+      LDKEvent_LDKInvoiceRequestFailed_Body invoice_request_failed;
       LDKEvent_LDKPaymentSent_Body payment_sent;
       LDKEvent_LDKPaymentFailed_Body payment_failed;
       LDKEvent_LDKPaymentPathSuccessful_Body payment_path_successful;
@@ -14866,55 +19084,6 @@ typedef struct LDKCResult_COption_EventZDecodeErrorZ {
    bool result_ok;
 } LDKCResult_COption_EventZDecodeErrorZ;
 
-/**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZs of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   struct LDKC2Tuple_BlockHashChannelMonitorZ *data;
-   /**
-    * The number of elements pointed to by `data`.
-    */
-   uintptr_t datalen;
-} LDKCVec_C2Tuple_BlockHashChannelMonitorZZ;
-
-/**
- * The contents of CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ
- */
-typedef union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr {
-   /**
-    * A pointer to the contents in the success state.
-    * Reading from this pointer when `result_ok` is not set is undefined.
-    */
-   struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *result;
-   /**
-    * A pointer to the contents in the error state.
-    * Reading from this pointer when `result_ok` is set is undefined.
-    */
-   enum LDKIOError *err;
-} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr;
-
-/**
- * A CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents the result of a fallible operation,
- * containing a crate::c_types::derived::CVec_C2Tuple_BlockHashChannelMonitorZZ on success and a crate::c_types::IOError on failure.
- * `result_ok` indicates the overall state, and the contents are provided via `contents`.
- */
-typedef struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ {
-   /**
-    * The contents of this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ, accessible via either
-    * `err` or `result` depending on the state of `result_ok`.
-    */
-   union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr contents;
-   /**
-    * Whether this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents a success state.
-    */
-   bool result_ok;
-} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ;
-
 /**
  * Sub-errors which don't have specific information in them use this type.
  */
@@ -15217,9 +19386,9 @@ typedef struct MUST_USE_STRUCT LDKPayeePubKey {
 } LDKPayeePubKey;
 
 /**
- * The contents of CResult_PayeePubKeyErrorZ
+ * The contents of CResult_PayeePubKeySecp256k1ErrorZ
  */
-typedef union LDKCResult_PayeePubKeyErrorZPtr {
+typedef union LDKCResult_PayeePubKeySecp256k1ErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
@@ -15230,24 +19399,24 @@ typedef union LDKCResult_PayeePubKeyErrorZPtr {
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    enum LDKSecp256k1Error *err;
-} LDKCResult_PayeePubKeyErrorZPtr;
+} LDKCResult_PayeePubKeySecp256k1ErrorZPtr;
 
 /**
- * A CResult_PayeePubKeyErrorZ represents the result of a fallible operation,
+ * A CResult_PayeePubKeySecp256k1ErrorZ represents the result of a fallible operation,
  * containing a crate::lightning_invoice::PayeePubKey on success and a crate::c_types::Secp256k1Error on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_PayeePubKeyErrorZ {
+typedef struct LDKCResult_PayeePubKeySecp256k1ErrorZ {
    /**
-    * The contents of this CResult_PayeePubKeyErrorZ, accessible via either
+    * The contents of this CResult_PayeePubKeySecp256k1ErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_PayeePubKeyErrorZPtr contents;
+   union LDKCResult_PayeePubKeySecp256k1ErrorZPtr contents;
    /**
-    * Whether this CResult_PayeePubKeyErrorZ represents a success state.
+    * Whether this CResult_PayeePubKeySecp256k1ErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_PayeePubKeyErrorZ;
+} LDKCResult_PayeePubKeySecp256k1ErrorZ;
 
 
 
@@ -15412,22 +19581,6 @@ typedef struct LDKCResult_Bolt11InvoiceBolt11SemanticErrorZ {
    bool result_ok;
 } LDKCResult_Bolt11InvoiceBolt11SemanticErrorZ;
 
-/**
- * A dynamically-allocated array of crate::c_types::Strs of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_AddressZ {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   struct LDKStr *data;
-   /**
-    * The number of elements pointed to by `data`.
-    */
-   uintptr_t datalen;
-} LDKCVec_AddressZ;
-
 
 
 /**
@@ -15764,104 +19917,298 @@ typedef struct LDKCResult_UntrustedStringDecodeErrorZ {
 } LDKCResult_UntrustedStringDecodeErrorZ;
 
 /**
- * An error that may occur when making a payment.
+ * The contents of CResult_ChannelIdDecodeErrorZ
  */
-typedef enum LDKPaymentError_Tag {
+typedef union LDKCResult_ChannelIdDecodeErrorZPtr {
    /**
-    * An error resulting from the provided [`Bolt11Invoice`] or payment hash.
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   LDKPaymentError_Invoice,
+   struct LDKChannelId *result;
    /**
-    * An error occurring when sending a payment.
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   LDKPaymentError_Sending,
+   struct LDKDecodeError *err;
+} LDKCResult_ChannelIdDecodeErrorZPtr;
+
+/**
+ * A CResult_ChannelIdDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::types::ChannelId 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_ChannelIdDecodeErrorZ {
    /**
-    * Must be last for serialization purposes
+    * The contents of this CResult_ChannelIdDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_ChannelIdDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_ChannelIdDecodeErrorZ represents a success state.
     */
-   LDKPaymentError_Sentinel,
-} LDKPaymentError_Tag;
+   bool result_ok;
+} LDKCResult_ChannelIdDecodeErrorZ;
 
-typedef struct MUST_USE_STRUCT LDKPaymentError {
-   LDKPaymentError_Tag tag;
-   union {
-      struct {
-         struct LDKStr invoice;
-      };
-      struct {
-         enum LDKRetryableSendFailure sending;
-      };
-   };
-} LDKPaymentError;
+/**
+ * A tuple of 2 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC2Tuple__u832u16Z {
+   /**
+    * The element at position 0
+    */
+   struct LDKThirtyTwoBytes a;
+   /**
+    * The element at position 1
+    */
+   uint16_t b;
+} LDKC2Tuple__u832u16Z;
+
+
+
+/**
+ * Parameters for relaying over a given [`BlindedHop`].
+ *
+ * [`BlindedHop`]: crate::blinded_path::BlindedHop
+ */
+typedef struct MUST_USE_STRUCT LDKPaymentRelay {
+   /**
+    * 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.
+    */
+   LDKnativePaymentRelay *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;
+} LDKPaymentRelay;
 
 /**
- * The contents of CResult_PaymentIdPaymentErrorZ
+ * The contents of CResult_PaymentRelayDecodeErrorZ
  */
-typedef union LDKCResult_PaymentIdPaymentErrorZPtr {
+typedef union LDKCResult_PaymentRelayDecodeErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKThirtyTwoBytes *result;
+   struct LDKPaymentRelay *result;
    /**
     * A pointer to the contents in the error state.
     * Reading from this pointer when `result_ok` is set is undefined.
     */
-   struct LDKPaymentError *err;
-} LDKCResult_PaymentIdPaymentErrorZPtr;
+   struct LDKDecodeError *err;
+} LDKCResult_PaymentRelayDecodeErrorZPtr;
 
 /**
- * A CResult_PaymentIdPaymentErrorZ represents the result of a fallible operation,
- * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning_invoice::payment::PaymentError on failure.
+ * A CResult_PaymentRelayDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::blinded_path::payment::PaymentRelay 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_PaymentIdPaymentErrorZ {
+typedef struct LDKCResult_PaymentRelayDecodeErrorZ {
    /**
-    * The contents of this CResult_PaymentIdPaymentErrorZ, accessible via either
+    * The contents of this CResult_PaymentRelayDecodeErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_PaymentIdPaymentErrorZPtr contents;
+   union LDKCResult_PaymentRelayDecodeErrorZPtr contents;
    /**
-    * Whether this CResult_PaymentIdPaymentErrorZ represents a success state.
+    * Whether this CResult_PaymentRelayDecodeErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_PaymentIdPaymentErrorZ;
+} LDKCResult_PaymentRelayDecodeErrorZ;
+
+
 
 /**
- * The contents of CResult_NonePaymentErrorZ
+ * Constraints for relaying over a given [`BlindedHop`].
+ *
+ * [`BlindedHop`]: crate::blinded_path::BlindedHop
  */
-typedef union LDKCResult_NonePaymentErrorZPtr {
+typedef struct MUST_USE_STRUCT LDKPaymentConstraints {
    /**
-    * Note that this value is always NULL, as there are no contents in the OK variant
+    * 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.
     */
-   void *result;
+   LDKnativePaymentConstraints *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;
+} LDKPaymentConstraints;
+
+/**
+ * The contents of CResult_PaymentConstraintsDecodeErrorZ
+ */
+typedef union LDKCResult_PaymentConstraintsDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKPaymentConstraints *result;
    /**
     * A pointer to the contents in the error state.
     * Reading from this pointer when `result_ok` is set is undefined.
     */
-   struct LDKPaymentError *err;
-} LDKCResult_NonePaymentErrorZPtr;
+   struct LDKDecodeError *err;
+} LDKCResult_PaymentConstraintsDecodeErrorZPtr;
 
 /**
- * A CResult_NonePaymentErrorZ represents the result of a fallible operation,
- * containing a () on success and a crate::lightning_invoice::payment::PaymentError on failure.
+ * A CResult_PaymentConstraintsDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::blinded_path::payment::PaymentConstraints 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_NonePaymentErrorZ {
+typedef struct LDKCResult_PaymentConstraintsDecodeErrorZ {
    /**
-    * The contents of this CResult_NonePaymentErrorZ, accessible via either
+    * The contents of this CResult_PaymentConstraintsDecodeErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_NonePaymentErrorZPtr contents;
+   union LDKCResult_PaymentConstraintsDecodeErrorZPtr contents;
    /**
-    * Whether this CResult_NonePaymentErrorZ represents a success state.
+    * Whether this CResult_PaymentConstraintsDecodeErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_NonePaymentErrorZ;
+} LDKCResult_PaymentConstraintsDecodeErrorZ;
 
 /**
- * The contents of CResult_StringErrorZ
+ * The contents of CResult_PaymentContextDecodeErrorZ
  */
-typedef union LDKCResult_StringErrorZPtr {
+typedef union LDKCResult_PaymentContextDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKPaymentContext *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_PaymentContextDecodeErrorZPtr;
+
+/**
+ * A CResult_PaymentContextDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::blinded_path::payment::PaymentContext 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_PaymentContextDecodeErrorZ {
+   /**
+    * The contents of this CResult_PaymentContextDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_PaymentContextDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_PaymentContextDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_PaymentContextDecodeErrorZ;
+
+/**
+ * The contents of CResult_UnknownPaymentContextDecodeErrorZ
+ */
+typedef union LDKCResult_UnknownPaymentContextDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKUnknownPaymentContext *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_UnknownPaymentContextDecodeErrorZPtr;
+
+/**
+ * A CResult_UnknownPaymentContextDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::blinded_path::payment::UnknownPaymentContext 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_UnknownPaymentContextDecodeErrorZ {
+   /**
+    * The contents of this CResult_UnknownPaymentContextDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_UnknownPaymentContextDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_UnknownPaymentContextDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_UnknownPaymentContextDecodeErrorZ;
+
+/**
+ * The contents of CResult_Bolt12OfferContextDecodeErrorZ
+ */
+typedef union LDKCResult_Bolt12OfferContextDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKBolt12OfferContext *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_Bolt12OfferContextDecodeErrorZPtr;
+
+/**
+ * A CResult_Bolt12OfferContextDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::blinded_path::payment::Bolt12OfferContext 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_Bolt12OfferContextDecodeErrorZ {
+   /**
+    * The contents of this CResult_Bolt12OfferContextDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_Bolt12OfferContextDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_Bolt12OfferContextDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_Bolt12OfferContextDecodeErrorZ;
+
+/**
+ * The contents of CResult_Bolt12RefundContextDecodeErrorZ
+ */
+typedef union LDKCResult_Bolt12RefundContextDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKBolt12RefundContext *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_Bolt12RefundContextDecodeErrorZPtr;
+
+/**
+ * A CResult_Bolt12RefundContextDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::blinded_path::payment::Bolt12RefundContext 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_Bolt12RefundContextDecodeErrorZ {
+   /**
+    * The contents of this CResult_Bolt12RefundContextDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_Bolt12RefundContextDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_Bolt12RefundContextDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_Bolt12RefundContextDecodeErrorZ;
+
+/**
+ * The contents of CResult_StrSecp256k1ErrorZ
+ */
+typedef union LDKCResult_StrSecp256k1ErrorZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
@@ -15872,76 +20219,92 @@ typedef union LDKCResult_StringErrorZPtr {
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    enum LDKSecp256k1Error *err;
-} LDKCResult_StringErrorZPtr;
+} LDKCResult_StrSecp256k1ErrorZPtr;
 
 /**
- * A CResult_StringErrorZ represents the result of a fallible operation,
+ * A CResult_StrSecp256k1ErrorZ represents the result of a fallible operation,
  * containing a crate::c_types::Str on success and a crate::c_types::Secp256k1Error on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_StringErrorZ {
+typedef struct LDKCResult_StrSecp256k1ErrorZ {
    /**
-    * The contents of this CResult_StringErrorZ, accessible via either
+    * The contents of this CResult_StrSecp256k1ErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_StringErrorZPtr contents;
+   union LDKCResult_StrSecp256k1ErrorZPtr contents;
    /**
-    * Whether this CResult_StringErrorZ represents a success state.
+    * Whether this CResult_StrSecp256k1ErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_StringErrorZ;
-
-
+} LDKCResult_StrSecp256k1ErrorZ;
 
 /**
- * A path for sending an [`msgs::OnionMessage`].
+ * A tuple of 3 elements. See the individual fields for the types contained.
  */
-typedef struct MUST_USE_STRUCT LDKOnionMessagePath {
+typedef struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ {
    /**
-    * 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.
+    * The element at position 0
     */
-   LDKnativeOnionMessagePath *inner;
+   struct LDKThirtyTwoBytes a;
    /**
-    * 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.
+    * The element at position 1
     */
-   bool is_owned;
-} LDKOnionMessagePath;
+   struct LDKRecipientOnionFields b;
+   /**
+    * The element at position 2
+    */
+   struct LDKRouteParameters c;
+} LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ;
 
 /**
- * The contents of CResult_OnionMessagePathNoneZ
+ * The contents of CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ
  */
-typedef union LDKCResult_OnionMessagePathNoneZPtr {
+typedef union LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZPtr {
    /**
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKOnionMessagePath *result;
+   struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *result;
    /**
     * Note that this value is always NULL, as there are no contents in the Err variant
     */
    void *err;
-} LDKCResult_OnionMessagePathNoneZPtr;
+} LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZPtr;
 
 /**
- * A CResult_OnionMessagePathNoneZ represents the result of a fallible operation,
- * containing a crate::lightning::onion_message::messenger::OnionMessagePath on success and a () on failure.
+ * A CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ on success and a () on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_OnionMessagePathNoneZ {
+typedef struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ {
    /**
-    * The contents of this CResult_OnionMessagePathNoneZ, accessible via either
+    * The contents of this CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_OnionMessagePathNoneZPtr contents;
+   union LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZPtr contents;
    /**
-    * Whether this CResult_OnionMessagePathNoneZ represents a success state.
+    * Whether this CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_OnionMessagePathNoneZ;
+} LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ;
+
+/**
+ * A tuple of 3 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ {
+   /**
+    * The element at position 0
+    */
+   struct LDKPublicKey a;
+   /**
+    * The element at position 1
+    */
+   struct LDKOnionMessage b;
+   /**
+    * The element at position 2
+    */
+   struct LDKCOption_CVec_SocketAddressZZ c;
+} LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ;
 
 /**
  * Errors that may occur when [sending an onion message].
@@ -15959,14 +20322,18 @@ typedef enum LDKSendError_Tag {
     */
    LDKSendError_TooBigPacket,
    /**
-    * The provided [`Destination`] was an invalid [`BlindedPath`], due to having fewer than two
-    * blinded hops.
+    * The provided [`Destination`] was an invalid [`BlindedPath`] due to not having any blinded
+    * hops.
     */
    LDKSendError_TooFewBlindedHops,
    /**
-    * Our next-hop peer was offline or does not support onion message forwarding.
+    * The first hop is not a peer and doesn't have a known [`SocketAddress`].
     */
    LDKSendError_InvalidFirstHop,
+   /**
+    * A path from the sender to the destination could not be found by the [`MessageRouter`].
+    */
+   LDKSendError_PathNotFound,
    /**
     * Onion message contents must have a TLV type >= 64.
     */
@@ -15981,6 +20348,12 @@ typedef enum LDKSendError_Tag {
     * [`NodeSigner`]: crate::sign::NodeSigner
     */
    LDKSendError_GetNodeIdFailed,
+   /**
+    * The provided [`Destination`] has a blinded path with an unresolved introduction node. An
+    * attempt to resolve it in the [`MessageRouter`] when finding an [`OnionMessagePath`] likely
+    * failed.
+    */
+   LDKSendError_UnresolvedIntroductionNode,
    /**
     * We attempted to send to a blinded path where we are the introduction node, and failed to
     * advance the blinded path to make the second hop the new introduction node. Either
@@ -16000,40 +20373,250 @@ typedef struct MUST_USE_STRUCT LDKSendError {
       struct {
          enum LDKSecp256k1Error secp256k1;
       };
+      struct {
+         struct LDKPublicKey invalid_first_hop;
+      };
    };
 } LDKSendError;
 
 /**
- * The contents of CResult_NoneSendErrorZ
+ * The contents of CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ
  */
-typedef union LDKCResult_NoneSendErrorZPtr {
+typedef union LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZPtr {
    /**
-    * Note that this value is always NULL, as there are no contents in the OK variant
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   void *result;
+   struct LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   struct LDKSendError *err;
+} LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZPtr;
+
+/**
+ * A CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ on success and a crate::lightning::onion_message::messenger::SendError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ {
+   /**
+    * The contents of this CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZPtr contents;
+   /**
+    * Whether this CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ;
+
+/**
+ * The next hop to forward an onion message along its path.
+ *
+ * Note that payment blinded paths always specify their next hop using an explicit node id.
+ */
+typedef enum LDKNextMessageHop_Tag {
+   /**
+    * The node id of the next hop.
+    */
+   LDKNextMessageHop_NodeId,
+   /**
+    * The short channel id leading to the next hop.
+    */
+   LDKNextMessageHop_ShortChannelId,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKNextMessageHop_Sentinel,
+} LDKNextMessageHop_Tag;
+
+typedef struct MUST_USE_STRUCT LDKNextMessageHop {
+   LDKNextMessageHop_Tag tag;
+   union {
+      struct {
+         struct LDKPublicKey node_id;
+      };
+      struct {
+         uint64_t short_channel_id;
+      };
+   };
+} LDKNextMessageHop;
+
+/**
+ * The contents of an [`OnionMessage`] as read from the wire.
+ *
+ * [`OnionMessage`]: crate::ln::msgs::OnionMessage
+ */
+typedef enum LDKParsedOnionMessageContents_Tag {
+   /**
+    * A message related to BOLT 12 Offers.
+    */
+   LDKParsedOnionMessageContents_Offers,
+   /**
+    * A custom onion message specified by the user.
+    */
+   LDKParsedOnionMessageContents_Custom,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKParsedOnionMessageContents_Sentinel,
+} LDKParsedOnionMessageContents_Tag;
+
+typedef struct MUST_USE_STRUCT LDKParsedOnionMessageContents {
+   LDKParsedOnionMessageContents_Tag tag;
+   union {
+      struct {
+         struct LDKOffersMessage offers;
+      };
+      struct {
+         struct LDKOnionMessageContents custom;
+      };
+   };
+} LDKParsedOnionMessageContents;
+
+/**
+ * A processed incoming onion message, containing either a Forward (another onion message)
+ * or a Receive payload with decrypted contents.
+ */
+typedef enum LDKPeeledOnion_Tag {
+   /**
+    * Forwarded onion, with the next node id and a new onion
+    */
+   LDKPeeledOnion_Forward,
+   /**
+    * Received onion message, with decrypted contents, path_id, and reply path
+    */
+   LDKPeeledOnion_Receive,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKPeeledOnion_Sentinel,
+} LDKPeeledOnion_Tag;
+
+typedef struct LDKPeeledOnion_LDKForward_Body {
+   struct LDKNextMessageHop _0;
+   struct LDKOnionMessage _1;
+} LDKPeeledOnion_LDKForward_Body;
+
+typedef struct LDKPeeledOnion_LDKReceive_Body {
+   struct LDKParsedOnionMessageContents _0;
+   /**
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKThirtyTwoBytes _1;
+   /**
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKBlindedPath _2;
+} LDKPeeledOnion_LDKReceive_Body;
+
+typedef struct MUST_USE_STRUCT LDKPeeledOnion {
+   LDKPeeledOnion_Tag tag;
+   union {
+      LDKPeeledOnion_LDKForward_Body forward;
+      LDKPeeledOnion_LDKReceive_Body receive;
+   };
+} LDKPeeledOnion;
+
+/**
+ * The contents of CResult_PeeledOnionNoneZ
+ */
+typedef union LDKCResult_PeeledOnionNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKPeeledOnion *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_PeeledOnionNoneZPtr;
+
+/**
+ * A CResult_PeeledOnionNoneZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::messenger::PeeledOnion on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_PeeledOnionNoneZ {
+   /**
+    * The contents of this CResult_PeeledOnionNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_PeeledOnionNoneZPtr contents;
+   /**
+    * Whether this CResult_PeeledOnionNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_PeeledOnionNoneZ;
+
+/**
+ * Result of successfully [sending an onion message].
+ *
+ * [sending an onion message]: OnionMessenger::send_onion_message
+ */
+typedef enum LDKSendSuccess_Tag {
+   /**
+    * The message was buffered and will be sent once it is processed by
+    * [`OnionMessageHandler::next_onion_message_for_peer`].
+    */
+   LDKSendSuccess_Buffered,
+   /**
+    * The message was buffered and will be sent once the node is connected as a peer and it is
+    * processed by [`OnionMessageHandler::next_onion_message_for_peer`].
+    */
+   LDKSendSuccess_BufferedAwaitingConnection,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKSendSuccess_Sentinel,
+} LDKSendSuccess_Tag;
+
+typedef struct MUST_USE_STRUCT LDKSendSuccess {
+   LDKSendSuccess_Tag tag;
+   union {
+      struct {
+         struct LDKPublicKey buffered_awaiting_connection;
+      };
+   };
+} LDKSendSuccess;
+
+/**
+ * The contents of CResult_SendSuccessSendErrorZ
+ */
+typedef union LDKCResult_SendSuccessSendErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKSendSuccess *result;
    /**
     * A pointer to the contents in the error state.
     * Reading from this pointer when `result_ok` is set is undefined.
     */
    struct LDKSendError *err;
-} LDKCResult_NoneSendErrorZPtr;
+} LDKCResult_SendSuccessSendErrorZPtr;
 
 /**
- * A CResult_NoneSendErrorZ represents the result of a fallible operation,
- * containing a () on success and a crate::lightning::onion_message::messenger::SendError on failure.
+ * A CResult_SendSuccessSendErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::messenger::SendSuccess on success and a crate::lightning::onion_message::messenger::SendError on failure.
  * `result_ok` indicates the overall state, and the contents are provided via `contents`.
  */
-typedef struct LDKCResult_NoneSendErrorZ {
+typedef struct LDKCResult_SendSuccessSendErrorZ {
    /**
-    * The contents of this CResult_NoneSendErrorZ, accessible via either
+    * The contents of this CResult_SendSuccessSendErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_NoneSendErrorZPtr contents;
+   union LDKCResult_SendSuccessSendErrorZPtr contents;
    /**
-    * Whether this CResult_NoneSendErrorZ represents a success state.
+    * Whether this CResult_SendSuccessSendErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_NoneSendErrorZ;
+} LDKCResult_SendSuccessSendErrorZ;
 
 /**
  * The contents of CResult_BlindedPathNoneZ
@@ -16067,6 +20650,74 @@ typedef struct LDKCResult_BlindedPathNoneZ {
    bool result_ok;
 } LDKCResult_BlindedPathNoneZ;
 
+/**
+ * The contents of CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ
+ */
+typedef union LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKC2Tuple_BlindedPayInfoBlindedPathZ *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZPtr;
+
+/**
+ * A CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_BlindedPayInfoBlindedPathZ on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ {
+   /**
+    * The contents of this CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZPtr contents;
+   /**
+    * Whether this CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ;
+
+
+
+/**
+ * An intermediate node, its outbound channel, and relay parameters.
+ */
+typedef struct MUST_USE_STRUCT LDKForwardNode {
+   /**
+    * 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.
+    */
+   LDKnativeForwardNode *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;
+} LDKForwardNode;
+
+/**
+ * A dynamically-allocated array of crate::lightning::blinded_path::payment::ForwardNodes of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_ForwardNodeZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKForwardNode *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_ForwardNodeZ;
+
 /**
  * The contents of CResult_BlindedPathDecodeErrorZ
  */
@@ -16168,6 +20819,170 @@ typedef struct LDKCResult_InvoiceErrorDecodeErrorZ {
 
 
 
+/**
+ * The state of a spendable output currently tracked by an [`OutputSweeper`].
+ */
+typedef struct MUST_USE_STRUCT LDKTrackedSpendableOutput {
+   /**
+    * 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.
+    */
+   LDKnativeTrackedSpendableOutput *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;
+} LDKTrackedSpendableOutput;
+
+/**
+ * The contents of CResult_TrackedSpendableOutputDecodeErrorZ
+ */
+typedef union LDKCResult_TrackedSpendableOutputDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKTrackedSpendableOutput *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_TrackedSpendableOutputDecodeErrorZPtr;
+
+/**
+ * A CResult_TrackedSpendableOutputDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::util::sweep::TrackedSpendableOutput 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_TrackedSpendableOutputDecodeErrorZ {
+   /**
+    * The contents of this CResult_TrackedSpendableOutputDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_TrackedSpendableOutputDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_TrackedSpendableOutputDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_TrackedSpendableOutputDecodeErrorZ;
+
+/**
+ * The current status of the output spend.
+ */
+typedef enum LDKOutputSpendStatus_Tag {
+   /**
+    * The output is tracked but an initial spending transaction hasn't been generated and
+    * broadcasted yet.
+    */
+   LDKOutputSpendStatus_PendingInitialBroadcast,
+   /**
+    * A transaction spending the output has been broadcasted but is pending its first confirmation on-chain.
+    */
+   LDKOutputSpendStatus_PendingFirstConfirmation,
+   /**
+    * A transaction spending the output has been confirmed on-chain but will be tracked until it
+    * reaches [`ANTI_REORG_DELAY`] confirmations.
+    */
+   LDKOutputSpendStatus_PendingThresholdConfirmations,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKOutputSpendStatus_Sentinel,
+} LDKOutputSpendStatus_Tag;
+
+typedef struct LDKOutputSpendStatus_LDKPendingInitialBroadcast_Body {
+   /**
+    * The height at which we will first generate and broadcast a spending transaction.
+    */
+   struct LDKCOption_u32Z delayed_until_height;
+} LDKOutputSpendStatus_LDKPendingInitialBroadcast_Body;
+
+typedef struct LDKOutputSpendStatus_LDKPendingFirstConfirmation_Body {
+   /**
+    * The hash of the chain tip when we first broadcast a transaction spending this output.
+    */
+   struct LDKThirtyTwoBytes first_broadcast_hash;
+   /**
+    * The best height when we last broadcast a transaction spending this output.
+    */
+   uint32_t latest_broadcast_height;
+   /**
+    * The transaction spending this output we last broadcasted.
+    */
+   struct LDKTransaction latest_spending_tx;
+} LDKOutputSpendStatus_LDKPendingFirstConfirmation_Body;
+
+typedef struct LDKOutputSpendStatus_LDKPendingThresholdConfirmations_Body {
+   /**
+    * The hash of the chain tip when we first broadcast a transaction spending this output.
+    */
+   struct LDKThirtyTwoBytes first_broadcast_hash;
+   /**
+    * The best height when we last broadcast a transaction spending this output.
+    */
+   uint32_t latest_broadcast_height;
+   /**
+    * The transaction spending this output we saw confirmed on-chain.
+    */
+   struct LDKTransaction latest_spending_tx;
+   /**
+    * The height at which the spending transaction was confirmed.
+    */
+   uint32_t confirmation_height;
+   /**
+    * The hash of the block in which the spending transaction was confirmed.
+    */
+   struct LDKThirtyTwoBytes confirmation_hash;
+} LDKOutputSpendStatus_LDKPendingThresholdConfirmations_Body;
+
+typedef struct MUST_USE_STRUCT LDKOutputSpendStatus {
+   LDKOutputSpendStatus_Tag tag;
+   union {
+      LDKOutputSpendStatus_LDKPendingInitialBroadcast_Body pending_initial_broadcast;
+      LDKOutputSpendStatus_LDKPendingFirstConfirmation_Body pending_first_confirmation;
+      LDKOutputSpendStatus_LDKPendingThresholdConfirmations_Body pending_threshold_confirmations;
+   };
+} LDKOutputSpendStatus;
+
+/**
+ * The contents of CResult_OutputSpendStatusDecodeErrorZ
+ */
+typedef union LDKCResult_OutputSpendStatusDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKOutputSpendStatus *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_OutputSpendStatusDecodeErrorZPtr;
+
+/**
+ * A CResult_OutputSpendStatusDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::util::sweep::OutputSpendStatus 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_OutputSpendStatusDecodeErrorZ {
+   /**
+    * The contents of this CResult_OutputSpendStatusDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_OutputSpendStatusDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_OutputSpendStatusDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_OutputSpendStatusDecodeErrorZ;
+
+
+
 /**
  * A transaction output watched by a [`ChannelMonitor`] for spends on-chain.
  *
@@ -16272,354 +21087,1059 @@ typedef struct LDKCOption_FilterZ {
    };
 } LDKCOption_FilterZ;
 
-
-
 /**
- * A read-only reference to a current ChannelMonitor.
- *
- * Note that this holds a mutex in [`ChainMonitor`] and may block other events until it is
- * released.
+ * A dynamically-allocated array of crate::lightning::util::sweep::TrackedSpendableOutputs of arbitrary size.
+ * This corresponds to std::vector in C++
  */
-typedef struct MUST_USE_STRUCT LDKLockedChannelMonitor {
+typedef struct LDKCVec_TrackedSpendableOutputZ {
    /**
-    * 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.
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   LDKnativeLockedChannelMonitor *inner;
+   struct LDKTrackedSpendableOutput *data;
    /**
-    * 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.
+    * The number of elements pointed to by `data`.
     */
-   bool is_owned;
-} LDKLockedChannelMonitor;
+   uintptr_t datalen;
+} LDKCVec_TrackedSpendableOutputZ;
 
 /**
- * The contents of CResult_LockedChannelMonitorNoneZ
+ * A helper trait that describes an on-chain wallet capable of returning a (change) destination
+ * script.
  */
-typedef union LDKCResult_LockedChannelMonitorNoneZPtr {
+typedef struct LDKChangeDestinationSource {
    /**
-    * A pointer to the contents in the success state.
-    * Reading from this pointer when `result_ok` is not set is undefined.
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
     */
-   struct LDKLockedChannelMonitor *result;
+   void *this_arg;
    /**
-    * Note that this value is always NULL, as there are no contents in the Err variant
+    * Returns a script pubkey which can be used as a change destination for
+    * [`OutputSpender::spend_spendable_outputs`].
+    *
+    * This method should return a different value each time it is called, to avoid linking
+    * on-chain funds controlled to the same user.
     */
-   void *err;
-} LDKCResult_LockedChannelMonitorNoneZPtr;
+   struct LDKCResult_CVec_u8ZNoneZ (*get_change_destination_script)(const void *this_arg);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKChangeDestinationSource;
 
 /**
- * A CResult_LockedChannelMonitorNoneZ represents the result of a fallible operation,
- * containing a crate::lightning::chain::chainmonitor::LockedChannelMonitor on success and a () on failure.
- * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ * Provides an interface that allows storage and retrieval of persisted values that are associated
+ * with given keys.
+ *
+ * In order to avoid collisions the key space is segmented based on the given `primary_namespace`s
+ * and `secondary_namespace`s. Implementations of this trait are free to handle them in different
+ * ways, as long as per-namespace key uniqueness is asserted.
+ *
+ * Keys and namespaces are required to be valid ASCII strings in the range of
+ * [`KVSTORE_NAMESPACE_KEY_ALPHABET`] and no longer than [`KVSTORE_NAMESPACE_KEY_MAX_LEN`]. Empty
+ * primary namespaces and secondary namespaces (`\"\"`) are assumed to be a valid, however, if
+ * `primary_namespace` is empty, `secondary_namespace` is required to be empty, too. This means
+ * that concerns should always be separated by primary namespace first, before secondary
+ * namespaces are used. While the number of primary namespaces will be relatively small and is
+ * determined at compile time, there may be many secondary namespaces per primary namespace. Note
+ * that per-namespace uniqueness needs to also hold for keys *and* namespaces in any given
+ * namespace, i.e., conflicts between keys and equally named
+ * primary namespaces/secondary namespaces must be avoided.
+ *
+ * **Note:** Users migrating custom persistence backends from the pre-v0.0.117 `KVStorePersister`
+ * interface can use a concatenation of `[{primary_namespace}/[{secondary_namespace}/]]{key}` to
+ * recover a `key` compatible with the data model previously assumed by `KVStorePersister::persist`.
  */
-typedef struct LDKCResult_LockedChannelMonitorNoneZ {
+typedef struct LDKKVStore {
    /**
-    * The contents of this CResult_LockedChannelMonitorNoneZ, accessible via either
-    * `err` or `result` depending on the state of `result_ok`.
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
     */
-   union LDKCResult_LockedChannelMonitorNoneZPtr contents;
+   void *this_arg;
    /**
-    * Whether this CResult_LockedChannelMonitorNoneZ represents a success state.
+    * Returns the data stored for the given `primary_namespace`, `secondary_namespace`, and
+    * `key`.
+    *
+    * Returns an [`ErrorKind::NotFound`] if the given `key` could not be found in the given
+    * `primary_namespace` and `secondary_namespace`.
+    *
+    * [`ErrorKind::NotFound`]: io::ErrorKind::NotFound
     */
-   bool result_ok;
-} LDKCResult_LockedChannelMonitorNoneZ;
+   struct LDKCResult_CVec_u8ZIOErrorZ (*read)(const void *this_arg, struct LDKStr primary_namespace, struct LDKStr secondary_namespace, struct LDKStr key);
+   /**
+    * Persists the given data under the given `key`.
+    *
+    * Will create the given `primary_namespace` and `secondary_namespace` if not already present
+    * in the store.
+    */
+   struct LDKCResult_NoneIOErrorZ (*write)(const void *this_arg, struct LDKStr primary_namespace, struct LDKStr secondary_namespace, struct LDKStr key, struct LDKu8slice buf);
+   /**
+    * Removes any data that had previously been persisted under the given `key`.
+    *
+    * If the `lazy` flag is set to `true`, the backend implementation might choose to lazily
+    * remove the given `key` at some point in time after the method returns, e.g., as part of an
+    * eventual batch deletion of multiple keys. As a consequence, subsequent calls to
+    * [`KVStore::list`] might include the removed key until the changes are actually persisted.
+    *
+    * Note that while setting the `lazy` flag reduces the I/O burden of multiple subsequent
+    * `remove` calls, it also influences the atomicity guarantees as lazy `remove`s could
+    * potentially get lost on crash after the method returns. Therefore, this flag should only be
+    * set for `remove` operations that can be safely replayed at a later time.
+    *
+    * Returns successfully if no data will be stored for the given `primary_namespace`,
+    * `secondary_namespace`, and `key`, independently of whether it was present before its
+    * invokation or not.
+    */
+   struct LDKCResult_NoneIOErrorZ (*remove)(const void *this_arg, struct LDKStr primary_namespace, struct LDKStr secondary_namespace, struct LDKStr key, bool lazy);
+   /**
+    * Returns a list of keys that are stored under the given `secondary_namespace` in
+    * `primary_namespace`.
+    *
+    * Returns the keys in arbitrary order, so users requiring a particular order need to sort the
+    * returned keys. Returns an empty list if `primary_namespace` or `secondary_namespace` is unknown.
+    */
+   struct LDKCResult_CVec_StrZIOErrorZ (*list)(const void *this_arg, struct LDKStr primary_namespace, struct LDKStr secondary_namespace);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKKVStore;
 
 /**
- * A dynamically-allocated array of crate::lightning::chain::transaction::OutPoints of arbitrary size.
- * This corresponds to std::vector in C++
+ * A trait that describes a wallet capable of creating a spending [`Transaction`] from a set of
+ * [`SpendableOutputDescriptor`]s.
  */
-typedef struct LDKCVec_OutPointZ {
+typedef struct LDKOutputSpender {
    /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
     */
-   struct LDKOutPoint *data;
+   void *this_arg;
    /**
-    * The number of elements pointed to by `data`.
+    * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an
+    * output to the given change destination (if sufficient change value remains). The
+    * transaction will have a feerate, at least, of the given value.
+    *
+    * The `locktime` argument is used to set the transaction's locktime. If `None`, the
+    * transaction will have a locktime of 0. It it recommended to set this to the current block
+    * height to avoid fee sniping, unless you have some specific reason to use a different
+    * locktime.
+    *
+    * Returns `Err(())` if the output value is greater than the input value minus required fee,
+    * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
+    * does not match the one we can spend.
     */
-   uintptr_t datalen;
-} LDKCVec_OutPointZ;
+   struct LDKCResult_TransactionNoneZ (*spend_spendable_outputs)(const void *this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKOutputSpender;
 
 
 
 /**
- * An opaque identifier describing a specific [`Persist`] method call.
+ * A utility that keeps track of [`SpendableOutputDescriptor`]s, persists them in a given
+ * [`KVStore`] and regularly retries sweeping them based on a callback given to the constructor
+ * methods.
+ *
+ * Users should call [`Self::track_spendable_outputs`] for any [`SpendableOutputDescriptor`]s received via [`Event::SpendableOutputs`].
+ *
+ * This needs to be notified of chain state changes either via its [`Listen`] or [`Confirm`]
+ * implementation and hence has to be connected with the utilized chain data sources.
+ *
+ * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users are
+ * required to give their chain data sources (i.e., [`Filter`] implementation) to the respective
+ * constructor.
+ *
+ * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs
  */
-typedef struct MUST_USE_STRUCT LDKMonitorUpdateId {
+typedef struct MUST_USE_STRUCT LDKOutputSweeper {
    /**
     * 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.
     */
-   LDKnativeMonitorUpdateId *inner;
+   LDKnativeOutputSweeper *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;
-} LDKMonitorUpdateId;
+} LDKOutputSweeper;
 
 /**
- * A dynamically-allocated array of crate::lightning::chain::chainmonitor::MonitorUpdateIds of arbitrary size.
- * This corresponds to std::vector in C++
+ * The contents of CResult_OutputSweeperDecodeErrorZ
  */
-typedef struct LDKCVec_MonitorUpdateIdZ {
+typedef union LDKCResult_OutputSweeperDecodeErrorZPtr {
    /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKMonitorUpdateId *data;
+   struct LDKOutputSweeper *result;
    /**
-    * The number of elements pointed to by `data`.
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   uintptr_t datalen;
-} LDKCVec_MonitorUpdateIdZ;
+   struct LDKDecodeError *err;
+} LDKCResult_OutputSweeperDecodeErrorZPtr;
 
 /**
- * A tuple of 2 elements. See the individual fields for the types contained.
+ * A CResult_OutputSweeperDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::util::sweep::OutputSweeper 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 LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ {
+typedef struct LDKCResult_OutputSweeperDecodeErrorZ {
    /**
-    * The element at position 0
+    * The contents of this CResult_OutputSweeperDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
     */
-   struct LDKOutPoint a;
+   union LDKCResult_OutputSweeperDecodeErrorZPtr contents;
    /**
-    * The element at position 1
+    * Whether this CResult_OutputSweeperDecodeErrorZ represents a success state.
     */
-   struct LDKCVec_MonitorUpdateIdZ b;
-} LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ;
+   bool result_ok;
+} LDKCResult_OutputSweeperDecodeErrorZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_OutPointCVec_MonitorUpdateIdZZs of arbitrary size.
- * This corresponds to std::vector in C++
+ * A tuple of 2 elements. See the individual fields for the types contained.
  */
-typedef struct LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ {
+typedef struct LDKC2Tuple_BestBlockOutputSweeperZ {
    /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    * The element at position 0
     */
-   struct LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *data;
+   struct LDKBestBlock a;
    /**
-    * The number of elements pointed to by `data`.
+    * The element at position 1
     */
-   uintptr_t datalen;
-} LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ;
+   struct LDKOutputSweeper b;
+} LDKC2Tuple_BestBlockOutputSweeperZ;
 
 /**
- * Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk.
+ * The contents of CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ
  */
-typedef struct LDKPersister {
-   /**
-    * An opaque pointer which is passed to your function implementations as an argument.
-    * This has no meaning in the LDK, and can be NULL or any other value.
-    */
-   void *this_arg;
+typedef union LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZPtr {
    /**
-    * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKCResult_NoneErrorZ (*persist_manager)(const void *this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager);
+   struct LDKC2Tuple_BestBlockOutputSweeperZ *result;
    /**
-    * Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed.
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   struct LDKCResult_NoneErrorZ (*persist_graph)(const void *this_arg, const struct LDKNetworkGraph *NONNULL_PTR network_graph);
+   struct LDKDecodeError *err;
+} LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZPtr;
+
+/**
+ * A CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::C2Tuple_BestBlockOutputSweeperZ 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_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ {
    /**
-    * Persist the given [`WriteableScore`] to disk, returning an error if persistence failed.
+    * The contents of this CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
     */
-   struct LDKCResult_NoneErrorZ (*persist_scorer)(const void *this_arg, const struct LDKWriteableScore *NONNULL_PTR scorer);
+   union LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZPtr contents;
    /**
-    * Frees any resources associated with this object given its this_arg pointer.
-    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    * Whether this CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ represents a success state.
     */
-   void (*free)(void *this_arg);
-} LDKPersister;
+   bool result_ok;
+} LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ;
 
 
 
 /**
- * A string that displays only printable characters, replacing control characters with
- * [`core::char::REPLACEMENT_CHARACTER`].
+ * Base key used in conjunction with a `per_commitment_point` to generate a [`DelayedPaymentKey`].
+ *
+ * The delayed payment key is used to pay the commitment state broadcaster their
+ * non-HTLC-encumbered funds after a delay to give their counterparty a chance to punish if the
+ * state broadcasted was previously revoked.
  */
-typedef struct MUST_USE_STRUCT LDKPrintableString {
+typedef struct MUST_USE_STRUCT LDKDelayedPaymentBasepoint {
    /**
     * 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.
     */
-   LDKnativePrintableString *inner;
+   LDKnativeDelayedPaymentBasepoint *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;
-} LDKPrintableString;
+} LDKDelayedPaymentBasepoint;
 
 /**
- * A callback which is called when a [`Future`] completes.
- *
- * Note that this MUST NOT call back into LDK directly, it must instead schedule actions to be
- * taken later. Rust users should use the [`std::future::Future`] implementation for [`Future`]
- * instead.
- *
- * Note that the [`std::future::Future`] implementation may only work for runtimes which schedule
- * futures when they receive a wake, rather than immediately executing them.
+ * The contents of CResult_DelayedPaymentBasepointDecodeErrorZ
  */
-typedef struct LDKFutureCallback {
+typedef union LDKCResult_DelayedPaymentBasepointDecodeErrorZPtr {
    /**
-    * An opaque pointer which is passed to your function implementations as an argument.
-    * This has no meaning in the LDK, and can be NULL or any other value.
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   void *this_arg;
+   struct LDKDelayedPaymentBasepoint *result;
    /**
-    * The method which is called.
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
     */
-   void (*call)(const void *this_arg);
+   struct LDKDecodeError *err;
+} LDKCResult_DelayedPaymentBasepointDecodeErrorZPtr;
+
+/**
+ * A CResult_DelayedPaymentBasepointDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channel_keys::DelayedPaymentBasepoint 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_DelayedPaymentBasepointDecodeErrorZ {
    /**
-    * Frees any resources associated with this object given its this_arg pointer.
-    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    * The contents of this CResult_DelayedPaymentBasepointDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
     */
-   void (*free)(void *this_arg);
-} LDKFutureCallback;
+   union LDKCResult_DelayedPaymentBasepointDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_DelayedPaymentBasepointDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_DelayedPaymentBasepointDecodeErrorZ;
 
 
 
 /**
- * A struct which can be used to select across many [`Future`]s at once without relying on a full
- * async context.
+ * A derived key built from a [`DelayedPaymentBasepoint`] and `per_commitment_point`.
+ *
+ * The delayed payment key is used to pay the commitment state broadcaster their
+ * non-HTLC-encumbered funds after a delay. This delay gives their counterparty a chance to
+ * punish and claim all the channel funds if the state broadcasted was previously revoked.
+ *
+ * [See the BOLT specs]
+ * (https://github.com/lightning/bolts/blob/master/03-transactions.md#localpubkey-local_htlcpubkey-remote_htlcpubkey-local_delayedpubkey-and-remote_delayedpubkey-derivation)
+ * for more information on key derivation details.
  */
-typedef struct MUST_USE_STRUCT LDKSleeper {
+typedef struct MUST_USE_STRUCT LDKDelayedPaymentKey {
    /**
     * 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.
     */
-   LDKnativeSleeper *inner;
+   LDKnativeDelayedPaymentKey *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;
-} LDKSleeper;
+} LDKDelayedPaymentKey;
+
+/**
+ * The contents of CResult_DelayedPaymentKeyDecodeErrorZ
+ */
+typedef union LDKCResult_DelayedPaymentKeyDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKDelayedPaymentKey *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_DelayedPaymentKeyDecodeErrorZPtr;
+
+/**
+ * A CResult_DelayedPaymentKeyDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channel_keys::DelayedPaymentKey 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_DelayedPaymentKeyDecodeErrorZ {
+   /**
+    * The contents of this CResult_DelayedPaymentKeyDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_DelayedPaymentKeyDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_DelayedPaymentKeyDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_DelayedPaymentKeyDecodeErrorZ;
 
 
 
 /**
- * Configuration we set when applicable.
+ * Base key used in conjunction with a `per_commitment_point` to generate an [`HtlcKey`].
  *
- * Default::default() provides sane defaults.
+ * HTLC keys are used to ensure only the recipient of an HTLC can claim it on-chain with the HTLC
+ * preimage and that only the sender of an HTLC can claim it on-chain after it has timed out.
+ * Thus, both channel counterparties' HTLC keys will appears in each HTLC output's script.
  */
-typedef struct MUST_USE_STRUCT LDKChannelHandshakeConfig {
+typedef struct MUST_USE_STRUCT LDKHtlcBasepoint {
    /**
     * 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.
     */
-   LDKnativeChannelHandshakeConfig *inner;
+   LDKnativeHtlcBasepoint *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;
-} LDKChannelHandshakeConfig;
-
-
+} LDKHtlcBasepoint;
 
 /**
- * Optional channel limits which are applied during channel creation.
- *
- * These limits are only applied to our counterparty's limits, not our own.
+ * The contents of CResult_HtlcBasepointDecodeErrorZ
+ */
+typedef union LDKCResult_HtlcBasepointDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKHtlcBasepoint *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_HtlcBasepointDecodeErrorZPtr;
+
+/**
+ * A CResult_HtlcBasepointDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channel_keys::HtlcBasepoint 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_HtlcBasepointDecodeErrorZ {
+   /**
+    * The contents of this CResult_HtlcBasepointDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_HtlcBasepointDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_HtlcBasepointDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_HtlcBasepointDecodeErrorZ;
+
+
+
+/**
+ * A derived key built from a [`HtlcBasepoint`] and `per_commitment_point`.
  *
- * Use 0/`<type>::max_value()` as appropriate to skip checking.
+ * HTLC keys are used to ensure only the recipient of an HTLC can claim it on-chain with the HTLC
+ * preimage and that only the sender of an HTLC can claim it on-chain after it has timed out.
+ * Thus, both channel counterparties' HTLC keys will appears in each HTLC output's script.
  *
- * Provides sane defaults for most configurations.
+ * [See the BOLT specs]
+ * (https://github.com/lightning/bolts/blob/master/03-transactions.md#localpubkey-local_htlcpubkey-remote_htlcpubkey-local_delayedpubkey-and-remote_delayedpubkey-derivation)
+ * for more information on key derivation details.
+ */
+typedef struct MUST_USE_STRUCT LDKHtlcKey {
+   /**
+    * 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.
+    */
+   LDKnativeHtlcKey *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;
+} LDKHtlcKey;
+
+/**
+ * The contents of CResult_HtlcKeyDecodeErrorZ
+ */
+typedef union LDKCResult_HtlcKeyDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKHtlcKey *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_HtlcKeyDecodeErrorZPtr;
+
+/**
+ * A CResult_HtlcKeyDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channel_keys::HtlcKey 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_HtlcKeyDecodeErrorZ {
+   /**
+    * The contents of this CResult_HtlcKeyDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_HtlcKeyDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_HtlcKeyDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_HtlcKeyDecodeErrorZ;
+
+
+
+/**
+ * Master key used in conjunction with per_commitment_point to generate [htlcpubkey](https://github.com/lightning/bolts/blob/master/03-transactions.md#key-derivation) for the latest state of a channel.
+ * A watcher can be given a [RevocationBasepoint] to generate per commitment [RevocationKey] to create justice transactions.
+ */
+typedef struct MUST_USE_STRUCT LDKRevocationBasepoint {
+   /**
+    * 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.
+    */
+   LDKnativeRevocationBasepoint *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;
+} LDKRevocationBasepoint;
+
+/**
+ * The contents of CResult_RevocationBasepointDecodeErrorZ
+ */
+typedef union LDKCResult_RevocationBasepointDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKRevocationBasepoint *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_RevocationBasepointDecodeErrorZPtr;
+
+/**
+ * A CResult_RevocationBasepointDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channel_keys::RevocationBasepoint 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_RevocationBasepointDecodeErrorZ {
+   /**
+    * The contents of this CResult_RevocationBasepointDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_RevocationBasepointDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_RevocationBasepointDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_RevocationBasepointDecodeErrorZ;
+
+
+
+/**
+ * The revocation key is used to allow a channel party to revoke their state - giving their
+ * counterparty the required material to claim all of their funds if they broadcast that state.
  *
- * Most additional limits are disabled except those with which specify a default in individual
- * field documentation. Note that this may result in barely-usable channels, but since they
- * are applied mostly only to incoming channels that's not much of a problem.
+ * Each commitment transaction has a revocation key based on the basepoint and
+ * per_commitment_point which is used in both commitment and HTLC transactions.
+ *
+ * See [the BOLT spec for derivation details]
+ * (https://github.com/lightning/bolts/blob/master/03-transactions.md#revocationpubkey-derivation)
  */
-typedef struct MUST_USE_STRUCT LDKChannelHandshakeLimits {
+typedef struct MUST_USE_STRUCT LDKRevocationKey {
    /**
     * 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.
     */
-   LDKnativeChannelHandshakeLimits *inner;
+   LDKnativeRevocationKey *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;
-} LDKChannelHandshakeLimits;
+} LDKRevocationKey;
+
+/**
+ * The contents of CResult_RevocationKeyDecodeErrorZ
+ */
+typedef union LDKCResult_RevocationKeyDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKRevocationKey *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_RevocationKeyDecodeErrorZPtr;
+
+/**
+ * A CResult_RevocationKeyDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::channel_keys::RevocationKey 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_RevocationKeyDecodeErrorZ {
+   /**
+    * The contents of this CResult_RevocationKeyDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_RevocationKeyDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_RevocationKeyDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_RevocationKeyDecodeErrorZ;
 
 
 
 /**
- * A parallel struct to [`ChannelConfig`] to define partial updates.
+ * A read-only reference to a current ChannelMonitor.
+ *
+ * Note that this holds a mutex in [`ChainMonitor`] and may block other events until it is
+ * released.
  */
-typedef struct MUST_USE_STRUCT LDKChannelConfigUpdate {
+typedef struct MUST_USE_STRUCT LDKLockedChannelMonitor {
    /**
     * 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.
     */
-   LDKnativeChannelConfigUpdate *inner;
+   LDKnativeLockedChannelMonitor *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;
-} LDKChannelConfigUpdate;
+} LDKLockedChannelMonitor;
+
+/**
+ * The contents of CResult_LockedChannelMonitorNoneZ
+ */
+typedef union LDKCResult_LockedChannelMonitorNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKLockedChannelMonitor *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_LockedChannelMonitorNoneZPtr;
 
+/**
+ * A CResult_LockedChannelMonitorNoneZ represents the result of a fallible operation,
+ * containing a crate::lightning::chain::chainmonitor::LockedChannelMonitor on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_LockedChannelMonitorNoneZ {
+   /**
+    * The contents of this CResult_LockedChannelMonitorNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_LockedChannelMonitorNoneZPtr contents;
+   /**
+    * Whether this CResult_LockedChannelMonitorNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_LockedChannelMonitorNoneZ;
 
+/**
+ * A tuple of 2 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC2Tuple_OutPointChannelIdZ {
+   /**
+    * The element at position 0
+    */
+   struct LDKOutPoint a;
+   /**
+    * The element at position 1
+    */
+   struct LDKChannelId b;
+} LDKC2Tuple_OutPointChannelIdZ;
 
 /**
- * Top-level config which holds ChannelHandshakeLimits and ChannelConfig.
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_OutPointChannelIdZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C2Tuple_OutPointChannelIdZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC2Tuple_OutPointChannelIdZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C2Tuple_OutPointChannelIdZZ;
+
+
+
+/**
+ * An opaque identifier describing a specific [`Persist`] method call.
+ */
+typedef struct MUST_USE_STRUCT LDKMonitorUpdateId {
+   /**
+    * 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.
+    */
+   LDKnativeMonitorUpdateId *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;
+} LDKMonitorUpdateId;
+
+/**
+ * A dynamically-allocated array of crate::lightning::chain::chainmonitor::MonitorUpdateIds of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_MonitorUpdateIdZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKMonitorUpdateId *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_MonitorUpdateIdZ;
+
+/**
+ * A tuple of 2 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ {
+   /**
+    * The element at position 0
+    */
+   struct LDKOutPoint a;
+   /**
+    * The element at position 1
+    */
+   struct LDKCVec_MonitorUpdateIdZ b;
+} LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_OutPointCVec_MonitorUpdateIdZZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKC2Tuple_OutPointCVec_MonitorUpdateIdZZ *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_C2Tuple_OutPointCVec_MonitorUpdateIdZZZ;
+
+/**
+ * Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk.
  *
- * Default::default() provides sane defaults for most configurations
- * (but currently with 0 relay fees!)
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
  */
-typedef struct MUST_USE_STRUCT LDKUserConfig {
+typedef struct LDKPersister {
+   /**
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
+    */
+   void *this_arg;
+   /**
+    * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
+    *
+    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+    */
+   struct LDKCResult_NoneIOErrorZ (*persist_manager)(const void *this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager);
+   /**
+    * Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed.
+    */
+   struct LDKCResult_NoneIOErrorZ (*persist_graph)(const void *this_arg, const struct LDKNetworkGraph *NONNULL_PTR network_graph);
+   /**
+    * Persist the given [`WriteableScore`] to disk, returning an error if persistence failed.
+    */
+   struct LDKCResult_NoneIOErrorZ (*persist_scorer)(const void *this_arg, const struct LDKWriteableScore *NONNULL_PTR scorer);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKPersister;
+
+
+
+/**
+ * Implements [`Persist`] in a way that writes and reads both [`ChannelMonitor`]s and
+ * [`ChannelMonitorUpdate`]s.
+ *
+ * # Overview
+ *
+ * The main benefit this provides over the [`KVStore`]'s [`Persist`] implementation is decreased
+ * I/O bandwidth and storage churn, at the expense of more IOPS (including listing, reading, and
+ * deleting) and complexity. This is because it writes channel monitor differential updates,
+ * whereas the other (default) implementation rewrites the entire monitor on each update. For
+ * routing nodes, updates can happen many times per second to a channel, and monitors can be tens
+ * of megabytes (or more). Updates can be as small as a few hundred bytes.
+ *
+ * Note that monitors written with `MonitorUpdatingPersister` are _not_ backward-compatible with
+ * the default [`KVStore`]'s [`Persist`] implementation. They have a prepended byte sequence,
+ * [`MONITOR_UPDATING_PERSISTER_PREPEND_SENTINEL`], applied to prevent deserialization with other
+ * persisters. This is because monitors written by this struct _may_ have unapplied updates. In
+ * order to downgrade, you must ensure that all updates are applied to the monitor, and remove the
+ * sentinel bytes.
+ *
+ * # Storing monitors
+ *
+ * Monitors are stored by implementing the [`Persist`] trait, which has two functions:
+ *
+ *   - [`Persist::persist_new_channel`], which persists whole [`ChannelMonitor`]s.
+ *   - [`Persist::update_persisted_channel`], which persists only a [`ChannelMonitorUpdate`]
+ *
+ * Whole [`ChannelMonitor`]s are stored in the [`CHANNEL_MONITOR_PERSISTENCE_PRIMARY_NAMESPACE`],
+ * using the familiar encoding of an [`OutPoint`] (for example, `[SOME-64-CHAR-HEX-STRING]_1`).
+ *
+ * Each [`ChannelMonitorUpdate`] is stored in a dynamic secondary namespace, as follows:
+ *
+ *   - primary namespace: [`CHANNEL_MONITOR_UPDATE_PERSISTENCE_PRIMARY_NAMESPACE`]
+ *   - secondary namespace: [the monitor's encoded outpoint name]
+ *
+ * Under that secondary namespace, each update is stored with a number string, like `21`, which
+ * represents its `update_id` value.
+ *
+ * For example, consider this channel, named for its transaction ID and index, or [`OutPoint`]:
+ *
+ *   - Transaction ID: `deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef`
+ *   - Index: `1`
+ *
+ * Full channel monitors would be stored at a single key:
+ *
+ * `[CHANNEL_MONITOR_PERSISTENCE_PRIMARY_NAMESPACE]/deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef_1`
+ *
+ * Updates would be stored as follows (with `/` delimiting primary_namespace/secondary_namespace/key):
+ *
+ * ```text
+ * [CHANNEL_MONITOR_UPDATE_PERSISTENCE_PRIMARY_NAMESPACE]/deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef_1/1
+ * [CHANNEL_MONITOR_UPDATE_PERSISTENCE_PRIMARY_NAMESPACE]/deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef_1/2
+ * [CHANNEL_MONITOR_UPDATE_PERSISTENCE_PRIMARY_NAMESPACE]/deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef_1/3
+ * ```
+ * ... and so on.
+ *
+ * # Reading channel state from storage
+ *
+ * Channel state can be reconstructed by calling
+ * [`MonitorUpdatingPersister::read_all_channel_monitors_with_updates`]. Alternatively, users can
+ * list channel monitors themselves and load channels individually using
+ * [`MonitorUpdatingPersister::read_channel_monitor_with_updates`].
+ *
+ * ## EXTREMELY IMPORTANT
+ *
+ * It is extremely important that your [`KVStore::read`] implementation uses the
+ * [`io::ErrorKind::NotFound`] variant correctly: that is, when a file is not found, and _only_ in
+ * that circumstance (not when there is really a permissions error, for example). This is because
+ * neither channel monitor reading function lists updates. Instead, either reads the monitor, and
+ * using its stored `update_id`, synthesizes update storage keys, and tries them in sequence until
+ * one is not found. All _other_ errors will be bubbled up in the function's [`Result`].
+ *
+ * # Pruning stale channel updates
+ *
+ * Stale updates are pruned when the consolidation threshold is reached according to `maximum_pending_updates`.
+ * Monitor updates in the range between the latest `update_id` and `update_id - maximum_pending_updates`
+ * are deleted.
+ * The `lazy` flag is used on the [`KVStore::remove`] method, so there are no guarantees that the deletions
+ * will complete. However, stale updates are not a problem for data integrity, since updates are
+ * only read that are higher than the stored [`ChannelMonitor`]'s `update_id`.
+ *
+ * If you have many stale updates stored (such as after a crash with pending lazy deletes), and
+ * would like to get rid of them, consider using the
+ * [`MonitorUpdatingPersister::cleanup_stale_updates`] function.
+ */
+typedef struct MUST_USE_STRUCT LDKMonitorUpdatingPersister {
    /**
     * 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.
     */
-   LDKnativeUserConfig *inner;
+   LDKnativeMonitorUpdatingPersister *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;
-} LDKUserConfig;
+} LDKMonitorUpdatingPersister;
+
+/**
+ * `Persist` defines behavior for persisting channel monitors: this could mean
+ * writing once to disk, and/or uploading to one or more backup services.
+ *
+ * Persistence can happen in one of two ways - synchronously completing before the trait method
+ * calls return or asynchronously in the background.
+ *
+ * # For those implementing synchronous persistence
+ *
+ *  * If persistence completes fully (including any relevant `fsync()` calls), the implementation
+ *    should return [`ChannelMonitorUpdateStatus::Completed`], indicating normal channel operation
+ *    should continue.
+ *
+ *  * If persistence fails for some reason, implementations should consider returning
+ *    [`ChannelMonitorUpdateStatus::InProgress`] and retry all pending persistence operations in
+ *    the background with [`ChainMonitor::list_pending_monitor_updates`] and
+ *    [`ChainMonitor::get_monitor`].
+ *
+ *    Once a full [`ChannelMonitor`] has been persisted, all pending updates for that channel can
+ *    be marked as complete via [`ChainMonitor::channel_monitor_updated`].
+ *
+ *    If at some point no further progress can be made towards persisting the pending updates, the
+ *    node should simply shut down.
+ *
+ *  * If the persistence has failed and cannot be retried further (e.g. because of an outage),
+ *    [`ChannelMonitorUpdateStatus::UnrecoverableError`] can be used, though this will result in
+ *    an immediate panic and future operations in LDK generally failing.
+ *
+ * # For those implementing asynchronous persistence
+ *
+ *  All calls should generally spawn a background task and immediately return
+ *  [`ChannelMonitorUpdateStatus::InProgress`]. Once the update completes,
+ *  [`ChainMonitor::channel_monitor_updated`] should be called with the corresponding
+ *  [`MonitorUpdateId`].
+ *
+ *  Note that unlike the direct [`chain::Watch`] interface,
+ *  [`ChainMonitor::channel_monitor_updated`] must be called once for *each* update which occurs.
+ *
+ *  If at some point no further progress can be made towards persisting a pending update, the node
+ *  should simply shut down. Until then, the background task should either loop indefinitely, or
+ *  persistence should be regularly retried with [`ChainMonitor::list_pending_monitor_updates`]
+ *  and [`ChainMonitor::get_monitor`] (note that if a full monitor is persisted all pending
+ *  monitor updates may be marked completed).
+ *
+ * # Using remote watchtowers
+ *
+ * Watchtowers may be updated as a part of an implementation of this trait, utilizing the async
+ * update process described above while the watchtower is being updated. The following methods are
+ * provided for bulding transactions for a watchtower:
+ * [`ChannelMonitor::initial_counterparty_commitment_tx`],
+ * [`ChannelMonitor::counterparty_commitment_txs_from_update`],
+ * [`ChannelMonitor::sign_to_local_justice_tx`], [`TrustedCommitmentTransaction::revokeable_output_index`],
+ * [`TrustedCommitmentTransaction::build_to_local_justice_tx`].
+ *
+ * [`TrustedCommitmentTransaction::revokeable_output_index`]: crate::ln::chan_utils::TrustedCommitmentTransaction::revokeable_output_index
+ * [`TrustedCommitmentTransaction::build_to_local_justice_tx`]: crate::ln::chan_utils::TrustedCommitmentTransaction::build_to_local_justice_tx
+ */
+typedef struct LDKPersist {
+   /**
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
+    */
+   void *this_arg;
+   /**
+    * Persist a new channel's data in response to a [`chain::Watch::watch_channel`] call. This is
+    * called by [`ChannelManager`] for new channels, or may be called directly, e.g. on startup.
+    *
+    * The data can be stored any way you want, but the identifier provided by LDK is the
+    * channel's outpoint (and it is up to you to maintain a correct mapping between the outpoint
+    * and the stored channel data). Note that you **must** persist every new monitor to disk.
+    *
+    * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
+    * if you return [`ChannelMonitorUpdateStatus::InProgress`].
+    *
+    * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
+    * and [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
+    *
+    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+    * [`Writeable::write`]: crate::util::ser::Writeable::write
+    */
+   enum LDKChannelMonitorUpdateStatus (*persist_new_channel)(const void *this_arg, struct LDKOutPoint channel_funding_outpoint, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id);
+   /**
+    * Update one channel's data. The provided [`ChannelMonitor`] has already applied the given
+    * update.
+    *
+    * Note that on every update, you **must** persist either the [`ChannelMonitorUpdate`] or the
+    * updated monitor itself to disk/backups. See the [`Persist`] trait documentation for more
+    * details.
+    *
+    * During blockchain synchronization operations, and in some rare cases, this may be called with
+    * no [`ChannelMonitorUpdate`], in which case the full [`ChannelMonitor`] needs to be persisted.
+    * Note that after the full [`ChannelMonitor`] is persisted any previous
+    * [`ChannelMonitorUpdate`]s which were persisted should be discarded - they can no longer be
+    * applied to the persisted [`ChannelMonitor`] as they were already applied.
+    *
+    * If an implementer chooses to persist the updates only, they need to make
+    * sure that all the updates are applied to the `ChannelMonitors` *before*
+    * the set of channel monitors is given to the `ChannelManager`
+    * deserialization routine. See [`ChannelMonitor::update_monitor`] for
+    * applying a monitor update to a monitor. If full `ChannelMonitors` are
+    * persisted, then there is no need to persist individual updates.
+    *
+    * Note that there could be a performance tradeoff between persisting complete
+    * channel monitors on every update vs. persisting only updates and applying
+    * them in batches. The size of each monitor grows `O(number of state updates)`
+    * whereas updates are small and `O(1)`.
+    *
+    * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
+    * if you return [`ChannelMonitorUpdateStatus::InProgress`].
+    *
+    * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
+    * [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
+    * [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
+    *
+    * [`Writeable::write`]: crate::util::ser::Writeable::write
+    *
+    * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   enum LDKChannelMonitorUpdateStatus (*update_persisted_channel)(const void *this_arg, struct LDKOutPoint channel_funding_outpoint, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id);
+   /**
+    * Prevents the channel monitor from being loaded on startup.
+    *
+    * Archiving the data in a backup location (rather than deleting it fully) is useful for
+    * hedging against data loss in case of unexpected failure.
+    */
+   void (*archive_persisted_channel)(const void *this_arg, struct LDKOutPoint channel_funding_outpoint);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKPersist;
 
 
 
 /**
- * The best known block as identified by its hash and height.
+ * A string that displays only printable characters, replacing control characters with
+ * [`core::char::REPLACEMENT_CHARACTER`].
  */
-typedef struct MUST_USE_STRUCT LDKBestBlock {
+typedef struct MUST_USE_STRUCT LDKPrintableString {
    /**
     * 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.
     */
-   LDKnativeBestBlock *inner;
+   LDKnativePrintableString *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;
-} LDKBestBlock;
+} LDKPrintableString;
 
 /**
  * The `Listen` trait is used to notify when blocks have been connected or disconnected from the
@@ -16741,7 +22261,7 @@ typedef struct LDKConfirm {
    void (*best_block_updated)(const void *this_arg, const uint8_t (*header)[80], uint32_t height);
    /**
     * Returns transactions that must be monitored for reorganization out of the chain along
-    * with the hash of the block as part of which it had been previously confirmed.
+    * with the height and the hash of the block as part of which it had been previously confirmed.
     *
     * Note that the returned `Option<BlockHash>` might be `None` for channels created with LDK
     * 0.0.112 and prior, in which case you need to manually track previous confirmations.
@@ -16756,13 +22276,13 @@ typedef struct LDKConfirm {
     * given to [`transaction_unconfirmed`].
     *
     * If any of the returned transactions are confirmed in a block other than the one with the
-    * given hash, they need to be unconfirmed and reconfirmed via [`transaction_unconfirmed`] and
-    * [`transactions_confirmed`], respectively.
+    * given hash at the given height, they need to be unconfirmed and reconfirmed via
+    * [`transaction_unconfirmed`] and [`transactions_confirmed`], respectively.
     *
     * [`transactions_confirmed`]: Self::transactions_confirmed
     * [`transaction_unconfirmed`]: Self::transaction_unconfirmed
     */
-   struct LDKCVec_C2Tuple_TxidCOption_BlockHashZZZ (*get_relevant_txids)(const void *this_arg);
+   struct LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ (*get_relevant_txids)(const void *this_arg);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -16771,109 +22291,203 @@ typedef struct LDKConfirm {
 } LDKConfirm;
 
 /**
- * `Persist` defines behavior for persisting channel monitors: this could mean
- * writing once to disk, and/or uploading to one or more backup services.
- *
- * Each method can return three possible values:
- *  * If persistence (including any relevant `fsync()` calls) happens immediately, the
- *    implementation should return [`ChannelMonitorUpdateStatus::Completed`], indicating normal
- *    channel operation should continue.
- *  * If persistence happens asynchronously, implementations should first ensure the
- *    [`ChannelMonitor`] or [`ChannelMonitorUpdate`] are written durably to disk, and then return
- *    [`ChannelMonitorUpdateStatus::InProgress`] while the update continues in the background.
- *    Once the update completes, [`ChainMonitor::channel_monitor_updated`] should be called with
- *    the corresponding [`MonitorUpdateId`].
+ * A `enum` signalling to the [`OutputSweeper`] that it should delay spending an output until a
+ * future block height is reached.
+ */
+typedef enum LDKSpendingDelay_Tag {
+   /**
+    * A relative delay indicating we shouldn't spend the output before `cur_height + num_blocks`
+    * is reached.
+    */
+   LDKSpendingDelay_Relative,
+   /**
+    * An absolute delay indicating we shouldn't spend the output before `height` is reached.
+    */
+   LDKSpendingDelay_Absolute,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKSpendingDelay_Sentinel,
+} LDKSpendingDelay_Tag;
+
+typedef struct LDKSpendingDelay_LDKRelative_Body {
+   /**
+    * The number of blocks until we'll generate and broadcast the spending transaction.
+    */
+   uint32_t num_blocks;
+} LDKSpendingDelay_LDKRelative_Body;
+
+typedef struct LDKSpendingDelay_LDKAbsolute_Body {
+   /**
+    * The height at which we'll generate and broadcast the spending transaction.
+    */
+   uint32_t height;
+} LDKSpendingDelay_LDKAbsolute_Body;
+
+typedef struct MUST_USE_STRUCT LDKSpendingDelay {
+   LDKSpendingDelay_Tag tag;
+   union {
+      LDKSpendingDelay_LDKRelative_Body relative;
+      LDKSpendingDelay_LDKAbsolute_Body absolute;
+   };
+} LDKSpendingDelay;
+
+/**
+ * A callback which is called when a [`Future`] completes.
  *
- *    Note that unlike the direct [`chain::Watch`] interface,
- *    [`ChainMonitor::channel_monitor_updated`] must be called once for *each* update which occurs.
+ * Note that this MUST NOT call back into LDK directly, it must instead schedule actions to be
+ * taken later. Rust users should use the [`std::future::Future`] implementation for [`Future`]
+ * instead.
  *
- *  * If persistence fails for some reason, implementations should return
- *    [`ChannelMonitorUpdateStatus::PermanentFailure`], in which case the channel will likely be
- *    closed without broadcasting the latest state. See
- *    [`ChannelMonitorUpdateStatus::PermanentFailure`] for more details.
+ * Note that the [`std::future::Future`] implementation may only work for runtimes which schedule
+ * futures when they receive a wake, rather than immediately executing them.
  */
-typedef struct LDKPersist {
+typedef struct LDKFutureCallback {
    /**
     * An opaque pointer which is passed to your function implementations as an argument.
     * This has no meaning in the LDK, and can be NULL or any other value.
     */
    void *this_arg;
    /**
-    * Persist a new channel's data in response to a [`chain::Watch::watch_channel`] call. This is
-    * called by [`ChannelManager`] for new channels, or may be called directly, e.g. on startup.
-    *
-    * The data can be stored any way you want, but the identifier provided by LDK is the
-    * channel's outpoint (and it is up to you to maintain a correct mapping between the outpoint
-    * and the stored channel data). Note that you **must** persist every new monitor to disk.
-    *
-    * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-    * if you return [`ChannelMonitorUpdateStatus::InProgress`].
-    *
-    * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`
-    * and [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
-    *
-    * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
-    * [`Writeable::write`]: crate::util::ser::Writeable::write
-    */
-   enum LDKChannelMonitorUpdateStatus (*persist_new_channel)(const void *this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id);
-   /**
-    * Update one channel's data. The provided [`ChannelMonitor`] has already applied the given
-    * update.
-    *
-    * Note that on every update, you **must** persist either the [`ChannelMonitorUpdate`] or the
-    * updated monitor itself to disk/backups. See the [`Persist`] trait documentation for more
-    * details.
-    *
-    * During blockchain synchronization operations, this may be called with no
-    * [`ChannelMonitorUpdate`], in which case the full [`ChannelMonitor`] needs to be persisted.
-    * Note that after the full [`ChannelMonitor`] is persisted any previous
-    * [`ChannelMonitorUpdate`]s which were persisted should be discarded - they can no longer be
-    * applied to the persisted [`ChannelMonitor`] as they were already applied.
-    *
-    * If an implementer chooses to persist the updates only, they need to make
-    * sure that all the updates are applied to the `ChannelMonitors` *before*
-    * the set of channel monitors is given to the `ChannelManager`
-    * deserialization routine. See [`ChannelMonitor::update_monitor`] for
-    * applying a monitor update to a monitor. If full `ChannelMonitors` are
-    * persisted, then there is no need to persist individual updates.
-    *
-    * Note that there could be a performance tradeoff between persisting complete
-    * channel monitors on every update vs. persisting only updates and applying
-    * them in batches. The size of each monitor grows `O(number of state updates)`
-    * whereas updates are small and `O(1)`.
-    *
-    * The `update_id` is used to identify this call to [`ChainMonitor::channel_monitor_updated`],
-    * if you return [`ChannelMonitorUpdateStatus::InProgress`].
-    *
-    * See [`Writeable::write`] on [`ChannelMonitor`] for writing out a `ChannelMonitor`,
-    * [`Writeable::write`] on [`ChannelMonitorUpdate`] for writing out an update, and
-    * [`ChannelMonitorUpdateStatus`] for requirements when returning errors.
-    *
-    * [`Writeable::write`]: crate::util::ser::Writeable::write
-    *
-    * Note that update (or a relevant inner pointer) may be NULL or all-0s to represent None
+    * The method which is called.
     */
-   enum LDKChannelMonitorUpdateStatus (*update_persisted_channel)(const void *this_arg, struct LDKOutPoint channel_id, struct LDKChannelMonitorUpdate update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id);
+   void (*call)(const void *this_arg);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
     */
    void (*free)(void *this_arg);
-} LDKPersist;
+} LDKFutureCallback;
 
 
 
 /**
- * An implementation of [`chain::Watch`] for monitoring channels.
- *
- * Connected and disconnected blocks must be provided to `ChainMonitor` as documented by
- * [`chain::Watch`]. May be used in conjunction with [`ChannelManager`] to monitor channels locally
- * or used independently to monitor channels remotely. See the [module-level documentation] for
- * details.
- *
- * Note that `ChainMonitor` should regularly trigger rebroadcasts/fee bumps of pending claims from
- * a force-closed channel. This is crucial in preventing certain classes of pinning attacks,
- * detecting substantial mempool feerate changes between blocks, and ensuring reliability if
+ * A struct which can be used to select across many [`Future`]s at once without relying on a full
+ * async context.
+ */
+typedef struct MUST_USE_STRUCT LDKSleeper {
+   /**
+    * 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.
+    */
+   LDKnativeSleeper *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;
+} LDKSleeper;
+
+
+
+/**
+ * Configuration we set when applicable.
+ *
+ * Default::default() provides sane defaults.
+ */
+typedef struct MUST_USE_STRUCT LDKChannelHandshakeConfig {
+   /**
+    * 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.
+    */
+   LDKnativeChannelHandshakeConfig *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;
+} LDKChannelHandshakeConfig;
+
+
+
+/**
+ * Optional channel limits which are applied during channel creation.
+ *
+ * These limits are only applied to our counterparty's limits, not our own.
+ *
+ * Use 0/`<type>::max_value()` as appropriate to skip checking.
+ *
+ * Provides sane defaults for most configurations.
+ *
+ * Most additional limits are disabled except those with which specify a default in individual
+ * field documentation. Note that this may result in barely-usable channels, but since they
+ * are applied mostly only to incoming channels that's not much of a problem.
+ */
+typedef struct MUST_USE_STRUCT LDKChannelHandshakeLimits {
+   /**
+    * 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.
+    */
+   LDKnativeChannelHandshakeLimits *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;
+} LDKChannelHandshakeLimits;
+
+
+
+/**
+ * A parallel struct to [`ChannelConfig`] to define partial updates.
+ */
+typedef struct MUST_USE_STRUCT LDKChannelConfigUpdate {
+   /**
+    * 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.
+    */
+   LDKnativeChannelConfigUpdate *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;
+} LDKChannelConfigUpdate;
+
+
+
+/**
+ * Top-level config which holds ChannelHandshakeLimits and ChannelConfig.
+ *
+ * Default::default() provides sane defaults for most configurations
+ * (but currently with 0 relay fees!)
+ */
+typedef struct MUST_USE_STRUCT LDKUserConfig {
+   /**
+    * 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.
+    */
+   LDKnativeUserConfig *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;
+} LDKUserConfig;
+
+
+
+/**
+ * An implementation of [`chain::Watch`] for monitoring channels.
+ *
+ * Connected and disconnected blocks must be provided to `ChainMonitor` as documented by
+ * [`chain::Watch`]. May be used in conjunction with [`ChannelManager`] to monitor channels locally
+ * or used independently to monitor channels remotely. See the [module-level documentation] for
+ * details.
+ *
+ * Note that `ChainMonitor` should regularly trigger rebroadcasts/fee bumps of pending claims from
+ * a force-closed channel. This is crucial in preventing certain classes of pinning attacks,
+ * detecting substantial mempool feerate changes between blocks, and ensuring reliability if
  * broadcasting fails. We recommend invoking this every 30 seconds, or lower if running in an
  * environment with spotty connections, like on mobile.
  *
@@ -16979,6 +22593,53 @@ typedef struct LDKEventsProvider {
    void (*free)(void *this_arg);
 } LDKEventsProvider;
 
+/**
+ * This enum is used to specify which error data to send to peers when failing back an HTLC
+ * using [`ChannelManager::fail_htlc_backwards_with_reason`].
+ *
+ * For more info on failure codes, see <https://github.com/lightning/bolts/blob/master/04-onion-routing.md#failure-messages>.
+ */
+typedef enum LDKFailureCode_Tag {
+   /**
+    * We had a temporary error processing the payment. Useful if no other error codes fit
+    * and you want to indicate that the payer may want to retry.
+    */
+   LDKFailureCode_TemporaryNodeFailure,
+   /**
+    * We have a required feature which was not in this onion. For example, you may require
+    * some additional metadata that was not provided with this payment.
+    */
+   LDKFailureCode_RequiredNodeFeatureMissing,
+   /**
+    * You may wish to use this when a `payment_preimage` is unknown, or the CLTV expiry of
+    * the HTLC is too close to the current block height for safe handling.
+    * Using this failure code in [`ChannelManager::fail_htlc_backwards_with_reason`] is
+    * equivalent to calling [`ChannelManager::fail_htlc_backwards`].
+    */
+   LDKFailureCode_IncorrectOrUnknownPaymentDetails,
+   /**
+    * We failed to process the payload after the onion was decrypted. You may wish to
+    * use this when receiving custom HTLC TLVs with even type numbers that you don't recognize.
+    *
+    * If available, the tuple data may include the type number and byte offset in the
+    * decrypted byte stream where the failure occurred.
+    */
+   LDKFailureCode_InvalidOnionPayload,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKFailureCode_Sentinel,
+} LDKFailureCode_Tag;
+
+typedef struct MUST_USE_STRUCT LDKFailureCode {
+   LDKFailureCode_Tag tag;
+   union {
+      struct {
+         struct LDKCOption_C2Tuple_u64u16ZZ invalid_onion_payload;
+      };
+   };
+} LDKFailureCode;
+
 
 
 /**
@@ -17003,43 +22664,6 @@ typedef struct MUST_USE_STRUCT LDKChainParameters {
    bool is_owned;
 } LDKChainParameters;
 
-/**
- * Strategies available to retry payment path failures.
- */
-typedef enum LDKRetry_Tag {
-   /**
-    * Max number of attempts to retry payment.
-    *
-    * Each attempt may be multiple HTLCs along multiple paths if the router decides to split up a
-    * retry, and may retry multiple failed HTLCs at once if they failed around the same time and
-    * were retried along a route from a single call to [`Router::find_route_with_id`].
-    */
-   LDKRetry_Attempts,
-   /**
-    * Time elapsed before abandoning retries for a payment. At least one attempt at payment is made;
-    * see [`PaymentParameters::expiry_time`] to avoid any attempt at payment after a specific time.
-    *
-    * [`PaymentParameters::expiry_time`]: crate::routing::router::PaymentParameters::expiry_time
-    */
-   LDKRetry_Timeout,
-   /**
-    * Must be last for serialization purposes
-    */
-   LDKRetry_Sentinel,
-} LDKRetry_Tag;
-
-typedef struct MUST_USE_STRUCT LDKRetry {
-   LDKRetry_Tag tag;
-   union {
-      struct {
-         uintptr_t attempts;
-      };
-      struct {
-         uint64_t timeout;
-      };
-   };
-} LDKRetry;
-
 /**
  * A trait indicating an object may generate message send events
  */
@@ -17109,6 +22733,10 @@ typedef struct LDKChannelMessageHandler {
     * Handle an incoming `closing_signed` message from the given peer.
     */
    void (*handle_closing_signed)(const void *this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg);
+   /**
+    * Handle an incoming `stfu` message from the given peer.
+    */
+   void (*handle_stfu)(const void *this_arg, struct LDKPublicKey their_node_id, const struct LDKStfu *NONNULL_PTR msg);
    /**
     * Handle an incoming `tx_add_input message` from the given peer.
     */
@@ -17216,12 +22844,12 @@ typedef struct LDKChannelMessageHandler {
     */
    struct LDKInitFeatures (*provided_init_features)(const void *this_arg, struct LDKPublicKey their_node_id);
    /**
-    * Gets the genesis hashes for this `ChannelMessageHandler` indicating which chains it supports.
+    * Gets the chain hashes for this `ChannelMessageHandler` indicating which chains it supports.
     *
     * If it's `None`, then no particular network chain hash compatibility will be enforced when
     * connecting to peers.
     */
-   struct LDKCOption_CVec_ChainHashZZ (*get_genesis_hashes)(const void *this_arg);
+   struct LDKCOption_CVec_ThirtyTwoBytesZZ (*get_chain_hashes)(const void *this_arg);
    /**
     * Implementation of MessageSendEventsProvider for this object.
     */
@@ -17233,6 +22861,70 @@ typedef struct LDKChannelMessageHandler {
    void (*free)(void *this_arg);
 } LDKChannelMessageHandler;
 
+/**
+ * A handler for an [`OnionMessage`] containing a BOLT 12 Offers message as its payload.
+ *
+ * [`OnionMessage`]: crate::ln::msgs::OnionMessage
+ */
+typedef struct LDKOffersMessageHandler {
+   /**
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
+    */
+   void *this_arg;
+   /**
+    * Handles the given message by either responding with an [`Bolt12Invoice`], sending a payment,
+    * or replying with an error.
+    *
+    * The returned [`OffersMessage`], if any, is enqueued to be sent by [`OnionMessenger`].
+    *
+    * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+    */
+   struct LDKCOption_OffersMessageZ (*handle_message)(const void *this_arg, struct LDKOffersMessage message);
+   /**
+    * Releases any [`OffersMessage`]s that need to be sent.
+    *
+    * Typically, this is used for messages initiating a payment flow rather than in response to
+    * another message. The latter should use the return value of [`Self::handle_message`].
+    */
+   struct LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ (*release_pending_messages)(const void *this_arg);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKOffersMessageHandler;
+
+/**
+ * An interface for looking up the node id of a channel counterparty for the purpose of forwarding
+ * an [`OnionMessage`].
+ *
+ * [`OnionMessage`]: crate::ln::msgs::OnionMessage
+ */
+typedef struct LDKNodeIdLookUp {
+   /**
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
+    */
+   void *this_arg;
+   /**
+    * Returns the node id of the forwarding node's channel counterparty with `short_channel_id`.
+    *
+    * Here, the forwarding node is referring to the node of the [`OnionMessenger`] parameterized
+    * by the [`NodeIdLookUp`] and the counterparty to one of that node's peers.
+    *
+    * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
+    *
+    * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKPublicKey (*next_node_id)(const void *this_arg, uint64_t short_channel_id);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKNodeIdLookUp;
+
 
 
 /**
@@ -17307,15 +22999,69 @@ typedef struct MUST_USE_STRUCT LDKExpandedKey {
    bool is_owned;
 } LDKExpandedKey;
 
+
+
 /**
- * A 3-byte byte array.
+ * Contains fields that are both common to [`open_channel`] and `open_channel2` messages.
+ *
+ * [`open_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message
  */
-typedef struct LDKThreeBytes {
+typedef struct MUST_USE_STRUCT LDKCommonOpenChannelFields {
    /**
-    * The three bytes
+    * 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.
     */
-   uint8_t data[3];
-} LDKThreeBytes;
+   LDKnativeCommonOpenChannelFields *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;
+} LDKCommonOpenChannelFields;
+
+
+
+/**
+ * Contains fields that are both common to [`accept_channel`] and `accept_channel2` messages.
+ *
+ * [`accept_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-accept_channel-message
+ */
+typedef struct MUST_USE_STRUCT LDKCommonAcceptChannelFields {
+   /**
+    * 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.
+    */
+   LDKnativeCommonAcceptChannelFields *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;
+} LDKCommonAcceptChannelFields;
+
+
+
+/**
+ * Packet of hop data for next peer
+ */
+typedef struct MUST_USE_STRUCT LDKPacket {
+   /**
+    * 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.
+    */
+   LDKnativePacket *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;
+} LDKPacket;
 
 /**
  * A trait to describe an object which can receive routing messages.
@@ -17429,40 +23175,34 @@ typedef struct LDKRoutingMessageHandler {
 } LDKRoutingMessageHandler;
 
 /**
- * A trait indicating an object may generate onion messages to send
+ * A handler for received [`OnionMessage`]s and for providing generated ones to send.
  */
-typedef struct LDKOnionMessageProvider {
+typedef struct LDKOnionMessageHandler {
    /**
     * An opaque pointer which is passed to your function implementations as an argument.
     * This has no meaning in the LDK, and can be NULL or any other value.
     */
    void *this_arg;
    /**
-    * Gets the next pending onion message for the peer with the given node id.
+    * Because much of the lightning network does not yet support forwarding onion messages, we
+    * may need to directly connect to a node which will forward a message for us. In such a case,
+    * this method will return the set of nodes which need connection by node_id and the
+    * corresponding socket addresses where they may accept incoming connections.
     *
-    * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-    */
-   struct LDKOnionMessage (*next_onion_message_for_peer)(const void *this_arg, struct LDKPublicKey peer_node_id);
-   /**
-    * Frees any resources associated with this object given its this_arg pointer.
-    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
-    */
-   void (*free)(void *this_arg);
-} LDKOnionMessageProvider;
-
-/**
- * A trait to describe an object that can receive onion messages.
- */
-typedef struct LDKOnionMessageHandler {
-   /**
-    * An opaque pointer which is passed to your function implementations as an argument.
-    * This has no meaning in the LDK, and can be NULL or any other value.
+    * Thus, this method should be polled regularly to detect messages await such a direct
+    * connection.
     */
-   void *this_arg;
+   struct LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ (*get_and_clear_connections_needed)(const void *this_arg);
    /**
     * Handle an incoming `onion_message` message from the given peer.
     */
    void (*handle_onion_message)(const void *this_arg, struct LDKPublicKey peer_node_id, const struct LDKOnionMessage *NONNULL_PTR msg);
+   /**
+    * Returns the next pending onion message for the peer with the given node id.
+    *
+    * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKOnionMessage (*next_onion_message_for_peer)(const void *this_arg, struct LDKPublicKey peer_node_id);
    /**
     * Called when a connection is established with a peer. Can be used to track which peers
     * advertise onion message support and are online.
@@ -17477,6 +23217,11 @@ typedef struct LDKOnionMessageHandler {
     * drop and refuse to forward onion messages to this peer.
     */
    void (*peer_disconnected)(const void *this_arg, struct LDKPublicKey their_node_id);
+   /**
+    * Performs actions that should happen roughly every ten seconds after startup. Allows handlers
+    * to drop any buffered onion messages intended for prospective peers.
+    */
+   void (*timer_tick_occurred)(const void *this_arg);
    /**
     * Gets the node feature flags which this handler itself supports. All available handlers are
     * queried similarly and their feature flags are OR'd together to form the [`NodeFeatures`]
@@ -17491,10 +23236,6 @@ typedef struct LDKOnionMessageHandler {
     * Note that this method is called before [`Self::peer_connected`].
     */
    struct LDKInitFeatures (*provided_init_features)(const void *this_arg, struct LDKPublicKey their_node_id);
-   /**
-    * Implementation of OnionMessageProvider for this object.
-    */
-   struct LDKOnionMessageProvider OnionMessageProvider;
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -17502,6 +23243,26 @@ typedef struct LDKOnionMessageHandler {
    void (*free)(void *this_arg);
 } LDKOnionMessageHandler;
 
+
+
+/**
+ * BOLT 4 onion packet including hop data for the next peer.
+ */
+typedef struct MUST_USE_STRUCT LDKTrampolineOnionPacket {
+   /**
+    * 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.
+    */
+   LDKnativeTrampolineOnionPacket *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;
+} LDKTrampolineOnionPacket;
+
 /**
  * Trait to be implemented by custom message (unrelated to the channel/gossip LN layers)
  * decoders.
@@ -17602,29 +23363,6 @@ typedef struct MUST_USE_STRUCT LDKIgnoringMessageHandler {
    bool is_owned;
 } LDKIgnoringMessageHandler;
 
-/**
- * A handler for an [`OnionMessage`] containing a BOLT 12 Offers message as its payload.
- *
- * [`OnionMessage`]: crate::ln::msgs::OnionMessage
- */
-typedef struct LDKOffersMessageHandler {
-   /**
-    * An opaque pointer which is passed to your function implementations as an argument.
-    * This has no meaning in the LDK, and can be NULL or any other value.
-    */
-   void *this_arg;
-   /**
-    * Handles the given message by either responding with an [`Bolt12Invoice`], sending a payment,
-    * or replying with an error.
-    */
-   struct LDKCOption_OffersMessageZ (*handle_message)(const void *this_arg, struct LDKOffersMessage message);
-   /**
-    * Frees any resources associated with this object given its this_arg pointer.
-    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
-    */
-   void (*free)(void *this_arg);
-} LDKOffersMessageHandler;
-
 /**
  * Handler for custom onion messages. If you are using [`SimpleArcOnionMessenger`],
  * [`SimpleRefOnionMessenger`], or prefer to ignore inbound custom onion messages,
@@ -17645,13 +23383,22 @@ typedef struct LDKCustomOnionMessageHandler {
    void *this_arg;
    /**
     * Called with the custom message that was received, returning a response to send, if any.
+    *
+    * The returned [`Self::CustomMessage`], if any, is enqueued to be sent by [`OnionMessenger`].
     */
-   struct LDKCOption_CustomOnionMessageContentsZ (*handle_custom_message)(const void *this_arg, struct LDKCustomOnionMessageContents msg);
+   struct LDKCOption_OnionMessageContentsZ (*handle_custom_message)(const void *this_arg, struct LDKOnionMessageContents msg);
    /**
     * Read a custom message of type `message_type` from `buffer`, returning `Ok(None)` if the
     * message type is unknown.
     */
-   struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ (*read_custom_message)(const void *this_arg, uint64_t message_type, struct LDKu8slice buffer);
+   struct LDKCResult_COption_OnionMessageContentsZDecodeErrorZ (*read_custom_message)(const void *this_arg, uint64_t message_type, struct LDKu8slice buffer);
+   /**
+    * Releases any [`Self::CustomMessage`]s that need to be sent.
+    *
+    * Typically, this is used for messages initiating a message flow rather than in response to
+    * another message. The latter should use the return value of [`Self::handle_custom_message`].
+    */
+   struct LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ (*release_pending_custom_messages)(const void *this_arg);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -17871,116 +23618,153 @@ typedef struct MUST_USE_STRUCT LDKInvoiceRequestFeatures {
    bool is_owned;
 } LDKInvoiceRequestFeatures;
 
-/**
- * Integer in the range `0..=16`
- */
-typedef struct LDKWitnessVersion {
-   uint8_t _0;
-} LDKWitnessVersion;
-
 
 
 /**
- * A semantically valid [`Bolt12Invoice`] that hasn't been signed.
+ * Builds an [`Offer`] for the \"offer to be paid\" flow.
+ *
+ * See [module-level documentation] for usage.
+ *
+ * [module-level documentation]: self
  */
-typedef struct MUST_USE_STRUCT LDKUnsignedBolt12Invoice {
+typedef struct MUST_USE_STRUCT LDKOfferWithExplicitMetadataBuilder {
    /**
     * 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.
     */
-   LDKnativeUnsignedBolt12Invoice *inner;
+   LDKnativeOfferWithExplicitMetadataBuilder *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;
-} LDKUnsignedBolt12Invoice;
-
+} LDKOfferWithExplicitMetadataBuilder;
 
+/**
+ * Represents a tweaked X-only public key as required for BIP 340 (Taproot).
+ */
+typedef struct LDKTweakedPublicKey {
+   /**
+    * The bytes of the public key X coordinate
+    */
+   uint8_t x_coordinate[32];
+} LDKTweakedPublicKey;
 
 /**
- * The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error.
- *
- * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
- * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * A function for signing an [`UnsignedBolt12Invoice`].
  */
-typedef struct MUST_USE_STRUCT LDKErroneousField {
+typedef struct LDKSignBolt12InvoiceFn {
    /**
-    * 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.
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
     */
-   LDKnativeErroneousField *inner;
+   void *this_arg;
    /**
-    * 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.
+    * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
     */
-   bool is_owned;
-} LDKErroneousField;
+   struct LDKCResult_SchnorrSignatureNoneZ (*sign_invoice)(const void *this_arg, const struct LDKUnsignedBolt12Invoice *NONNULL_PTR message);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKSignBolt12InvoiceFn;
 
 
 
 /**
- * A semantically valid [`InvoiceRequest`] that hasn't been signed.
+ * A hash for use in a specific context by tweaking with a context-dependent tag as per [BIP 340]
+ * and computed over the merkle root of a TLV stream to sign as defined in [BOLT 12].
+ *
+ * [BIP 340]: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
+ * [BOLT 12]: https://github.com/rustyrussell/lightning-rfc/blob/guilt/offers/12-offer-encoding.md#signature-calculation
  */
-typedef struct MUST_USE_STRUCT LDKUnsignedInvoiceRequest {
+typedef struct MUST_USE_STRUCT LDKTaggedHash {
    /**
     * 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.
     */
-   LDKnativeUnsignedInvoiceRequest *inner;
+   LDKnativeTaggedHash *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;
-} LDKUnsignedInvoiceRequest;
+} LDKTaggedHash;
 
 
 
 /**
- * The minimum amount required for an item in an [`Offer`], denominated in either bitcoin or
- * another currency.
+ * The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
  */
-typedef struct MUST_USE_STRUCT LDKAmount {
+typedef struct MUST_USE_STRUCT LDKErroneousField {
    /**
     * 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.
     */
-   LDKnativeAmount *inner;
+   LDKnativeErroneousField *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;
-} LDKAmount;
-
+} LDKErroneousField;
 
+/**
+ * A function for signing an [`UnsignedInvoiceRequest`].
+ */
+typedef struct LDKSignInvoiceRequestFn {
+   /**
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
+    */
+   void *this_arg;
+   /**
+    * Signs a [`TaggedHash`] computed over the merkle root of `message`'s TLV stream.
+    */
+   struct LDKCResult_SchnorrSignatureNoneZ (*sign_invoice_request)(const void *this_arg, const struct LDKUnsignedInvoiceRequest *NONNULL_PTR message);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKSignInvoiceRequestFn;
 
 /**
- * Quantity of items supported by an [`Offer`].
+ * Error when signing messages.
  */
-typedef struct MUST_USE_STRUCT LDKQuantity {
+typedef enum LDKSignError_Tag {
    /**
-    * 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.
+    * User-defined error when signing the message.
     */
-   LDKnativeQuantity *inner;
+   LDKSignError_Signing,
    /**
-    * 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.
+    * Error when verifying the produced signature using the given pubkey.
     */
-   bool is_owned;
-} LDKQuantity;
+   LDKSignError_Verification,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKSignError_Sentinel,
+} LDKSignError_Tag;
+
+typedef struct MUST_USE_STRUCT LDKSignError {
+   LDKSignError_Tag tag;
+   union {
+      struct {
+         enum LDKSecp256k1Error verification;
+      };
+   };
+} LDKSignError;
 
 
 
@@ -18153,12 +23937,12 @@ typedef struct MUST_USE_STRUCT LDKDefaultRouter {
 
 
 /**
- * [`Score`] implementation that factors in in-flight HTLC liquidity.
+ * [`ScoreLookUp`] implementation that factors in in-flight HTLC liquidity.
  *
- * Useful for custom [`Router`] implementations to wrap their [`Score`] on-the-fly when calling
+ * Useful for custom [`Router`] implementations to wrap their [`ScoreLookUp`] on-the-fly when calling
  * [`find_route`].
  *
- * [`Score`]: crate::routing::scoring::Score
+ * [`ScoreLookUp`]: crate::routing::scoring::ScoreLookUp
  */
 typedef struct MUST_USE_STRUCT LDKScorerAccountingForInFlightHtlcs {
    /**
@@ -18246,6 +24030,39 @@ typedef struct MUST_USE_STRUCT LDKPayee {
    };
 } LDKPayee;
 
+/**
+ * A trait which can both lookup and update routing channel penalty scores.
+ *
+ * This is used in places where both bounds are required and implemented for all types which
+ * implement [`ScoreLookUp`] and [`ScoreUpdate`].
+ *
+ * Bindings users may need to manually implement this for their custom scoring implementations.
+ */
+typedef struct LDKScore {
+   /**
+    * An opaque pointer which is passed to your function implementations as an argument.
+    * This has no meaning in the LDK, and can be NULL or any other value.
+    */
+   void *this_arg;
+   /**
+    * Implementation of ScoreLookUp for this object.
+    */
+   struct LDKScoreLookUp ScoreLookUp;
+   /**
+    * Implementation of ScoreUpdate for this object.
+    */
+   struct LDKScoreUpdate ScoreUpdate;
+   /**
+    * Serialize the object into a byte array
+    */
+   struct LDKCVec_u8Z (*write)(const void *this_arg);
+   /**
+    * Frees any resources associated with this object given its this_arg pointer.
+    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    */
+   void (*free)(void *this_arg);
+} LDKScore;
+
 
 
 /**
@@ -18271,20 +24088,40 @@ typedef struct MUST_USE_STRUCT LDKMultiThreadedLockableScore {
 /**
  * A locked `MultiThreadedLockableScore`.
  */
-typedef struct MUST_USE_STRUCT LDKMultiThreadedScoreLock {
+typedef struct MUST_USE_STRUCT LDKMultiThreadedScoreLockRead {
+   /**
+    * 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.
+    */
+   LDKnativeMultiThreadedScoreLockRead *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;
+} LDKMultiThreadedScoreLockRead;
+
+
+
+/**
+ * A locked `MultiThreadedLockableScore`.
+ */
+typedef struct MUST_USE_STRUCT LDKMultiThreadedScoreLockWrite {
    /**
     * 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.
     */
-   LDKnativeMultiThreadedScoreLock *inner;
+   LDKnativeMultiThreadedScoreLockWrite *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;
-} LDKMultiThreadedScoreLock;
+} LDKMultiThreadedScoreLockWrite;
 
 
 
@@ -18376,111 +24213,105 @@ typedef struct MUST_USE_STRUCT LDKPhantomKeysManager {
    bool is_owned;
 } LDKPhantomKeysManager;
 
-/**
- * The destination of an onion message.
- */
-typedef enum LDKDestination_Tag {
-   /**
-    * We're sending this onion message to a node.
-    */
-   LDKDestination_Node,
-   /**
-    * We're sending this onion message to a blinded path.
-    */
-   LDKDestination_BlindedPath,
-   /**
-    * Must be last for serialization purposes
-    */
-   LDKDestination_Sentinel,
-} LDKDestination_Tag;
 
-typedef struct MUST_USE_STRUCT LDKDestination {
-   LDKDestination_Tag tag;
-   union {
-      struct {
-         struct LDKPublicKey node;
-      };
-      struct {
-         struct LDKBlindedPath blinded_path;
-      };
-   };
-} LDKDestination;
 
 /**
- * A trait defining behavior for routing an [`OnionMessage`].
- *
- * [`OnionMessage`]: msgs::OnionMessage
+ * An implementation of [`EntropySource`] using ChaCha20.
  */
-typedef struct LDKMessageRouter {
+typedef struct MUST_USE_STRUCT LDKRandomBytes {
    /**
-    * An opaque pointer which is passed to your function implementations as an argument.
-    * This has no meaning in the LDK, and can be NULL or any other value.
-    */
-   void *this_arg;
-   /**
-    * Returns a route for sending an [`OnionMessage`] to the given [`Destination`].
-    *
-    * [`OnionMessage`]: msgs::OnionMessage
+    * 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.
     */
-   struct LDKCResult_OnionMessagePathNoneZ (*find_path)(const void *this_arg, struct LDKPublicKey sender, struct LDKCVec_PublicKeyZ peers, struct LDKDestination destination);
+   LDKnativeRandomBytes *inner;
    /**
-    * Frees any resources associated with this object given its this_arg pointer.
-    * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
+    * 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.
     */
-   void (*free)(void *this_arg);
-} LDKMessageRouter;
+   bool is_owned;
+} LDKRandomBytes;
 
 
 
 /**
- * A sender, receiver and forwarder of onion messages. In upcoming releases, this object will be
- * used to retrieve invoices and fulfill invoice requests from [offers]. Currently, only sending
- * and receiving custom onion messages is supported.
+ * A sender, receiver and forwarder of [`OnionMessage`]s.
+ *
+ * # Handling Messages
+ *
+ * `OnionMessenger` implements [`OnionMessageHandler`], making it responsible for either forwarding
+ * messages to peers or delegating to the appropriate handler for the message type. Currently, the
+ * available handlers are:
+ * * [`OffersMessageHandler`], for responding to [`InvoiceRequest`]s and paying [`Bolt12Invoice`]s
+ * * [`CustomOnionMessageHandler`], for handling user-defined message types
+ *
+ * # Sending Messages
+ *
+ * [`OnionMessage`]s are sent initially using [`OnionMessenger::send_onion_message`]. When handling
+ * a message, the matched handler may return a response message which `OnionMessenger` will send
+ * on its behalf.
  *
  * # Example
  *
  * ```
  * # extern crate bitcoin;
  * # use bitcoin::hashes::_export::_core::time::Duration;
- * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
- * # use lightning::blinded_path::BlindedPath;
- * # use lightning::sign::KeysManager;
+ * # use bitcoin::hashes::hex::FromHex;
+ * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey, self};
+ * # use lightning::blinded_path::{BlindedPath, EmptyNodeIdLookUp};
+ * # use lightning::sign::{EntropySource, KeysManager};
  * # use lightning::ln::peer_handler::IgnoringMessageHandler;
- * # use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessenger, OnionMessagePath};
- * # use lightning::onion_message::packet::{CustomOnionMessageContents, OnionMessageContents};
+ * # use lightning::onion_message::messenger::{Destination, MessageRouter, OnionMessagePath, OnionMessenger};
+ * # use lightning::onion_message::packet::OnionMessageContents;
  * # use lightning::util::logger::{Logger, Record};
  * # use lightning::util::ser::{Writeable, Writer};
  * # use lightning::io;
  * # use std::sync::Arc;
  * # struct FakeLogger;
  * # impl Logger for FakeLogger {
- * #     fn log(&self, record: &Record) { unimplemented!() }
+ * #     fn log(&self, record: Record) { println!(\"{:?}\" , record); }
  * # }
  * # struct FakeMessageRouter {}
  * # impl MessageRouter for FakeMessageRouter {
  * #     fn find_path(&self, sender: PublicKey, peers: Vec<PublicKey>, destination: Destination) -> Result<OnionMessagePath, ()> {
- * #         unimplemented!()
+ * #         let secp_ctx = Secp256k1::new();
+ * #         let node_secret = SecretKey::from_slice(&<Vec<u8>>::from_hex(\"0101010101010101010101010101010101010101010101010101010101010101\").unwrap()[..]).unwrap();
+ * #         let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret);
+ * #         let hop_node_id2 = hop_node_id1;
+ * #         Ok(OnionMessagePath {
+ * #             intermediate_nodes: vec![hop_node_id1, hop_node_id2],
+ * #             destination,
+ * #             first_node_addresses: None,
+ * #         })
+ * #     }
+ * #     fn create_blinded_paths<T: secp256k1::Signing + secp256k1::Verification>(
+ * #         &self, _recipient: PublicKey, _peers: Vec<PublicKey>, _secp_ctx: &Secp256k1<T>
+ * #     ) -> Result<Vec<BlindedPath>, ()> {
+ * #         unreachable!()
  * #     }
  * # }
  * # let seed = [42u8; 32];
  * # let time = Duration::from_secs(123456);
  * # let keys_manager = KeysManager::new(&seed, time.as_secs(), time.subsec_nanos());
  * # let logger = Arc::new(FakeLogger {});
- * # let node_secret = SecretKey::from_slice(&hex::decode(\"0101010101010101010101010101010101010101010101010101010101010101\").unwrap()[..]).unwrap();
+ * # let node_secret = SecretKey::from_slice(&<Vec<u8>>::from_hex(\"0101010101010101010101010101010101010101010101010101010101010101\").unwrap()[..]).unwrap();
  * # let secp_ctx = Secp256k1::new();
  * # let hop_node_id1 = PublicKey::from_secret_key(&secp_ctx, &node_secret);
- * # let (hop_node_id2, hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1, hop_node_id1);
+ * # let (hop_node_id3, hop_node_id4) = (hop_node_id1, hop_node_id1);
  * # let destination_node_id = hop_node_id1;
+ * # let node_id_lookup = EmptyNodeIdLookUp {};
  * # let message_router = Arc::new(FakeMessageRouter {});
  * # let custom_message_handler = IgnoringMessageHandler {};
  * # let offers_message_handler = IgnoringMessageHandler {};
  * // Create the onion messenger. This must use the same `keys_manager` as is passed to your
  * // ChannelManager.
  * let onion_messenger = OnionMessenger::new(
- *     &keys_manager, &keys_manager, logger, message_router, &offers_message_handler,
- *     &custom_message_handler
+ *     &keys_manager, &keys_manager, logger, &node_id_lookup, message_router,
+ *     &offers_message_handler, &custom_message_handler
  * );
  *
+ * # #[derive(Debug, Clone)]
  * # struct YourCustomMessage {}
  * impl Writeable for YourCustomMessage {
  * \tfn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
@@ -18488,21 +24319,17 @@ typedef struct LDKMessageRouter {
  * \t\t// Write your custom onion message to `w`
  * \t}
  * }
- * impl CustomOnionMessageContents for YourCustomMessage {
+ * impl OnionMessageContents for YourCustomMessage {
  * \tfn tlv_type(&self) -> u64 {
  * \t\t# let your_custom_message_type = 42;
  * \t\tyour_custom_message_type
  * \t}
  * }
  * // Send a custom onion message to a node id.
- * let path = OnionMessagePath {
- * \tintermediate_nodes: vec![hop_node_id1, hop_node_id2],
- * \tdestination: Destination::Node(destination_node_id),
- * };
+ * let destination = Destination::Node(destination_node_id);
  * let reply_path = None;
- * # let your_custom_message = YourCustomMessage {};
- * let message = OnionMessageContents::Custom(your_custom_message);
- * onion_messenger.send_onion_message(path, message, reply_path);
+ * # let message = YourCustomMessage {};
+ * onion_messenger.send_onion_message(message, destination, reply_path);
  *
  * // Create a blinded path to yourself, for someone to send an onion message to.
  * # let your_node_id = hop_node_id1;
@@ -18510,18 +24337,14 @@ typedef struct LDKMessageRouter {
  * let blinded_path = BlindedPath::new_for_message(&hops, &keys_manager, &secp_ctx).unwrap();
  *
  * // Send a custom onion message to a blinded path.
- * let path = OnionMessagePath {
- * \tintermediate_nodes: vec![hop_node_id1, hop_node_id2],
- * \tdestination: Destination::BlindedPath(blinded_path),
- * };
+ * let destination = Destination::BlindedPath(blinded_path);
  * let reply_path = None;
- * # let your_custom_message = YourCustomMessage {};
- * let message = OnionMessageContents::Custom(your_custom_message);
- * onion_messenger.send_onion_message(path, message, reply_path);
+ * # let message = YourCustomMessage {};
+ * onion_messenger.send_onion_message(message, destination, reply_path);
  * ```
  *
- * [offers]: <https://github.com/lightning/bolts/pull/798>
- * [`OnionMessenger`]: crate::onion_message::OnionMessenger
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
  */
 typedef struct MUST_USE_STRUCT LDKOnionMessenger {
    /**
@@ -18541,7 +24364,7 @@ typedef struct MUST_USE_STRUCT LDKOnionMessenger {
 
 
 /**
- * A [`MessageRouter`] that always fails.
+ * A [`MessageRouter`] that can only route to a directly connected [`Destination`].
  */
 typedef struct MUST_USE_STRUCT LDKDefaultMessageRouter {
    /**
@@ -18559,55 +24382,78 @@ typedef struct MUST_USE_STRUCT LDKDefaultMessageRouter {
 } LDKDefaultMessageRouter;
 
 /**
- * The contents of an onion message. In the context of offers, this would be the invoice, invoice
- * request, or invoice error.
+ * The unblinded node in a [`BlindedPath`].
  */
-typedef enum LDKOnionMessageContents_Tag {
+typedef enum LDKIntroductionNode_Tag {
    /**
-    * A message related to BOLT 12 Offers.
+    * The node id of the introduction node.
     */
-   LDKOnionMessageContents_Offers,
+   LDKIntroductionNode_NodeId,
    /**
-    * A custom onion message specified by the user.
+    * The short channel id of the channel leading to the introduction node. The [`Direction`]
+    * identifies which side of the channel is the introduction node.
     */
-   LDKOnionMessageContents_Custom,
+   LDKIntroductionNode_DirectedShortChannelId,
    /**
     * Must be last for serialization purposes
     */
-   LDKOnionMessageContents_Sentinel,
-} LDKOnionMessageContents_Tag;
+   LDKIntroductionNode_Sentinel,
+} LDKIntroductionNode_Tag;
 
-typedef struct MUST_USE_STRUCT LDKOnionMessageContents {
-   LDKOnionMessageContents_Tag tag;
+typedef struct LDKIntroductionNode_LDKDirectedShortChannelId_Body {
+   enum LDKDirection _0;
+   uint64_t _1;
+} LDKIntroductionNode_LDKDirectedShortChannelId_Body;
+
+typedef struct MUST_USE_STRUCT LDKIntroductionNode {
+   LDKIntroductionNode_Tag tag;
    union {
       struct {
-         struct LDKOffersMessage offers;
-      };
-      struct {
-         struct LDKCustomOnionMessageContents custom;
+         struct LDKPublicKey node_id;
       };
+      LDKIntroductionNode_LDKDirectedShortChannelId_Body directed_short_channel_id;
    };
-} LDKOnionMessageContents;
+} LDKIntroductionNode;
 
 
 
 /**
- * The parameters required to derive a channel signer via [`SignerProvider`].
+ * A [`NodeIdLookUp`] that always returns `None`.
  */
-typedef struct MUST_USE_STRUCT LDKChannelDerivationParameters {
+typedef struct MUST_USE_STRUCT LDKEmptyNodeIdLookUp {
    /**
     * 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.
     */
-   LDKnativeChannelDerivationParameters *inner;
+   LDKnativeEmptyNodeIdLookUp *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;
-} LDKChannelDerivationParameters;
+} LDKEmptyNodeIdLookUp;
+
+
+
+/**
+ * Data to construct a [`BlindedHop`] for forwarding a payment.
+ */
+typedef struct MUST_USE_STRUCT LDKForwardTlvs {
+   /**
+    * 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.
+    */
+   LDKnativeForwardTlvs *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;
+} LDKForwardTlvs;
 
 /**
  * An abstraction over a bitcoin wallet that can perform coin selection over a set of UTXOs and can
@@ -18653,8 +24499,11 @@ typedef struct LDKCoinSelectionSource {
    /**
     * Signs and provides the full witness for all inputs within the transaction known to the
     * trait (i.e., any provided via [`CoinSelectionSource::select_confirmed_utxos`]).
+    *
+    * If your wallet does not support signing PSBTs you can call `psbt.extract_tx()` to get the
+    * unsigned transaction and then sign it with your wallet.
     */
-   struct LDKCResult_TransactionNoneZ (*sign_tx)(const void *this_arg, struct LDKTransaction tx);
+   struct LDKCResult_TransactionNoneZ (*sign_psbt)(const void *this_arg, struct LDKCVec_u8Z psbt);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -18680,13 +24529,16 @@ typedef struct LDKWalletSource {
     * Returns a script to use for change above dust resulting from a successful coin selection
     * attempt.
     */
-   struct LDKCResult_ScriptNoneZ (*get_change_script)(const void *this_arg);
+   struct LDKCResult_CVec_u8ZNoneZ (*get_change_script)(const void *this_arg);
    /**
     * Signs and provides the full [`TxIn::script_sig`] and [`TxIn::witness`] for all inputs within
     * the transaction known to the wallet (i.e., any provided via
     * [`WalletSource::list_confirmed_utxos`]).
+    *
+    * If your wallet does not support signing PSBTs you can call `psbt.extract_tx()` to get the
+    * unsigned transaction and then sign it with your wallet.
     */
-   struct LDKCResult_TransactionNoneZ (*sign_tx)(const void *this_arg, struct LDKTransaction tx);
+   struct LDKCResult_TransactionNoneZ (*sign_psbt)(const void *this_arg, struct LDKCVec_u8Z psbt);
    /**
     * Frees any resources associated with this object given its this_arg pointer.
     * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
@@ -18743,33 +24595,22 @@ typedef struct MUST_USE_STRUCT LDKBumpTransactionEventHandler {
 
 
 /**
- * FilesystemPersister persists channel data on disk, where each channel's
- * data is stored in a file named after its funding outpoint.
- *
- * Warning: this module does the best it can with calls to persist data, but it
- * can only guarantee that the data is passed to the drive. It is up to the
- * drive manufacturers to do the actual persistence properly, which they often
- * don't (especially on consumer-grade hardware). Therefore, it is up to the
- * user to validate their entire storage stack, to ensure the writes are
- * persistent.
- * Corollary: especially when dealing with larger amounts of money, it is best
- * practice to have multiple channel data backups and not rely only on one
- * FilesystemPersister.
+ * A [`KVStore`] implementation that writes to and reads from the file system.
  */
-typedef struct MUST_USE_STRUCT LDKFilesystemPersister {
+typedef struct MUST_USE_STRUCT LDKFilesystemStore {
    /**
     * 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.
     */
-   LDKnativeFilesystemPersister *inner;
+   LDKnativeFilesystemStore *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;
-} LDKFilesystemPersister;
+} LDKFilesystemStore;
 
 
 
@@ -18796,6 +24637,8 @@ typedef struct MUST_USE_STRUCT LDKFilesystemPersister {
  * However, as long as [`ChannelMonitor`] backups are sound, no funds besides those used for
  * unilateral chain closure fees are at risk.
  *
+ * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
+ * [`ChannelManager::timer_tick_occurred`]: lightning::ln::channelmanager::ChannelManager::timer_tick_occurred
  * [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor
  * [`Event`]: lightning::events::Event
  * [`PeerManager::timer_tick_occurred`]: lightning::ln::peer_handler::PeerManager::timer_tick_occurred
@@ -19005,6 +24848,14 @@ typedef struct MUST_USE_STRUCT LDKFallback {
 
 extern const uintptr_t MAX_BUF_SIZE;
 
+extern const uintptr_t KVSTORE_NAMESPACE_KEY_MAX_LEN;
+
+extern const uint64_t MAX_SCID_BLOCK;
+
+extern const uint64_t MAX_SCID_TX_INDEX;
+
+extern const uint64_t MAX_SCID_VOUT_INDEX;
+
 extern const uint64_t MIN_RELAY_FEE_SAT_PER_1000_WEIGHT;
 
 extern const uint32_t FEERATE_FLOOR_SATS_PER_KW;
@@ -19035,6 +24886,8 @@ extern const uint64_t HTLC_SUCCESS_INPUT_ANCHOR_WITNESS_WEIGHT;
 
 extern const uintptr_t REVOKEABLE_REDEEMSCRIPT_MAX_LENGTH;
 
+extern const uintptr_t PAYER_NOTE_LIMIT;
+
 extern const uint64_t UNKNOWN_CHANNEL_CAPACITY_MSAT;
 
 extern const uint32_t DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA;
@@ -19083,11 +24936,44 @@ struct LDKSixteenBytes U128_le_bytes(struct LDKU128 val);
  */
 struct LDKU128 U128_new(struct LDKSixteenBytes le_bytes);
 
+/**
+ * Constructs a new WitnessProgram given a version and program bytes.
+ *
+ * The program MUST be at least 2 bytes and no longer than 40 bytes long.
+ * Further, if the version is 0, the program MUST be either exactly 20 or exactly 32 bytes long.
+ */
+struct LDKWitnessProgram WitnessProgram_new(struct LDKWitnessVersion version, struct LDKCVec_u8Z program);
+
+/**
+ * Gets the `WitnessVersion` of the given `WitnessProgram`
+ */
+struct LDKWitnessVersion WitnessProgram_get_version(const struct LDKWitnessProgram *NONNULL_PTR prog);
+
+/**
+ * Gets the witness program bytes of the given `WitnessProgram`
+ */
+struct LDKu8slice WitnessProgram_get_program(const struct LDKWitnessProgram *NONNULL_PTR prog);
+
+/**
+ * Creates a new WitnessProgram which has the same data as `orig`
+ */
+struct LDKWitnessProgram WitnessProgram_clone(const struct LDKWitnessProgram *NONNULL_PTR orig);
+
+/**
+ * Releases any memory held by the given `WitnessProgram` (which is currently none)
+ */
+void WitnessProgram_free(struct LDKWitnessProgram o);
+
 /**
  * Convenience function for constructing a new BigEndianScalar
  */
 struct LDKBigEndianScalar BigEndianScalar_new(struct LDKThirtyTwoBytes big_endian_bytes);
 
+/**
+ * Creates a new BigEndianScalar which has the same data as `orig`
+ */
+struct LDKBigEndianScalar BigEndianScalar_clone(const struct LDKBigEndianScalar *NONNULL_PTR orig);
+
 /**
  * Creates a new Bech32Error which has the same data as `orig`
  */
@@ -19114,20 +25000,55 @@ struct LDKWitness Witness_clone(const struct LDKWitness *NONNULL_PTR orig);
 void Witness_free(struct LDKWitness _res);
 
 /**
- * Frees the witness and script_sig in a TxIn
+ * Convenience function for constructing a new TxIn
  */
-void TxIn_free(struct LDKTxIn _res);
+struct LDKTxIn TxIn_new(struct LDKWitness witness, struct LDKCVec_u8Z script_sig, uint32_t sequence, struct LDKThirtyTwoBytes previous_txid, uint32_t previous_vout);
 
 /**
- * Convenience function for constructing a new TxIn
+ * Gets the `witness` in the given `TxIn`.
  */
-struct LDKTxIn TxIn_new(struct LDKWitness witness, struct LDKCVec_u8Z script_sig, uint32_t sequence, struct LDKThirtyTwoBytes previous_txid, uint32_t previous_vout);
+struct LDKWitness TxIn_get_witness(const struct LDKTxIn *NONNULL_PTR txin);
+
+/**
+ * Gets the `script_sig` in the given `TxIn`.
+ */
+struct LDKu8slice TxIn_get_script_sig(const struct LDKTxIn *NONNULL_PTR txin);
+
+/**
+ * Gets the `sequence` in the given `TxIn`.
+ */
+uint32_t TxIn_get_sequence(const struct LDKTxIn *NONNULL_PTR txin);
+
+/**
+ * Gets the previous outpoint txid in the given `TxIn`.
+ */
+struct LDKThirtyTwoBytes TxIn_get_previous_txid(const struct LDKTxIn *NONNULL_PTR txin);
+
+/**
+ * Gets the previout outpoint index in the given `TxIn`.
+ */
+uint32_t TxIn_get_previous_vout(const struct LDKTxIn *NONNULL_PTR txin);
+
+/**
+ * Frees the witness and script_sig in a TxIn
+ */
+void TxIn_free(struct LDKTxIn _res);
 
 /**
  * Convenience function for constructing a new TxOut
  */
 struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
 
+/**
+ * Gets the `script_pubkey` in the given `TxOut`.
+ */
+struct LDKu8slice TxOut_get_script_pubkey(const struct LDKTxOut *NONNULL_PTR txout);
+
+/**
+ * Gets the value in the given `TxOut`.
+ */
+uint64_t TxOut_get_value(const struct LDKTxOut *NONNULL_PTR txout);
+
 /**
  * Frees the data pointed to by script_pubkey.
  */
@@ -19152,30 +25073,61 @@ const void *__unmangle_inner_ptr(const void *ptr);
 #endif
 
 /**
- * Constructs a new COption_DurationZ containing a u64
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+
+/**
+ * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state.
  */
-struct LDKCOption_DurationZ COption_DurationZ_some(uint64_t o);
+struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKRefundMaybeWithDerivedMetadataBuilder o);
 
 /**
- * Constructs a new COption_DurationZ containing nothing
+ * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state.
  */
-struct LDKCOption_DurationZ COption_DurationZ_none(void);
+struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
 
 /**
- * Frees any resources associated with the u64, if we are in the Some state
+ * Checks if the given object is currently in the success state
  */
-void COption_DurationZ_free(struct LDKCOption_DurationZ _res);
+bool CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
 
 /**
- * Creates a new COption_DurationZ which has the same data as `orig`
+ * Frees any resources used by the CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ.
+ */
+void CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ _res);
+
+/**
+ * Creates a new CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_DurationZ COption_DurationZ_clone(const struct LDKCOption_DurationZ *NONNULL_PTR orig);
+struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Creates a new CResult_RefundBolt12SemanticErrorZ in the success state.
  */
-void CVec_BlindedPathZ_free(struct LDKCVec_BlindedPathZ _res);
+struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_ok(struct LDKRefund o);
+
+/**
+ * Creates a new CResult_RefundBolt12SemanticErrorZ in the error state.
+ */
+struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_RefundBolt12SemanticErrorZ_is_ok(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_RefundBolt12SemanticErrorZ.
+ */
+void CResult_RefundBolt12SemanticErrorZ_free(struct LDKCResult_RefundBolt12SemanticErrorZ _res);
+
+/**
+ * Creates a new CResult_RefundBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_RefundBolt12SemanticErrorZ CResult_RefundBolt12SemanticErrorZ_clone(const struct LDKCResult_RefundBolt12SemanticErrorZ *NONNULL_PTR orig);
 
 /**
  * Constructs a new COption_u64Z containing a u64
@@ -19198,6 +25150,11 @@ void COption_u64Z_free(struct LDKCOption_u64Z _res);
  */
 struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
 
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_BlindedPathZ_free(struct LDKCVec_BlindedPathZ _res);
+
 /**
  * Creates a new CResult_RefundBolt12ParseErrorZ in the success state.
  */
@@ -19224,6 +25181,32 @@ void CResult_RefundBolt12ParseErrorZ_free(struct LDKCResult_RefundBolt12ParseErr
  */
 struct LDKCResult_RefundBolt12ParseErrorZ CResult_RefundBolt12ParseErrorZ_clone(const struct LDKCResult_RefundBolt12ParseErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_RetryDecodeErrorZ in the success state.
+ */
+struct LDKCResult_RetryDecodeErrorZ CResult_RetryDecodeErrorZ_ok(struct LDKRetry o);
+
+/**
+ * Creates a new CResult_RetryDecodeErrorZ in the error state.
+ */
+struct LDKCResult_RetryDecodeErrorZ CResult_RetryDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_RetryDecodeErrorZ_is_ok(const struct LDKCResult_RetryDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_RetryDecodeErrorZ.
+ */
+void CResult_RetryDecodeErrorZ_free(struct LDKCResult_RetryDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_RetryDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_RetryDecodeErrorZ CResult_RetryDecodeErrorZ_clone(const struct LDKCResult_RetryDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_NoneAPIErrorZ in the success state.
  */
@@ -19261,30 +25244,25 @@ void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res
 void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
 
 /**
- * Constructs a new COption_PaymentSecretZ containing a crate::c_types::ThirtyTwoBytes
+ * Constructs a new COption_ThirtyTwoBytesZ containing a crate::c_types::ThirtyTwoBytes
  */
-struct LDKCOption_PaymentSecretZ COption_PaymentSecretZ_some(struct LDKThirtyTwoBytes o);
+struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_some(struct LDKThirtyTwoBytes o);
 
 /**
- * Constructs a new COption_PaymentSecretZ containing nothing
+ * Constructs a new COption_ThirtyTwoBytesZ containing nothing
  */
-struct LDKCOption_PaymentSecretZ COption_PaymentSecretZ_none(void);
+struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_none(void);
 
 /**
  * Frees any resources associated with the crate::c_types::ThirtyTwoBytes, if we are in the Some state
  */
-void COption_PaymentSecretZ_free(struct LDKCOption_PaymentSecretZ _res);
+void COption_ThirtyTwoBytesZ_free(struct LDKCOption_ThirtyTwoBytesZ _res);
 
 /**
- * Creates a new COption_PaymentSecretZ which has the same data as `orig`
+ * Creates a new COption_ThirtyTwoBytesZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_PaymentSecretZ COption_PaymentSecretZ_clone(const struct LDKCOption_PaymentSecretZ *NONNULL_PTR orig);
-
-/**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
- */
-void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+struct LDKCOption_ThirtyTwoBytesZ COption_ThirtyTwoBytesZ_clone(const struct LDKCOption_ThirtyTwoBytesZ *NONNULL_PTR orig);
 
 /**
  * Constructs a new COption_CVec_u8ZZ containing a crate::c_types::derived::CVec_u8Z
@@ -19334,544 +25312,582 @@ void CResult_RecipientOnionFieldsDecodeErrorZ_free(struct LDKCResult_RecipientOn
 struct LDKCResult_RecipientOnionFieldsDecodeErrorZ CResult_RecipientOnionFieldsDecodeErrorZ_clone(const struct LDKCResult_RecipientOnionFieldsDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_BlindedPayInfoDecodeErrorZ in the success state.
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_ok(struct LDKBlindedPayInfo o);
+struct LDKC2Tuple_u64CVec_u8ZZ C2Tuple_u64CVec_u8ZZ_clone(const struct LDKC2Tuple_u64CVec_u8ZZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_BlindedPayInfoDecodeErrorZ in the error state.
+ * Creates a new C2Tuple_u64CVec_u8ZZ from the contained elements.
  */
-struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKC2Tuple_u64CVec_u8ZZ C2Tuple_u64CVec_u8ZZ_new(uint64_t a, struct LDKCVec_u8Z b);
+
+/**
+ * Frees any resources used by the C2Tuple_u64CVec_u8ZZ.
+ */
+void C2Tuple_u64CVec_u8ZZ_free(struct LDKC2Tuple_u64CVec_u8ZZ _res);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_C2Tuple_u64CVec_u8ZZZ_free(struct LDKCVec_C2Tuple_u64CVec_u8ZZZ _res);
+
+/**
+ * Creates a new CResult_RecipientOnionFieldsNoneZ in the success state.
+ */
+struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_ok(struct LDKRecipientOnionFields o);
+
+/**
+ * Creates a new CResult_RecipientOnionFieldsNoneZ in the error state.
+ */
+struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_BlindedPayInfoDecodeErrorZ_is_ok(const struct LDKCResult_BlindedPayInfoDecodeErrorZ *NONNULL_PTR o);
+bool CResult_RecipientOnionFieldsNoneZ_is_ok(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_BlindedPayInfoDecodeErrorZ.
+ * Frees any resources used by the CResult_RecipientOnionFieldsNoneZ.
  */
-void CResult_BlindedPayInfoDecodeErrorZ_free(struct LDKCResult_BlindedPayInfoDecodeErrorZ _res);
+void CResult_RecipientOnionFieldsNoneZ_free(struct LDKCResult_RecipientOnionFieldsNoneZ _res);
 
 /**
- * Creates a new CResult_BlindedPayInfoDecodeErrorZ which has the same data as `orig`
+ * Creates a new CResult_RecipientOnionFieldsNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_clone(const struct LDKCResult_BlindedPayInfoDecodeErrorZ *NONNULL_PTR orig);
+struct LDKCResult_RecipientOnionFieldsNoneZ CResult_RecipientOnionFieldsNoneZ_clone(const struct LDKCResult_RecipientOnionFieldsNoneZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state.
+ * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the success state.
  */
-struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
+struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKUnsignedBolt12Invoice o);
 
 /**
- * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the error state.
+ * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ in the error state.
  */
-struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+bool CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_DelayedPaymentOutputDescriptorDecodeErrorZ.
+ * Frees any resources used by the CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ.
  */
-void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
+void CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ _res);
 
 /**
- * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ which has the same data as `orig`
+ * Creates a new CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ CResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state.
+ * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the success state.
  */
-struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
+struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_ok(struct LDKBolt12Invoice o);
 
 /**
- * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the error state.
+ * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ in the error state.
  */
-struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+bool CResult_Bolt12InvoiceBolt12SemanticErrorZ_is_ok(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_StaticPaymentOutputDescriptorDecodeErrorZ.
+ * Frees any resources used by the CResult_Bolt12InvoiceBolt12SemanticErrorZ.
  */
-void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
+void CResult_Bolt12InvoiceBolt12SemanticErrorZ_free(struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ _res);
 
 /**
- * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ which has the same data as `orig`
+ * Creates a new CResult_Bolt12InvoiceBolt12SemanticErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ CResult_Bolt12InvoiceBolt12SemanticErrorZ_clone(const struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the success state.
+ * Creates a new CResult_SchnorrSignatureNoneZ in the success state.
  */
-struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
+struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_ok(struct LDKSchnorrSignature o);
 
 /**
- * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state.
+ * Creates a new CResult_SchnorrSignatureNoneZ in the error state.
  */
-struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
+bool CResult_SchnorrSignatureNoneZ_is_ok(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_SpendableOutputDescriptorDecodeErrorZ.
+ * Frees any resources used by the CResult_SchnorrSignatureNoneZ.
  */
-void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
+void CResult_SchnorrSignatureNoneZ_free(struct LDKCResult_SchnorrSignatureNoneZ _res);
 
 /**
- * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ which has the same data as `orig`
+ * Creates a new CResult_SchnorrSignatureNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+struct LDKCResult_SchnorrSignatureNoneZ CResult_SchnorrSignatureNoneZ_clone(const struct LDKCResult_SchnorrSignatureNoneZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
+void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Constructs a new COption_CVec_ThirtyTwoBytesZZ containing a crate::c_types::derived::CVec_ThirtyTwoBytesZ
  */
-void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
+struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_some(struct LDKCVec_ThirtyTwoBytesZ o);
 
 /**
- * Constructs a new COption_PackedLockTimeZ containing a u32
+ * Constructs a new COption_CVec_ThirtyTwoBytesZZ containing nothing
  */
-struct LDKCOption_PackedLockTimeZ COption_PackedLockTimeZ_some(uint32_t o);
+struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_none(void);
 
 /**
- * Constructs a new COption_PackedLockTimeZ containing nothing
+ * Frees any resources associated with the crate::c_types::derived::CVec_ThirtyTwoBytesZ, if we are in the Some state
  */
-struct LDKCOption_PackedLockTimeZ COption_PackedLockTimeZ_none(void);
+void COption_CVec_ThirtyTwoBytesZZ_free(struct LDKCOption_CVec_ThirtyTwoBytesZZ _res);
 
 /**
- * Frees any resources associated with the u32, if we are in the Some state
- */
-void COption_PackedLockTimeZ_free(struct LDKCOption_PackedLockTimeZ _res);
-
-/**
- * Creates a new COption_PackedLockTimeZ which has the same data as `orig`
+ * Creates a new COption_CVec_ThirtyTwoBytesZZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_PackedLockTimeZ COption_PackedLockTimeZ_clone(const struct LDKCOption_PackedLockTimeZ *NONNULL_PTR orig);
+struct LDKCOption_CVec_ThirtyTwoBytesZZ COption_CVec_ThirtyTwoBytesZZ_clone(const struct LDKCOption_CVec_ThirtyTwoBytesZZ *NONNULL_PTR orig);
 
 /**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Constructs a new COption_AmountZ containing a crate::lightning::offers::offer::Amount
  */
-struct LDKC2Tuple_PartiallySignedTransactionusizeZ C2Tuple_PartiallySignedTransactionusizeZ_clone(const struct LDKC2Tuple_PartiallySignedTransactionusizeZ *NONNULL_PTR orig);
+struct LDKCOption_AmountZ COption_AmountZ_some(struct LDKAmount o);
 
 /**
- * Creates a new C2Tuple_PartiallySignedTransactionusizeZ from the contained elements.
+ * Constructs a new COption_AmountZ containing nothing
  */
-struct LDKC2Tuple_PartiallySignedTransactionusizeZ C2Tuple_PartiallySignedTransactionusizeZ_new(struct LDKCVec_u8Z a, uintptr_t b);
+struct LDKCOption_AmountZ COption_AmountZ_none(void);
 
 /**
- * Frees any resources used by the C2Tuple_PartiallySignedTransactionusizeZ.
+ * Frees any resources associated with the crate::lightning::offers::offer::Amount, if we are in the Some state
  */
-void C2Tuple_PartiallySignedTransactionusizeZ_free(struct LDKC2Tuple_PartiallySignedTransactionusizeZ _res);
+void COption_AmountZ_free(struct LDKCOption_AmountZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ in the success state.
+ * Creates a new COption_AmountZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ_ok(struct LDKC2Tuple_PartiallySignedTransactionusizeZ o);
+struct LDKCOption_AmountZ COption_AmountZ_clone(const struct LDKCOption_AmountZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ in the error state.
+ * Constructs a new COption_QuantityZ containing a crate::lightning::offers::offer::Quantity
  */
-struct LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ_err(void);
+struct LDKCOption_QuantityZ COption_QuantityZ_some(struct LDKQuantity o);
 
 /**
- * Checks if the given object is currently in the success state
+ * Constructs a new COption_QuantityZ containing nothing
  */
-bool CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ_is_ok(const struct LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ *NONNULL_PTR o);
+struct LDKCOption_QuantityZ COption_QuantityZ_none(void);
 
 /**
- * Frees any resources used by the CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ.
+ * Frees any resources associated with the crate::lightning::offers::offer::Quantity, if we are in the Some state
  */
-void CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ_free(struct LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ _res);
+void COption_QuantityZ_free(struct LDKCOption_QuantityZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ which has the same data as `orig`
+ * Creates a new COption_QuantityZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ CResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ_clone(const struct LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ *NONNULL_PTR orig);
+struct LDKCOption_QuantityZ COption_QuantityZ_clone(const struct LDKCOption_QuantityZ *NONNULL_PTR orig);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Creates a new CResult_ThirtyTwoBytesNoneZ in the success state.
  */
-void CVec_PaymentPreimageZ_free(struct LDKCVec_PaymentPreimageZ _res);
+struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_ok(struct LDKThirtyTwoBytes o);
 
 /**
- * Creates a new CResult_NoneNoneZ in the success state.
+ * Creates a new CResult_ThirtyTwoBytesNoneZ in the error state.
  */
-struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
+struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_err(void);
 
 /**
- * Creates a new CResult_NoneNoneZ in the error state.
+ * Checks if the given object is currently in the success state
  */
-struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
+bool CResult_ThirtyTwoBytesNoneZ_is_ok(const struct LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR o);
 
 /**
- * Checks if the given object is currently in the success state
+ * Frees any resources used by the CResult_ThirtyTwoBytesNoneZ.
  */
-bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
+void CResult_ThirtyTwoBytesNoneZ_free(struct LDKCResult_ThirtyTwoBytesNoneZ _res);
 
 /**
- * Frees any resources used by the CResult_NoneNoneZ.
+ * Creates a new CResult_ThirtyTwoBytesNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
+struct LDKCResult_ThirtyTwoBytesNoneZ CResult_ThirtyTwoBytesNoneZ_clone(const struct LDKCResult_ThirtyTwoBytesNoneZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_NoneNoneZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Creates a new CResult_BlindedPayInfoDecodeErrorZ in the success state.
  */
-struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
+struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_ok(struct LDKBlindedPayInfo o);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Creates a new CResult_BlindedPayInfoDecodeErrorZ in the error state.
  */
-void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
+struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Checks if the given object is currently in the success state
  */
-struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
+bool CResult_BlindedPayInfoDecodeErrorZ_is_ok(const struct LDKCResult_BlindedPayInfoDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Creates a new C2Tuple_SignatureCVec_SignatureZZ from the contained elements.
+ * Frees any resources used by the CResult_BlindedPayInfoDecodeErrorZ.
  */
-struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
+void CResult_BlindedPayInfoDecodeErrorZ_free(struct LDKCResult_BlindedPayInfoDecodeErrorZ _res);
 
 /**
- * Frees any resources used by the C2Tuple_SignatureCVec_SignatureZZ.
+ * Creates a new CResult_BlindedPayInfoDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
+struct LDKCResult_BlindedPayInfoDecodeErrorZ CResult_BlindedPayInfoDecodeErrorZ_clone(const struct LDKCResult_BlindedPayInfoDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state.
+ * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state.
  */
-struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
+struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
 
 /**
- * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the error state.
+ * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the error state.
  */
-struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
+struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR o);
+bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ.
+ * Frees any resources used by the CResult_DelayedPaymentOutputDescriptorDecodeErrorZ.
  */
-void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
+void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ which has the same data as `orig`
+ * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
+struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_SignatureNoneZ in the success state.
+ * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state.
  */
-struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
+struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
 
 /**
- * Creates a new CResult_SignatureNoneZ in the error state.
+ * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the error state.
  */
-struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
+struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_SignatureNoneZ_is_ok(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR o);
+bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_SignatureNoneZ.
+ * Frees any resources used by the CResult_StaticPaymentOutputDescriptorDecodeErrorZ.
  */
-void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
+void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
 
 /**
- * Creates a new CResult_SignatureNoneZ which has the same data as `orig`
+ * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
+struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_PublicKeyNoneZ in the success state.
+ * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the success state.
  */
-struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_ok(struct LDKPublicKey o);
+struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
 
 /**
- * Creates a new CResult_PublicKeyNoneZ in the error state.
+ * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state.
  */
-struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_err(void);
+struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PublicKeyNoneZ_is_ok(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR o);
+bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PublicKeyNoneZ.
+ * Frees any resources used by the CResult_SpendableOutputDescriptorDecodeErrorZ.
  */
-void CResult_PublicKeyNoneZ_free(struct LDKCResult_PublicKeyNoneZ _res);
+void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
 
 /**
- * Creates a new CResult_PublicKeyNoneZ which has the same data as `orig`
+ * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_clone(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR orig);
-
-/**
- * Constructs a new COption_ScalarZ containing a crate::c_types::BigEndianScalar
- */
-struct LDKCOption_ScalarZ COption_ScalarZ_some(struct LDKBigEndianScalar o);
+struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_ScalarZ containing nothing
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-struct LDKCOption_ScalarZ COption_ScalarZ_none(void);
+void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
 
 /**
- * Frees any resources associated with the crate::c_types::BigEndianScalar, if we are in the Some state
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void COption_ScalarZ_free(struct LDKCOption_ScalarZ _res);
+void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
 
 /**
- * Creates a new COption_ScalarZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Constructs a new COption_u32Z containing a u32
  */
-struct LDKCOption_ScalarZ COption_ScalarZ_clone(const struct LDKCOption_ScalarZ *NONNULL_PTR orig);
+struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
 
 /**
- * Creates a new CResult_SharedSecretNoneZ in the success state.
+ * Constructs a new COption_u32Z containing nothing
  */
-struct LDKCResult_SharedSecretNoneZ CResult_SharedSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
+struct LDKCOption_u32Z COption_u32Z_none(void);
 
 /**
- * Creates a new CResult_SharedSecretNoneZ in the error state.
+ * Frees any resources associated with the u32, if we are in the Some state
  */
-struct LDKCResult_SharedSecretNoneZ CResult_SharedSecretNoneZ_err(void);
+void COption_u32Z_free(struct LDKCOption_u32Z _res);
 
 /**
- * Checks if the given object is currently in the success state
+ * Creates a new COption_u32Z which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-bool CResult_SharedSecretNoneZ_is_ok(const struct LDKCResult_SharedSecretNoneZ *NONNULL_PTR o);
+struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the CResult_SharedSecretNoneZ.
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void CResult_SharedSecretNoneZ_free(struct LDKCResult_SharedSecretNoneZ _res);
+struct LDKC2Tuple_CVec_u8Zu64Z C2Tuple_CVec_u8Zu64Z_clone(const struct LDKC2Tuple_CVec_u8Zu64Z *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_SharedSecretNoneZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Creates a new C2Tuple_CVec_u8Zu64Z from the contained elements.
  */
-struct LDKCResult_SharedSecretNoneZ CResult_SharedSecretNoneZ_clone(const struct LDKCResult_SharedSecretNoneZ *NONNULL_PTR orig);
+struct LDKC2Tuple_CVec_u8Zu64Z C2Tuple_CVec_u8Zu64Z_new(struct LDKCVec_u8Z a, uint64_t b);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Frees any resources used by the C2Tuple_CVec_u8Zu64Z.
  */
-void CVec_U5Z_free(struct LDKCVec_U5Z _res);
+void C2Tuple_CVec_u8Zu64Z_free(struct LDKC2Tuple_CVec_u8Zu64Z _res);
 
 /**
- * Creates a new CResult_RecoverableSignatureNoneZ in the success state.
+ * Creates a new CResult_C2Tuple_CVec_u8Zu64ZNoneZ in the success state.
  */
-struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
+struct LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ CResult_C2Tuple_CVec_u8Zu64ZNoneZ_ok(struct LDKC2Tuple_CVec_u8Zu64Z o);
 
 /**
- * Creates a new CResult_RecoverableSignatureNoneZ in the error state.
+ * Creates a new CResult_C2Tuple_CVec_u8Zu64ZNoneZ in the error state.
  */
-struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
+struct LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ CResult_C2Tuple_CVec_u8Zu64ZNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
+bool CResult_C2Tuple_CVec_u8Zu64ZNoneZ_is_ok(const struct LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_RecoverableSignatureNoneZ.
+ * Frees any resources used by the CResult_C2Tuple_CVec_u8Zu64ZNoneZ.
  */
-void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
+void CResult_C2Tuple_CVec_u8Zu64ZNoneZ_free(struct LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ _res);
 
 /**
- * Creates a new CResult_RecoverableSignatureNoneZ which has the same data as `orig`
+ * Creates a new CResult_C2Tuple_CVec_u8Zu64ZNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
+struct LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ CResult_C2Tuple_CVec_u8Zu64ZNoneZ_clone(const struct LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_WriteableEcdsaChannelSignerDecodeErrorZ in the success state.
+ * Creates a new CResult_ChannelDerivationParametersDecodeErrorZ in the success state.
  */
-struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(struct LDKWriteableEcdsaChannelSigner o);
+struct LDKCResult_ChannelDerivationParametersDecodeErrorZ CResult_ChannelDerivationParametersDecodeErrorZ_ok(struct LDKChannelDerivationParameters o);
 
 /**
- * Creates a new CResult_WriteableEcdsaChannelSignerDecodeErrorZ in the error state.
+ * Creates a new CResult_ChannelDerivationParametersDecodeErrorZ in the error state.
  */
-struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_ChannelDerivationParametersDecodeErrorZ CResult_ChannelDerivationParametersDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_WriteableEcdsaChannelSignerDecodeErrorZ_is_ok(const struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ *NONNULL_PTR o);
+bool CResult_ChannelDerivationParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelDerivationParametersDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_WriteableEcdsaChannelSignerDecodeErrorZ.
+ * Frees any resources used by the CResult_ChannelDerivationParametersDecodeErrorZ.
  */
-void CResult_WriteableEcdsaChannelSignerDecodeErrorZ_free(struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ _res);
+void CResult_ChannelDerivationParametersDecodeErrorZ_free(struct LDKCResult_ChannelDerivationParametersDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_ChannelDerivationParametersDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_ChannelDerivationParametersDecodeErrorZ CResult_ChannelDerivationParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelDerivationParametersDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_ScriptNoneZ in the success state.
+ * Creates a new CResult_HTLCDescriptorDecodeErrorZ in the success state.
  */
-struct LDKCResult_ScriptNoneZ CResult_ScriptNoneZ_ok(struct LDKCVec_u8Z o);
+struct LDKCResult_HTLCDescriptorDecodeErrorZ CResult_HTLCDescriptorDecodeErrorZ_ok(struct LDKHTLCDescriptor o);
 
 /**
- * Creates a new CResult_ScriptNoneZ in the error state.
+ * Creates a new CResult_HTLCDescriptorDecodeErrorZ in the error state.
  */
-struct LDKCResult_ScriptNoneZ CResult_ScriptNoneZ_err(void);
+struct LDKCResult_HTLCDescriptorDecodeErrorZ CResult_HTLCDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_ScriptNoneZ_is_ok(const struct LDKCResult_ScriptNoneZ *NONNULL_PTR o);
+bool CResult_HTLCDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_HTLCDescriptorDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_ScriptNoneZ.
+ * Frees any resources used by the CResult_HTLCDescriptorDecodeErrorZ.
  */
-void CResult_ScriptNoneZ_free(struct LDKCResult_ScriptNoneZ _res);
+void CResult_HTLCDescriptorDecodeErrorZ_free(struct LDKCResult_HTLCDescriptorDecodeErrorZ _res);
 
 /**
- * Creates a new CResult_ScriptNoneZ which has the same data as `orig`
+ * Creates a new CResult_HTLCDescriptorDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_ScriptNoneZ CResult_ScriptNoneZ_clone(const struct LDKCResult_ScriptNoneZ *NONNULL_PTR orig);
+struct LDKCResult_HTLCDescriptorDecodeErrorZ CResult_HTLCDescriptorDecodeErrorZ_clone(const struct LDKCResult_HTLCDescriptorDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_ShutdownScriptNoneZ in the success state.
+ * Creates a new CResult_NoneNoneZ in the success state.
  */
-struct LDKCResult_ShutdownScriptNoneZ CResult_ShutdownScriptNoneZ_ok(struct LDKShutdownScript o);
+struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
 
 /**
- * Creates a new CResult_ShutdownScriptNoneZ in the error state.
+ * Creates a new CResult_NoneNoneZ in the error state.
  */
-struct LDKCResult_ShutdownScriptNoneZ CResult_ShutdownScriptNoneZ_err(void);
+struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_ShutdownScriptNoneZ_is_ok(const struct LDKCResult_ShutdownScriptNoneZ *NONNULL_PTR o);
+bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_ShutdownScriptNoneZ.
+ * Frees any resources used by the CResult_NoneNoneZ.
  */
-void CResult_ShutdownScriptNoneZ_free(struct LDKCResult_ShutdownScriptNoneZ _res);
+void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
 
 /**
- * Creates a new CResult_ShutdownScriptNoneZ which has the same data as `orig`
+ * Creates a new CResult_NoneNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_ShutdownScriptNoneZ CResult_ShutdownScriptNoneZ_clone(const struct LDKCResult_ShutdownScriptNoneZ *NONNULL_PTR orig);
+struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Creates a new CResult_PublicKeyNoneZ in the success state.
  */
-void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
+struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_ok(struct LDKPublicKey o);
 
 /**
- * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the success state.
+ * Creates a new CResult_PublicKeyNoneZ in the error state.
  */
-struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
+struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_err(void);
 
 /**
- * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the error state.
+ * Checks if the given object is currently in the success state
  */
-struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
+bool CResult_PublicKeyNoneZ_is_ok(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR o);
 
 /**
- * Checks if the given object is currently in the success state
+ * Frees any resources used by the CResult_PublicKeyNoneZ.
+ */
+void CResult_PublicKeyNoneZ_free(struct LDKCResult_PublicKeyNoneZ _res);
+
+/**
+ * Creates a new CResult_PublicKeyNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_PublicKeyNoneZ CResult_PublicKeyNoneZ_clone(const struct LDKCResult_PublicKeyNoneZ *NONNULL_PTR orig);
+
+/**
+ * Constructs a new COption_BigEndianScalarZ containing a crate::c_types::BigEndianScalar
+ */
+struct LDKCOption_BigEndianScalarZ COption_BigEndianScalarZ_some(struct LDKBigEndianScalar o);
+
+/**
+ * Constructs a new COption_BigEndianScalarZ containing nothing
  */
-bool CResult_CVec_CVec_u8ZZNoneZ_is_ok(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR o);
+struct LDKCOption_BigEndianScalarZ COption_BigEndianScalarZ_none(void);
 
 /**
- * Frees any resources used by the CResult_CVec_CVec_u8ZZNoneZ.
+ * Frees any resources associated with the crate::c_types::BigEndianScalar, if we are in the Some state
  */
-void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
+void COption_BigEndianScalarZ_free(struct LDKCOption_BigEndianScalarZ _res);
 
 /**
- * Creates a new CResult_CVec_CVec_u8ZZNoneZ which has the same data as `orig`
+ * Creates a new COption_BigEndianScalarZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
+struct LDKCOption_BigEndianScalarZ COption_BigEndianScalarZ_clone(const struct LDKCOption_BigEndianScalarZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state.
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
+void CVec_U5Z_free(struct LDKCVec_U5Z _res);
 
 /**
- * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state.
+ * Creates a new CResult_RecoverableSignatureNoneZ in the success state.
  */
-struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
+
+/**
+ * Creates a new CResult_RecoverableSignatureNoneZ in the error state.
+ */
+struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
+bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_InMemorySignerDecodeErrorZ.
+ * Frees any resources used by the CResult_RecoverableSignatureNoneZ.
  */
-void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
+void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
 
 /**
- * Creates a new CResult_InMemorySignerDecodeErrorZ which has the same data as `orig`
+ * Creates a new CResult_RecoverableSignatureNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
+struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_PartiallySignedTransactionNoneZ in the success state.
+ * Creates a new CResult_ECDSASignatureNoneZ in the success state.
  */
-struct LDKCResult_PartiallySignedTransactionNoneZ CResult_PartiallySignedTransactionNoneZ_ok(struct LDKCVec_u8Z o);
+struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_ok(struct LDKECDSASignature o);
 
 /**
- * Creates a new CResult_PartiallySignedTransactionNoneZ in the error state.
+ * Creates a new CResult_ECDSASignatureNoneZ in the error state.
  */
-struct LDKCResult_PartiallySignedTransactionNoneZ CResult_PartiallySignedTransactionNoneZ_err(void);
+struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PartiallySignedTransactionNoneZ_is_ok(const struct LDKCResult_PartiallySignedTransactionNoneZ *NONNULL_PTR o);
+bool CResult_ECDSASignatureNoneZ_is_ok(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PartiallySignedTransactionNoneZ.
+ * Frees any resources used by the CResult_ECDSASignatureNoneZ.
  */
-void CResult_PartiallySignedTransactionNoneZ_free(struct LDKCResult_PartiallySignedTransactionNoneZ _res);
+void CResult_ECDSASignatureNoneZ_free(struct LDKCResult_ECDSASignatureNoneZ _res);
 
 /**
- * Creates a new CResult_PartiallySignedTransactionNoneZ which has the same data as `orig`
+ * Creates a new CResult_ECDSASignatureNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PartiallySignedTransactionNoneZ CResult_PartiallySignedTransactionNoneZ_clone(const struct LDKCResult_PartiallySignedTransactionNoneZ *NONNULL_PTR orig);
+struct LDKCResult_ECDSASignatureNoneZ CResult_ECDSASignatureNoneZ_clone(const struct LDKCResult_ECDSASignatureNoneZ *NONNULL_PTR orig);
 
 /**
  * Creates a new CResult_TransactionNoneZ in the success state.
@@ -19899,6 +25915,225 @@ void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
  */
 struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_WriteableEcdsaChannelSignerDecodeErrorZ in the success state.
+ */
+struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_ok(struct LDKWriteableEcdsaChannelSigner o);
+
+/**
+ * Creates a new CResult_WriteableEcdsaChannelSignerDecodeErrorZ in the error state.
+ */
+struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_WriteableEcdsaChannelSignerDecodeErrorZ_is_ok(const struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_WriteableEcdsaChannelSignerDecodeErrorZ.
+ */
+void CResult_WriteableEcdsaChannelSignerDecodeErrorZ_free(struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_WriteableEcdsaChannelSignerDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ CResult_WriteableEcdsaChannelSignerDecodeErrorZ_clone(const struct LDKCResult_WriteableEcdsaChannelSignerDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_CVec_u8ZNoneZ in the success state.
+ */
+struct LDKCResult_CVec_u8ZNoneZ CResult_CVec_u8ZNoneZ_ok(struct LDKCVec_u8Z o);
+
+/**
+ * Creates a new CResult_CVec_u8ZNoneZ in the error state.
+ */
+struct LDKCResult_CVec_u8ZNoneZ CResult_CVec_u8ZNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_CVec_u8ZNoneZ_is_ok(const struct LDKCResult_CVec_u8ZNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_CVec_u8ZNoneZ.
+ */
+void CResult_CVec_u8ZNoneZ_free(struct LDKCResult_CVec_u8ZNoneZ _res);
+
+/**
+ * Creates a new CResult_CVec_u8ZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_CVec_u8ZNoneZ CResult_CVec_u8ZNoneZ_clone(const struct LDKCResult_CVec_u8ZNoneZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_ShutdownScriptNoneZ in the success state.
+ */
+struct LDKCResult_ShutdownScriptNoneZ CResult_ShutdownScriptNoneZ_ok(struct LDKShutdownScript o);
+
+/**
+ * Creates a new CResult_ShutdownScriptNoneZ in the error state.
+ */
+struct LDKCResult_ShutdownScriptNoneZ CResult_ShutdownScriptNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_ShutdownScriptNoneZ_is_ok(const struct LDKCResult_ShutdownScriptNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_ShutdownScriptNoneZ.
+ */
+void CResult_ShutdownScriptNoneZ_free(struct LDKCResult_ShutdownScriptNoneZ _res);
+
+/**
+ * Creates a new CResult_ShutdownScriptNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_ShutdownScriptNoneZ CResult_ShutdownScriptNoneZ_clone(const struct LDKCResult_ShutdownScriptNoneZ *NONNULL_PTR orig);
+
+/**
+ * Constructs a new COption_u16Z containing a u16
+ */
+struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
+
+/**
+ * Constructs a new COption_u16Z containing nothing
+ */
+struct LDKCOption_u16Z COption_u16Z_none(void);
+
+/**
+ * Frees any resources associated with the u16, if we are in the Some state
+ */
+void COption_u16Z_free(struct LDKCOption_u16Z _res);
+
+/**
+ * Creates a new COption_u16Z which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
+
+/**
+ * Constructs a new COption_boolZ containing a bool
+ */
+struct LDKCOption_boolZ COption_boolZ_some(bool o);
+
+/**
+ * Constructs a new COption_boolZ containing nothing
+ */
+struct LDKCOption_boolZ COption_boolZ_none(void);
+
+/**
+ * Frees any resources associated with the bool, if we are in the Some state
+ */
+void COption_boolZ_free(struct LDKCOption_boolZ _res);
+
+/**
+ * Creates a new COption_boolZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCOption_boolZ COption_boolZ_clone(const struct LDKCOption_boolZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_WitnessNoneZ in the success state.
+ */
+struct LDKCResult_WitnessNoneZ CResult_WitnessNoneZ_ok(struct LDKWitness o);
+
+/**
+ * Creates a new CResult_WitnessNoneZ in the error state.
+ */
+struct LDKCResult_WitnessNoneZ CResult_WitnessNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_WitnessNoneZ_is_ok(const struct LDKCResult_WitnessNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_WitnessNoneZ.
+ */
+void CResult_WitnessNoneZ_free(struct LDKCResult_WitnessNoneZ _res);
+
+/**
+ * Creates a new CResult_WitnessNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_WitnessNoneZ CResult_WitnessNoneZ_clone(const struct LDKCResult_WitnessNoneZ *NONNULL_PTR orig);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_ECDSASignatureZ_free(struct LDKCVec_ECDSASignatureZ _res);
+
+/**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_clone(const struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ from the contained elements.
+ */
+struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_new(struct LDKECDSASignature a, struct LDKCVec_ECDSASignatureZ b);
+
+/**
+ * Frees any resources used by the C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ.
+ */
+void C2Tuple_ECDSASignatureCVec_ECDSASignatureZZ_free(struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ _res);
+
+/**
+ * Creates a new CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ in the success state.
+ */
+struct LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_ok(struct LDKC2Tuple_ECDSASignatureCVec_ECDSASignatureZZ o);
+
+/**
+ * Creates a new CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ in the error state.
+ */
+struct LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ.
+ */
+void CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_free(struct LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ _res);
+
+/**
+ * Creates a new CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ CResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_ECDSASignatureCVec_ECDSASignatureZZNoneZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state.
+ */
+struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
+
+/**
+ * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state.
+ */
+struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_InMemorySignerDecodeErrorZ.
+ */
+void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_InMemorySignerDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Constructs a new COption_WriteableScoreZ containing a crate::lightning::routing::scoring::WriteableScore
  */
@@ -19915,30 +26150,30 @@ struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_none(void);
 void COption_WriteableScoreZ_free(struct LDKCOption_WriteableScoreZ _res);
 
 /**
- * Creates a new CResult_NoneErrorZ in the success state.
+ * Creates a new CResult_NoneIOErrorZ in the success state.
  */
-struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
+struct LDKCResult_NoneIOErrorZ CResult_NoneIOErrorZ_ok(void);
 
 /**
- * Creates a new CResult_NoneErrorZ in the error state.
+ * Creates a new CResult_NoneIOErrorZ in the error state.
  */
-struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
+struct LDKCResult_NoneIOErrorZ CResult_NoneIOErrorZ_err(enum LDKIOError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_NoneErrorZ_is_ok(const struct LDKCResult_NoneErrorZ *NONNULL_PTR o);
+bool CResult_NoneIOErrorZ_is_ok(const struct LDKCResult_NoneIOErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_NoneErrorZ.
+ * Frees any resources used by the CResult_NoneIOErrorZ.
  */
-void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
+void CResult_NoneIOErrorZ_free(struct LDKCResult_NoneIOErrorZ _res);
 
 /**
- * Creates a new CResult_NoneErrorZ which has the same data as `orig`
+ * Creates a new CResult_NoneIOErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
+struct LDKCResult_NoneIOErrorZ CResult_NoneIOErrorZ_clone(const struct LDKCResult_NoneIOErrorZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
@@ -19971,6 +26206,110 @@ void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _r
  */
 struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC2Tuple_BlindedPayInfoBlindedPathZ C2Tuple_BlindedPayInfoBlindedPathZ_clone(const struct LDKC2Tuple_BlindedPayInfoBlindedPathZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements.
+ */
+struct LDKC2Tuple_BlindedPayInfoBlindedPathZ C2Tuple_BlindedPayInfoBlindedPathZ_new(struct LDKBlindedPayInfo a, struct LDKBlindedPath b);
+
+/**
+ * Frees any resources used by the C2Tuple_BlindedPayInfoBlindedPathZ.
+ */
+void C2Tuple_BlindedPayInfoBlindedPathZ_free(struct LDKC2Tuple_BlindedPayInfoBlindedPathZ _res);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_free(struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ _res);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ in the success state.
+ */
+struct LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_ok(struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ o);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ in the error state.
+ */
+struct LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_is_ok(const struct LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ.
+ */
+void CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_free(struct LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ _res);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ CResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ_clone(const struct LDKCResult_CVec_C2Tuple_BlindedPayInfoBlindedPathZZNoneZ *NONNULL_PTR orig);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
+
+/**
+ * Creates a new CResult_OnionMessagePathNoneZ in the success state.
+ */
+struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_ok(struct LDKOnionMessagePath o);
+
+/**
+ * Creates a new CResult_OnionMessagePathNoneZ in the error state.
+ */
+struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_OnionMessagePathNoneZ_is_ok(const struct LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_OnionMessagePathNoneZ.
+ */
+void CResult_OnionMessagePathNoneZ_free(struct LDKCResult_OnionMessagePathNoneZ _res);
+
+/**
+ * Creates a new CResult_OnionMessagePathNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_clone(const struct LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_CVec_BlindedPathZNoneZ in the success state.
+ */
+struct LDKCResult_CVec_BlindedPathZNoneZ CResult_CVec_BlindedPathZNoneZ_ok(struct LDKCVec_BlindedPathZ o);
+
+/**
+ * Creates a new CResult_CVec_BlindedPathZNoneZ in the error state.
+ */
+struct LDKCResult_CVec_BlindedPathZNoneZ CResult_CVec_BlindedPathZNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_CVec_BlindedPathZNoneZ_is_ok(const struct LDKCResult_CVec_BlindedPathZNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_CVec_BlindedPathZNoneZ.
+ */
+void CResult_CVec_BlindedPathZNoneZ_free(struct LDKCResult_CVec_BlindedPathZNoneZ _res);
+
+/**
+ * Creates a new CResult_CVec_BlindedPathZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_CVec_BlindedPathZNoneZ CResult_CVec_BlindedPathZNoneZ_clone(const struct LDKCResult_CVec_BlindedPathZNoneZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the success state.
  */
@@ -20059,27 +26398,6 @@ struct LDKCResult_BlindedTailDecodeErrorZ CResult_BlindedTailDecodeErrorZ_clone(
  */
 void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
 
-/**
- * Constructs a new COption_u32Z containing a u32
- */
-struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
-
-/**
- * Constructs a new COption_u32Z containing nothing
- */
-struct LDKCOption_u32Z COption_u32Z_none(void);
-
-/**
- * Frees any resources associated with the u32, if we are in the Some state
- */
-void COption_u32Z_free(struct LDKCOption_u32Z _res);
-
-/**
- * Creates a new COption_u32Z which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
-struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
-
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
@@ -20168,27 +26486,6 @@ void CResult_PaymentParametersDecodeErrorZ_free(struct LDKCResult_PaymentParamet
  */
 struct LDKCResult_PaymentParametersDecodeErrorZ CResult_PaymentParametersDecodeErrorZ_clone(const struct LDKCResult_PaymentParametersDecodeErrorZ *NONNULL_PTR orig);
 
-/**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
-struct LDKC2Tuple_BlindedPayInfoBlindedPathZ C2Tuple_BlindedPayInfoBlindedPathZ_clone(const struct LDKC2Tuple_BlindedPayInfoBlindedPathZ *NONNULL_PTR orig);
-
-/**
- * Creates a new C2Tuple_BlindedPayInfoBlindedPathZ from the contained elements.
- */
-struct LDKC2Tuple_BlindedPayInfoBlindedPathZ C2Tuple_BlindedPayInfoBlindedPathZ_new(struct LDKBlindedPayInfo a, struct LDKBlindedPath b);
-
-/**
- * Frees any resources used by the C2Tuple_BlindedPayInfoBlindedPathZ.
- */
-void C2Tuple_BlindedPayInfoBlindedPathZ_free(struct LDKC2Tuple_BlindedPayInfoBlindedPathZ _res);
-
-/**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
- */
-void CVec_C2Tuple_BlindedPayInfoBlindedPathZZ_free(struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ _res);
-
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
@@ -20251,11 +26548,6 @@ void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeE
  */
 struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
 
-/**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
- */
-void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
-
 /**
  * Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the success state.
  */
@@ -20324,16 +26616,10 @@ void COption_C2Tuple_u64u64ZZ_free(struct LDKCOption_C2Tuple_u64u64ZZ _res);
  */
 struct LDKCOption_C2Tuple_u64u64ZZ COption_C2Tuple_u64u64ZZ_clone(const struct LDKCOption_C2Tuple_u64u64ZZ *NONNULL_PTR orig);
 
-/**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
-struct LDKC2Tuple_Z C2Tuple_Z_clone(const struct LDKC2Tuple_Z *NONNULL_PTR orig);
-
 /**
  * Creates a new C2Tuple_Z from the contained elements.
  */
-struct LDKC2Tuple_Z C2Tuple_Z_new(struct LDKEightU16s a, struct LDKEightU16s b);
+struct LDKC2Tuple_Z C2Tuple_Z_new(struct LDKThirtyTwoU16s a, struct LDKThirtyTwoU16s b);
 
 /**
  * Frees any resources used by the C2Tuple_Z.
@@ -20341,41 +26627,50 @@ struct LDKC2Tuple_Z C2Tuple_Z_new(struct LDKEightU16s a, struct LDKEightU16s b);
 void C2Tuple_Z_free(struct LDKC2Tuple_Z _res);
 
 /**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Creates a new C2Tuple__u1632_u1632Z from the contained elements.
+ */
+struct LDKC2Tuple__u1632_u1632Z C2Tuple__u1632_u1632Z_new(struct LDKThirtyTwoU16s a, struct LDKThirtyTwoU16s b);
+
+/**
+ * Frees any resources used by the C2Tuple__u1632_u1632Z.
  */
-struct LDKC2Tuple__u168_u168Z C2Tuple__u168_u168Z_clone(const struct LDKC2Tuple__u168_u168Z *NONNULL_PTR orig);
+void C2Tuple__u1632_u1632Z_free(struct LDKC2Tuple__u1632_u1632Z _res);
 
 /**
- * Creates a new C2Tuple__u168_u168Z from the contained elements.
+ * Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing a crate::c_types::derived::C2Tuple__u1632_u1632Z
  */
-struct LDKC2Tuple__u168_u168Z C2Tuple__u168_u168Z_new(struct LDKEightU16s a, struct LDKEightU16s b);
+struct LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_some(struct LDKC2Tuple__u1632_u1632Z o);
 
 /**
- * Frees any resources used by the C2Tuple__u168_u168Z.
+ * Constructs a new COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ containing nothing
  */
-void C2Tuple__u168_u168Z_free(struct LDKC2Tuple__u168_u168Z _res);
+struct LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_none(void);
 
 /**
- * Constructs a new COption_C2Tuple_EightU16sEightU16sZZ containing a crate::c_types::derived::C2Tuple__u168_u168Z
+ * Frees any resources associated with the crate::c_types::derived::C2Tuple__u1632_u1632Z, if we are in the Some state
  */
-struct LDKCOption_C2Tuple_EightU16sEightU16sZZ COption_C2Tuple_EightU16sEightU16sZZ_some(struct LDKC2Tuple__u168_u168Z o);
+void COption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ_free(struct LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ _res);
 
 /**
- * Constructs a new COption_C2Tuple_EightU16sEightU16sZZ containing nothing
+ * Constructs a new COption_f64Z containing a f64
  */
-struct LDKCOption_C2Tuple_EightU16sEightU16sZZ COption_C2Tuple_EightU16sEightU16sZZ_none(void);
+struct LDKCOption_f64Z COption_f64Z_some(double o);
 
 /**
- * Frees any resources associated with the crate::c_types::derived::C2Tuple__u168_u168Z, if we are in the Some state
+ * Constructs a new COption_f64Z containing nothing
  */
-void COption_C2Tuple_EightU16sEightU16sZZ_free(struct LDKCOption_C2Tuple_EightU16sEightU16sZZ _res);
+struct LDKCOption_f64Z COption_f64Z_none(void);
 
 /**
- * Creates a new COption_C2Tuple_EightU16sEightU16sZZ which has the same data as `orig`
+ * Frees any resources associated with the f64, if we are in the Some state
+ */
+void COption_f64Z_free(struct LDKCOption_f64Z _res);
+
+/**
+ * Creates a new COption_f64Z which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_C2Tuple_EightU16sEightU16sZZ COption_C2Tuple_EightU16sEightU16sZZ_clone(const struct LDKCOption_C2Tuple_EightU16sEightU16sZZ *NONNULL_PTR orig);
+struct LDKCOption_f64Z COption_f64Z_clone(const struct LDKCOption_f64Z *NONNULL_PTR orig);
 
 /**
  * Creates a new CResult_ProbabilisticScorerDecodeErrorZ in the success state.
@@ -20397,6 +26692,32 @@ bool CResult_ProbabilisticScorerDecodeErrorZ_is_ok(const struct LDKCResult_Proba
  */
 void CResult_ProbabilisticScorerDecodeErrorZ_free(struct LDKCResult_ProbabilisticScorerDecodeErrorZ _res);
 
+/**
+ * Creates a new CResult_BestBlockDecodeErrorZ in the success state.
+ */
+struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_ok(struct LDKBestBlock o);
+
+/**
+ * Creates a new CResult_BestBlockDecodeErrorZ in the error state.
+ */
+struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_BestBlockDecodeErrorZ_is_ok(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_BestBlockDecodeErrorZ.
+ */
+void CResult_BestBlockDecodeErrorZ_free(struct LDKCResult_BestBlockDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_BestBlockDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_BestBlockDecodeErrorZ CResult_BestBlockDecodeErrorZ_clone(const struct LDKCResult_BestBlockDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
@@ -20419,46 +26740,51 @@ void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
 void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
 
 /**
- * Constructs a new COption_BlockHashZ containing a crate::c_types::ThirtyTwoBytes
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_clone(const struct LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ from the contained elements.
  */
-struct LDKCOption_BlockHashZ COption_BlockHashZ_some(struct LDKThirtyTwoBytes o);
+struct LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_new(struct LDKThirtyTwoBytes a, uint32_t b, struct LDKCOption_ThirtyTwoBytesZ c);
 
 /**
- * Constructs a new COption_BlockHashZ containing nothing
+ * Frees any resources used by the C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ.
  */
-struct LDKCOption_BlockHashZ COption_BlockHashZ_none(void);
+void C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ_free(struct LDKC3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZ _res);
 
 /**
- * Frees any resources associated with the crate::c_types::ThirtyTwoBytes, if we are in the Some state
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void COption_BlockHashZ_free(struct LDKCOption_BlockHashZ _res);
+void CVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ_free(struct LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ _res);
 
 /**
- * Creates a new COption_BlockHashZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Creates a new CResult_ChannelMonitorUpdateStatusNoneZ in the success state.
  */
-struct LDKCOption_BlockHashZ COption_BlockHashZ_clone(const struct LDKCOption_BlockHashZ *NONNULL_PTR orig);
+struct LDKCResult_ChannelMonitorUpdateStatusNoneZ CResult_ChannelMonitorUpdateStatusNoneZ_ok(enum LDKChannelMonitorUpdateStatus o);
 
 /**
- * Creates a new tuple which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Creates a new CResult_ChannelMonitorUpdateStatusNoneZ in the error state.
  */
-struct LDKC2Tuple_TxidCOption_BlockHashZZ C2Tuple_TxidCOption_BlockHashZZ_clone(const struct LDKC2Tuple_TxidCOption_BlockHashZZ *NONNULL_PTR orig);
+struct LDKCResult_ChannelMonitorUpdateStatusNoneZ CResult_ChannelMonitorUpdateStatusNoneZ_err(void);
 
 /**
- * Creates a new C2Tuple_TxidCOption_BlockHashZZ from the contained elements.
+ * Checks if the given object is currently in the success state
  */
-struct LDKC2Tuple_TxidCOption_BlockHashZZ C2Tuple_TxidCOption_BlockHashZZ_new(struct LDKThirtyTwoBytes a, struct LDKCOption_BlockHashZ b);
+bool CResult_ChannelMonitorUpdateStatusNoneZ_is_ok(const struct LDKCResult_ChannelMonitorUpdateStatusNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the C2Tuple_TxidCOption_BlockHashZZ.
+ * Frees any resources used by the CResult_ChannelMonitorUpdateStatusNoneZ.
  */
-void C2Tuple_TxidCOption_BlockHashZZ_free(struct LDKC2Tuple_TxidCOption_BlockHashZZ _res);
+void CResult_ChannelMonitorUpdateStatusNoneZ_free(struct LDKCResult_ChannelMonitorUpdateStatusNoneZ _res);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Creates a new CResult_ChannelMonitorUpdateStatusNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void CVec_C2Tuple_TxidCOption_BlockHashZZZ_free(struct LDKCVec_C2Tuple_TxidCOption_BlockHashZZZ _res);
+struct LDKCResult_ChannelMonitorUpdateStatusNoneZ CResult_ChannelMonitorUpdateStatusNoneZ_clone(const struct LDKCResult_ChannelMonitorUpdateStatusNoneZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
@@ -20469,22 +26795,22 @@ void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
  * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig);
+struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig);
 
 /**
- * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements.
+ * Creates a new C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ from the contained elements.
  */
-struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b, struct LDKPublicKey c);
+struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKChannelId b, struct LDKCVec_MonitorEventZ c, struct LDKPublicKey d);
 
 /**
- * Frees any resources used by the C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ.
+ * Frees any resources used by the C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ.
  */
-void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res);
+void C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ_free(struct LDKC4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZ _res);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res);
+void CVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C4Tuple_OutPointChannelIdCVec_MonitorEventZPublicKeyZZ _res);
 
 /**
  * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state.
@@ -20669,61 +26995,148 @@ void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeF
 struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_clone(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Creates a new CResult_OfferIdDecodeErrorZ in the success state.
  */
-void CVec_ChainHashZ_free(struct LDKCVec_ChainHashZ _res);
+struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_ok(struct LDKOfferId o);
 
 /**
- * Creates a new CResult_OfferBolt12ParseErrorZ in the success state.
+ * Creates a new CResult_OfferIdDecodeErrorZ in the error state.
  */
-struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_ok(struct LDKOffer o);
+struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
- * Creates a new CResult_OfferBolt12ParseErrorZ in the error state.
+ * Checks if the given object is currently in the success state
  */
-struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_err(struct LDKBolt12ParseError e);
+bool CResult_OfferIdDecodeErrorZ_is_ok(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_OfferIdDecodeErrorZ.
+ */
+void CResult_OfferIdDecodeErrorZ_free(struct LDKCResult_OfferIdDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_OfferIdDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_OfferIdDecodeErrorZ CResult_OfferIdDecodeErrorZ_clone(const struct LDKCResult_OfferIdDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_NoneBolt12SemanticErrorZ in the success state.
+ */
+struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_ok(void);
+
+/**
+ * Creates a new CResult_NoneBolt12SemanticErrorZ in the error state.
+ */
+struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_OfferBolt12ParseErrorZ_is_ok(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR o);
+bool CResult_NoneBolt12SemanticErrorZ_is_ok(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_OfferBolt12ParseErrorZ.
+ * Frees any resources used by the CResult_NoneBolt12SemanticErrorZ.
  */
-void CResult_OfferBolt12ParseErrorZ_free(struct LDKCResult_OfferBolt12ParseErrorZ _res);
+void CResult_NoneBolt12SemanticErrorZ_free(struct LDKCResult_NoneBolt12SemanticErrorZ _res);
 
 /**
- * Creates a new CResult_OfferBolt12ParseErrorZ which has the same data as `orig`
+ * Creates a new CResult_NoneBolt12SemanticErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_clone(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR orig);
+struct LDKCResult_NoneBolt12SemanticErrorZ CResult_NoneBolt12SemanticErrorZ_clone(const struct LDKCResult_NoneBolt12SemanticErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_PublicKeyErrorZ in the success state.
+ * Creates a new CResult_OfferBolt12SemanticErrorZ in the success state.
  */
-struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
+struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_ok(struct LDKOffer o);
 
 /**
- * Creates a new CResult_PublicKeyErrorZ in the error state.
+ * Creates a new CResult_OfferBolt12SemanticErrorZ in the error state.
  */
-struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
+struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
+bool CResult_OfferBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PublicKeyErrorZ.
+ * Frees any resources used by the CResult_OfferBolt12SemanticErrorZ.
  */
-void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
+void CResult_OfferBolt12SemanticErrorZ_free(struct LDKCResult_OfferBolt12SemanticErrorZ _res);
 
 /**
- * Creates a new CResult_PublicKeyErrorZ which has the same data as `orig`
+ * Creates a new CResult_OfferBolt12SemanticErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
+struct LDKCResult_OfferBolt12SemanticErrorZ CResult_OfferBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferBolt12SemanticErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the success state.
+ */
+struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithDerivedPayerIdBuilder o);
+
+/**
+ * Creates a new CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ in the error state.
+ */
+struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ.
+ */
+void CResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ _res);
+
+/**
+ * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the success state.
+ */
+struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceRequestWithExplicitPayerIdBuilder o);
+
+/**
+ * Creates a new CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ in the error state.
+ */
+struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ.
+ */
+void CResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ _res);
+
+/**
+ * Creates a new CResult_OfferBolt12ParseErrorZ in the success state.
+ */
+struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_ok(struct LDKOffer o);
+
+/**
+ * Creates a new CResult_OfferBolt12ParseErrorZ in the error state.
+ */
+struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_err(struct LDKBolt12ParseError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_OfferBolt12ParseErrorZ_is_ok(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_OfferBolt12ParseErrorZ.
+ */
+void CResult_OfferBolt12ParseErrorZ_free(struct LDKCResult_OfferBolt12ParseErrorZ _res);
+
+/**
+ * Creates a new CResult_OfferBolt12ParseErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_OfferBolt12ParseErrorZ CResult_OfferBolt12ParseErrorZ_clone(const struct LDKCResult_OfferBolt12ParseErrorZ *NONNULL_PTR orig);
 
 /**
  * Creates a new CResult_NodeIdDecodeErrorZ in the success state.
@@ -20751,6 +27164,32 @@ void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
  */
 struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_PublicKeySecp256k1ErrorZ in the success state.
+ */
+struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_ok(struct LDKPublicKey o);
+
+/**
+ * Creates a new CResult_PublicKeySecp256k1ErrorZ in the error state.
+ */
+struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_PublicKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_PublicKeySecp256k1ErrorZ.
+ */
+void CResult_PublicKeySecp256k1ErrorZ_free(struct LDKCResult_PublicKeySecp256k1ErrorZ _res);
+
+/**
+ * Creates a new CResult_PublicKeySecp256k1ErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_PublicKeySecp256k1ErrorZ CResult_PublicKeySecp256k1ErrorZ_clone(const struct LDKCResult_PublicKeySecp256k1ErrorZ *NONNULL_PTR orig);
+
 /**
  * Constructs a new COption_NetworkUpdateZ containing a crate::lightning::routing::gossip::NetworkUpdate
  */
@@ -20988,7 +27427,7 @@ struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
+void CVec_SocketAddressZ_free(struct LDKCVec_SocketAddressZ _res);
 
 /**
  * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state.
@@ -21089,46 +27528,71 @@ bool CResult_NetworkGraphDecodeErrorZ_is_ok(const struct LDKCResult_NetworkGraph
 void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
 
 /**
- * Constructs a new COption_CVec_NetAddressZZ containing a crate::c_types::derived::CVec_NetAddressZ
+ * Constructs a new COption_CVec_SocketAddressZZ containing a crate::c_types::derived::CVec_SocketAddressZ
  */
-struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
+struct LDKCOption_CVec_SocketAddressZZ COption_CVec_SocketAddressZZ_some(struct LDKCVec_SocketAddressZ o);
 
 /**
- * Constructs a new COption_CVec_NetAddressZZ containing nothing
+ * Constructs a new COption_CVec_SocketAddressZZ containing nothing
  */
-struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
+struct LDKCOption_CVec_SocketAddressZZ COption_CVec_SocketAddressZZ_none(void);
 
 /**
- * Frees any resources associated with the crate::c_types::derived::CVec_NetAddressZ, if we are in the Some state
+ * Frees any resources associated with the crate::c_types::derived::CVec_SocketAddressZ, if we are in the Some state
  */
-void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
+void COption_CVec_SocketAddressZZ_free(struct LDKCOption_CVec_SocketAddressZZ _res);
 
 /**
- * Creates a new COption_CVec_NetAddressZZ which has the same data as `orig`
+ * Creates a new COption_CVec_SocketAddressZZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
+struct LDKCOption_CVec_SocketAddressZZ COption_CVec_SocketAddressZZ_clone(const struct LDKCOption_CVec_SocketAddressZZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_PaymentPreimageZ containing a crate::c_types::ThirtyTwoBytes
+ * Creates a new CResult_u64ShortChannelIdErrorZ in the success state.
  */
-struct LDKCOption_PaymentPreimageZ COption_PaymentPreimageZ_some(struct LDKThirtyTwoBytes o);
+struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_ok(uint64_t o);
 
 /**
- * Constructs a new COption_PaymentPreimageZ containing nothing
+ * Creates a new CResult_u64ShortChannelIdErrorZ in the error state.
  */
-struct LDKCOption_PaymentPreimageZ COption_PaymentPreimageZ_none(void);
+struct LDKCResult_u64ShortChannelIdErrorZ CResult_u64ShortChannelIdErrorZ_err(enum LDKShortChannelIdError e);
 
 /**
- * Frees any resources associated with the crate::c_types::ThirtyTwoBytes, if we are in the Some state
+ * Checks if the given object is currently in the success state
  */
-void COption_PaymentPreimageZ_free(struct LDKCOption_PaymentPreimageZ _res);
+bool CResult_u64ShortChannelIdErrorZ_is_ok(const struct LDKCResult_u64ShortChannelIdErrorZ *NONNULL_PTR o);
 
 /**
- * Creates a new COption_PaymentPreimageZ which has the same data as `orig`
+ * Frees any resources used by the CResult_u64ShortChannelIdErrorZ.
+ */
+void CResult_u64ShortChannelIdErrorZ_free(struct LDKCResult_u64ShortChannelIdErrorZ _res);
+
+/**
+ * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the success state.
+ */
+struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_ok(struct LDKPendingHTLCInfo o);
+
+/**
+ * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ in the error state.
+ */
+struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_err(struct LDKInboundHTLCErr e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_PendingHTLCInfoInboundHTLCErrZ_is_ok(const struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_PendingHTLCInfoInboundHTLCErrZ.
+ */
+void CResult_PendingHTLCInfoInboundHTLCErrZ_free(struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ _res);
+
+/**
+ * Creates a new CResult_PendingHTLCInfoInboundHTLCErrZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_PaymentPreimageZ COption_PaymentPreimageZ_clone(const struct LDKCOption_PaymentPreimageZ *NONNULL_PTR orig);
+struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ CResult_PendingHTLCInfoInboundHTLCErrZ_clone(const struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
@@ -21224,93 +27688,109 @@ void CResult_CVec_UtxoZNoneZ_free(struct LDKCResult_CVec_UtxoZNoneZ _res);
 struct LDKCResult_CVec_UtxoZNoneZ CResult_CVec_UtxoZNoneZ_clone(const struct LDKCResult_CVec_UtxoZNoneZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_u16Z containing a u16
+ * Constructs a new COption_PaymentContextZ containing a crate::lightning::blinded_path::payment::PaymentContext
  */
-struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
+struct LDKCOption_PaymentContextZ COption_PaymentContextZ_some(struct LDKPaymentContext o);
 
 /**
- * Constructs a new COption_u16Z containing nothing
+ * Constructs a new COption_PaymentContextZ containing nothing
  */
-struct LDKCOption_u16Z COption_u16Z_none(void);
+struct LDKCOption_PaymentContextZ COption_PaymentContextZ_none(void);
 
 /**
- * Frees any resources associated with the u16, if we are in the Some state
+ * Frees any resources associated with the crate::lightning::blinded_path::payment::PaymentContext, if we are in the Some state
  */
-void COption_u16Z_free(struct LDKCOption_u16Z _res);
+void COption_PaymentContextZ_free(struct LDKCOption_PaymentContextZ _res);
 
 /**
- * Creates a new COption_u16Z which has the same data as `orig`
+ * Creates a new COption_PaymentContextZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
+struct LDKCOption_PaymentContextZ COption_PaymentContextZ_clone(const struct LDKCOption_PaymentContextZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_ChannelShutdownStateZ containing a crate::lightning::ln::channelmanager::ChannelShutdownState
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_some(enum LDKChannelShutdownState o);
+struct LDKC2Tuple_u64u16Z C2Tuple_u64u16Z_clone(const struct LDKC2Tuple_u64u16Z *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_ChannelShutdownStateZ containing nothing
+ * Creates a new C2Tuple_u64u16Z from the contained elements.
  */
-struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_none(void);
+struct LDKC2Tuple_u64u16Z C2Tuple_u64u16Z_new(uint64_t a, uint16_t b);
 
 /**
- * Frees any resources associated with the crate::lightning::ln::channelmanager::ChannelShutdownState, if we are in the Some state
+ * Frees any resources used by the C2Tuple_u64u16Z.
  */
-void COption_ChannelShutdownStateZ_free(struct LDKCOption_ChannelShutdownStateZ _res);
+void C2Tuple_u64u16Z_free(struct LDKC2Tuple_u64u16Z _res);
 
 /**
- * Creates a new COption_ChannelShutdownStateZ which has the same data as `orig`
+ * Constructs a new COption_C2Tuple_u64u16ZZ containing a crate::c_types::derived::C2Tuple_u64u16Z
+ */
+struct LDKCOption_C2Tuple_u64u16ZZ COption_C2Tuple_u64u16ZZ_some(struct LDKC2Tuple_u64u16Z o);
+
+/**
+ * Constructs a new COption_C2Tuple_u64u16ZZ containing nothing
+ */
+struct LDKCOption_C2Tuple_u64u16ZZ COption_C2Tuple_u64u16ZZ_none(void);
+
+/**
+ * Frees any resources associated with the crate::c_types::derived::C2Tuple_u64u16Z, if we are in the Some state
+ */
+void COption_C2Tuple_u64u16ZZ_free(struct LDKCOption_C2Tuple_u64u16ZZ _res);
+
+/**
+ * Creates a new COption_C2Tuple_u64u16ZZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_clone(const struct LDKCOption_ChannelShutdownStateZ *NONNULL_PTR orig);
+struct LDKCOption_C2Tuple_u64u16ZZ COption_C2Tuple_u64u16ZZ_clone(const struct LDKCOption_C2Tuple_u64u16ZZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_PaymentHashZ containing a crate::c_types::ThirtyTwoBytes
+ * Constructs a new COption_ChannelShutdownStateZ containing a crate::lightning::ln::channelmanager::ChannelShutdownState
  */
-struct LDKCOption_PaymentHashZ COption_PaymentHashZ_some(struct LDKThirtyTwoBytes o);
+struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_some(enum LDKChannelShutdownState o);
 
 /**
- * Constructs a new COption_PaymentHashZ containing nothing
+ * Constructs a new COption_ChannelShutdownStateZ containing nothing
  */
-struct LDKCOption_PaymentHashZ COption_PaymentHashZ_none(void);
+struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_none(void);
 
 /**
- * Frees any resources associated with the crate::c_types::ThirtyTwoBytes, if we are in the Some state
+ * Frees any resources associated with the crate::lightning::ln::channelmanager::ChannelShutdownState, if we are in the Some state
  */
-void COption_PaymentHashZ_free(struct LDKCOption_PaymentHashZ _res);
+void COption_ChannelShutdownStateZ_free(struct LDKCOption_ChannelShutdownStateZ _res);
 
 /**
- * Creates a new COption_PaymentHashZ which has the same data as `orig`
+ * Creates a new COption_ChannelShutdownStateZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_PaymentHashZ COption_PaymentHashZ_clone(const struct LDKCOption_PaymentHashZ *NONNULL_PTR orig);
+struct LDKCOption_ChannelShutdownStateZ COption_ChannelShutdownStateZ_clone(const struct LDKCOption_ChannelShutdownStateZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult__u832APIErrorZ in the success state.
+ * Creates a new CResult_ChannelIdAPIErrorZ in the success state.
  */
-struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
+struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_ok(struct LDKChannelId o);
 
 /**
- * Creates a new CResult__u832APIErrorZ in the error state.
+ * Creates a new CResult_ChannelIdAPIErrorZ in the error state.
  */
-struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
+struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_err(struct LDKAPIError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult__u832APIErrorZ_is_ok(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR o);
+bool CResult_ChannelIdAPIErrorZ_is_ok(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult__u832APIErrorZ.
+ * Frees any resources used by the CResult_ChannelIdAPIErrorZ.
  */
-void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
+void CResult_ChannelIdAPIErrorZ_free(struct LDKCResult_ChannelIdAPIErrorZ _res);
 
 /**
- * Creates a new CResult__u832APIErrorZ which has the same data as `orig`
+ * Creates a new CResult_ChannelIdAPIErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
+struct LDKCResult_ChannelIdAPIErrorZ CResult_ChannelIdAPIErrorZ_clone(const struct LDKCResult_ChannelIdAPIErrorZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
@@ -21370,218 +27850,296 @@ void CResult_NoneRetryableSendFailureZ_free(struct LDKCResult_NoneRetryableSendF
 struct LDKCResult_NoneRetryableSendFailureZ CResult_NoneRetryableSendFailureZ_clone(const struct LDKCResult_NoneRetryableSendFailureZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_PaymentHashPaymentSendFailureZ in the success state.
+ * Creates a new CResult_ThirtyTwoBytesPaymentSendFailureZ in the success state.
  */
-struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
+struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ CResult_ThirtyTwoBytesPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
 
 /**
- * Creates a new CResult_PaymentHashPaymentSendFailureZ in the error state.
+ * Creates a new CResult_ThirtyTwoBytesPaymentSendFailureZ in the error state.
  */
-struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ CResult_ThirtyTwoBytesPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PaymentHashPaymentSendFailureZ_is_ok(const struct LDKCResult_PaymentHashPaymentSendFailureZ *NONNULL_PTR o);
+bool CResult_ThirtyTwoBytesPaymentSendFailureZ_is_ok(const struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PaymentHashPaymentSendFailureZ.
+ * Frees any resources used by the CResult_ThirtyTwoBytesPaymentSendFailureZ.
  */
-void CResult_PaymentHashPaymentSendFailureZ_free(struct LDKCResult_PaymentHashPaymentSendFailureZ _res);
+void CResult_ThirtyTwoBytesPaymentSendFailureZ_free(struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ _res);
 
 /**
- * Creates a new CResult_PaymentHashPaymentSendFailureZ which has the same data as `orig`
+ * Creates a new CResult_ThirtyTwoBytesPaymentSendFailureZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_clone(const struct LDKCResult_PaymentHashPaymentSendFailureZ *NONNULL_PTR orig);
+struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ CResult_ThirtyTwoBytesPaymentSendFailureZ_clone(const struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_PaymentHashRetryableSendFailureZ in the success state.
+ * Creates a new CResult_ThirtyTwoBytesRetryableSendFailureZ in the success state.
  */
-struct LDKCResult_PaymentHashRetryableSendFailureZ CResult_PaymentHashRetryableSendFailureZ_ok(struct LDKThirtyTwoBytes o);
+struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ CResult_ThirtyTwoBytesRetryableSendFailureZ_ok(struct LDKThirtyTwoBytes o);
 
 /**
- * Creates a new CResult_PaymentHashRetryableSendFailureZ in the error state.
+ * Creates a new CResult_ThirtyTwoBytesRetryableSendFailureZ in the error state.
  */
-struct LDKCResult_PaymentHashRetryableSendFailureZ CResult_PaymentHashRetryableSendFailureZ_err(enum LDKRetryableSendFailure e);
+struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ CResult_ThirtyTwoBytesRetryableSendFailureZ_err(enum LDKRetryableSendFailure e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PaymentHashRetryableSendFailureZ_is_ok(const struct LDKCResult_PaymentHashRetryableSendFailureZ *NONNULL_PTR o);
+bool CResult_ThirtyTwoBytesRetryableSendFailureZ_is_ok(const struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PaymentHashRetryableSendFailureZ.
+ * Frees any resources used by the CResult_ThirtyTwoBytesRetryableSendFailureZ.
  */
-void CResult_PaymentHashRetryableSendFailureZ_free(struct LDKCResult_PaymentHashRetryableSendFailureZ _res);
+void CResult_ThirtyTwoBytesRetryableSendFailureZ_free(struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ _res);
 
 /**
- * Creates a new CResult_PaymentHashRetryableSendFailureZ which has the same data as `orig`
+ * Creates a new CResult_ThirtyTwoBytesRetryableSendFailureZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PaymentHashRetryableSendFailureZ CResult_PaymentHashRetryableSendFailureZ_clone(const struct LDKCResult_PaymentHashRetryableSendFailureZ *NONNULL_PTR orig);
+struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ CResult_ThirtyTwoBytesRetryableSendFailureZ_clone(const struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ *NONNULL_PTR orig);
 
 /**
  * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
+struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ *NONNULL_PTR orig);
 
 /**
- * Creates a new C2Tuple_PaymentHashPaymentIdZ from the contained elements.
+ * Creates a new C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ from the contained elements.
  */
-struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
+struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
 
 /**
- * Frees any resources used by the C2Tuple_PaymentHashPaymentIdZ.
+ * Frees any resources used by the C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ.
  */
-void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
+void C2Tuple_ThirtyTwoBytesThirtyTwoBytesZ_free(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ in the success state.
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ in the success state.
  */
-struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o);
 
 /**
- * Creates a new CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ in the error state.
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ in the error state.
  */
-struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR o);
+bool CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.
+ * Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ.
  */
-void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
+void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ which has the same data as `orig`
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_ThirtyTwoBytesZ_free(struct LDKCVec_ThirtyTwoBytesZ _res);
+void CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ _res);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ in the success state.
+ */
+struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_ok(struct LDKCVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZ o);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ in the error state.
+ */
+struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_err(struct LDKProbeSendFailure e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_is_ok(const struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ.
+ */
+void CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_free(struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ _res);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ CResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ_clone(const struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ *NONNULL_PTR orig);
 
 /**
  * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
+struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_clone(const struct LDKC2Tuple_ChannelIdPublicKeyZ *NONNULL_PTR orig);
 
 /**
- * Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements.
+ * Creates a new C2Tuple_ChannelIdPublicKeyZ from the contained elements.
  */
-struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
+struct LDKC2Tuple_ChannelIdPublicKeyZ C2Tuple_ChannelIdPublicKeyZ_new(struct LDKChannelId a, struct LDKPublicKey b);
 
 /**
- * Frees any resources used by the C2Tuple_PaymentHashPaymentSecretZ.
+ * Frees any resources used by the C2Tuple_ChannelIdPublicKeyZ.
  */
-void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
+void C2Tuple_ChannelIdPublicKeyZ_free(struct LDKC2Tuple_ChannelIdPublicKeyZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ in the success state.
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
+void CVec_C2Tuple_ChannelIdPublicKeyZZ_free(struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ in the error state.
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_ChannelIdZ_free(struct LDKCVec_ChannelIdZ _res);
+
+/**
+ * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the success state.
  */
-struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(void);
+struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_ok(struct LDKOfferWithDerivedMetadataBuilder o);
+
+/**
+ * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ in the error state.
+ */
+struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR o);
+bool CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ.
+ * Frees any resources used by the CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ.
  */
-void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ _res);
+void CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_free(struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ which has the same data as `orig`
+ * Creates a new CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR orig);
+struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ CResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ_clone(const struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_PaymentSecretNoneZ in the success state.
+ * Constructs a new COption_StrZ containing a crate::c_types::Str
  */
-struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
+struct LDKCOption_StrZ COption_StrZ_some(struct LDKStr o);
 
 /**
- * Creates a new CResult_PaymentSecretNoneZ in the error state.
+ * Constructs a new COption_StrZ containing nothing
  */
-struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_err(void);
+struct LDKCOption_StrZ COption_StrZ_none(void);
+
+/**
+ * Frees any resources associated with the crate::c_types::Str, if we are in the Some state
+ */
+void COption_StrZ_free(struct LDKCOption_StrZ _res);
+
+/**
+ * Creates a new COption_StrZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCOption_StrZ COption_StrZ_clone(const struct LDKCOption_StrZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ in the success state.
+ */
+struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_ok(struct LDKC2Tuple_ThirtyTwoBytesThirtyTwoBytesZ o);
+
+/**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ in the error state.
+ */
+struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PaymentSecretNoneZ_is_ok(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR o);
+bool CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_is_ok(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PaymentSecretNoneZ.
+ * Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ.
  */
-void CResult_PaymentSecretNoneZ_free(struct LDKCResult_PaymentSecretNoneZ _res);
+void CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_free(struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ _res);
 
 /**
- * Creates a new CResult_PaymentSecretNoneZ which has the same data as `orig`
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_clone(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR orig);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ CResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_PaymentPreimageAPIErrorZ in the success state.
+ * Creates a new CResult_ThirtyTwoBytesAPIErrorZ in the success state.
  */
-struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
+struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
 
 /**
- * Creates a new CResult_PaymentPreimageAPIErrorZ in the error state.
+ * Creates a new CResult_ThirtyTwoBytesAPIErrorZ in the error state.
  */
-struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_err(struct LDKAPIError e);
+struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_err(struct LDKAPIError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PaymentPreimageAPIErrorZ_is_ok(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR o);
+bool CResult_ThirtyTwoBytesAPIErrorZ_is_ok(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PaymentPreimageAPIErrorZ.
+ * Frees any resources used by the CResult_ThirtyTwoBytesAPIErrorZ.
  */
-void CResult_PaymentPreimageAPIErrorZ_free(struct LDKCResult_PaymentPreimageAPIErrorZ _res);
+void CResult_ThirtyTwoBytesAPIErrorZ_free(struct LDKCResult_ThirtyTwoBytesAPIErrorZ _res);
 
 /**
- * Creates a new CResult_PaymentPreimageAPIErrorZ which has the same data as `orig`
+ * Creates a new CResult_ThirtyTwoBytesAPIErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_clone(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR orig);
+struct LDKCResult_ThirtyTwoBytesAPIErrorZ CResult_ThirtyTwoBytesAPIErrorZ_clone(const struct LDKCResult_ThirtyTwoBytesAPIErrorZ *NONNULL_PTR orig);
+
+/**
+ * Constructs a new COption_OffersMessageZ containing a crate::lightning::onion_message::offers::OffersMessage
+ */
+struct LDKCOption_OffersMessageZ COption_OffersMessageZ_some(struct LDKOffersMessage o);
 
 /**
- * Constructs a new COption_CVec_ChainHashZZ containing a crate::c_types::derived::CVec_ChainHashZ
+ * Constructs a new COption_OffersMessageZ containing nothing
  */
-struct LDKCOption_CVec_ChainHashZZ COption_CVec_ChainHashZZ_some(struct LDKCVec_ChainHashZ o);
+struct LDKCOption_OffersMessageZ COption_OffersMessageZ_none(void);
 
 /**
- * Constructs a new COption_CVec_ChainHashZZ containing nothing
+ * Frees any resources associated with the crate::lightning::onion_message::offers::OffersMessage, if we are in the Some state
  */
-struct LDKCOption_CVec_ChainHashZZ COption_CVec_ChainHashZZ_none(void);
+void COption_OffersMessageZ_free(struct LDKCOption_OffersMessageZ _res);
 
 /**
- * Frees any resources associated with the crate::c_types::derived::CVec_ChainHashZ, if we are in the Some state
+ * Creates a new COption_OffersMessageZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void COption_CVec_ChainHashZZ_free(struct LDKCOption_CVec_ChainHashZZ _res);
+struct LDKCOption_OffersMessageZ COption_OffersMessageZ_clone(const struct LDKCOption_OffersMessageZ *NONNULL_PTR orig);
 
 /**
- * Creates a new COption_CVec_ChainHashZZ which has the same data as `orig`
+ * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_CVec_ChainHashZZ COption_CVec_ChainHashZZ_clone(const struct LDKCOption_CVec_ChainHashZZ *NONNULL_PTR orig);
+struct LDKC3Tuple_OffersMessageDestinationBlindedPathZ C3Tuple_OffersMessageDestinationBlindedPathZ_clone(const struct LDKC3Tuple_OffersMessageDestinationBlindedPathZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new C3Tuple_OffersMessageDestinationBlindedPathZ from the contained elements.
+ */
+struct LDKC3Tuple_OffersMessageDestinationBlindedPathZ C3Tuple_OffersMessageDestinationBlindedPathZ_new(struct LDKOffersMessage a, struct LDKDestination b, struct LDKBlindedPath c);
+
+/**
+ * Frees any resources used by the C3Tuple_OffersMessageDestinationBlindedPathZ.
+ */
+void C3Tuple_OffersMessageDestinationBlindedPathZ_free(struct LDKC3Tuple_OffersMessageDestinationBlindedPathZ _res);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_C3Tuple_OffersMessageDestinationBlindedPathZZ_free(struct LDKCVec_C3Tuple_OffersMessageDestinationBlindedPathZZ _res);
 
 /**
  * Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the success state.
@@ -21687,6 +28245,110 @@ void CResult_PhantomRouteHintsDecodeErrorZ_free(struct LDKCResult_PhantomRouteHi
  */
 struct LDKCResult_PhantomRouteHintsDecodeErrorZ CResult_PhantomRouteHintsDecodeErrorZ_clone(const struct LDKCResult_PhantomRouteHintsDecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_BlindedForwardDecodeErrorZ in the success state.
+ */
+struct LDKCResult_BlindedForwardDecodeErrorZ CResult_BlindedForwardDecodeErrorZ_ok(struct LDKBlindedForward o);
+
+/**
+ * Creates a new CResult_BlindedForwardDecodeErrorZ in the error state.
+ */
+struct LDKCResult_BlindedForwardDecodeErrorZ CResult_BlindedForwardDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_BlindedForwardDecodeErrorZ_is_ok(const struct LDKCResult_BlindedForwardDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_BlindedForwardDecodeErrorZ.
+ */
+void CResult_BlindedForwardDecodeErrorZ_free(struct LDKCResult_BlindedForwardDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_BlindedForwardDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_BlindedForwardDecodeErrorZ CResult_BlindedForwardDecodeErrorZ_clone(const struct LDKCResult_BlindedForwardDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_PendingHTLCRoutingDecodeErrorZ in the success state.
+ */
+struct LDKCResult_PendingHTLCRoutingDecodeErrorZ CResult_PendingHTLCRoutingDecodeErrorZ_ok(struct LDKPendingHTLCRouting o);
+
+/**
+ * Creates a new CResult_PendingHTLCRoutingDecodeErrorZ in the error state.
+ */
+struct LDKCResult_PendingHTLCRoutingDecodeErrorZ CResult_PendingHTLCRoutingDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_PendingHTLCRoutingDecodeErrorZ_is_ok(const struct LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_PendingHTLCRoutingDecodeErrorZ.
+ */
+void CResult_PendingHTLCRoutingDecodeErrorZ_free(struct LDKCResult_PendingHTLCRoutingDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_PendingHTLCRoutingDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_PendingHTLCRoutingDecodeErrorZ CResult_PendingHTLCRoutingDecodeErrorZ_clone(const struct LDKCResult_PendingHTLCRoutingDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the success state.
+ */
+struct LDKCResult_PendingHTLCInfoDecodeErrorZ CResult_PendingHTLCInfoDecodeErrorZ_ok(struct LDKPendingHTLCInfo o);
+
+/**
+ * Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the error state.
+ */
+struct LDKCResult_PendingHTLCInfoDecodeErrorZ CResult_PendingHTLCInfoDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_PendingHTLCInfoDecodeErrorZ_is_ok(const struct LDKCResult_PendingHTLCInfoDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_PendingHTLCInfoDecodeErrorZ.
+ */
+void CResult_PendingHTLCInfoDecodeErrorZ_free(struct LDKCResult_PendingHTLCInfoDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_PendingHTLCInfoDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_PendingHTLCInfoDecodeErrorZ CResult_PendingHTLCInfoDecodeErrorZ_clone(const struct LDKCResult_PendingHTLCInfoDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_BlindedFailureDecodeErrorZ in the success state.
+ */
+struct LDKCResult_BlindedFailureDecodeErrorZ CResult_BlindedFailureDecodeErrorZ_ok(enum LDKBlindedFailure o);
+
+/**
+ * Creates a new CResult_BlindedFailureDecodeErrorZ in the error state.
+ */
+struct LDKCResult_BlindedFailureDecodeErrorZ CResult_BlindedFailureDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_BlindedFailureDecodeErrorZ_is_ok(const struct LDKCResult_BlindedFailureDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_BlindedFailureDecodeErrorZ.
+ */
+void CResult_BlindedFailureDecodeErrorZ_free(struct LDKCResult_BlindedFailureDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_BlindedFailureDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_BlindedFailureDecodeErrorZ CResult_BlindedFailureDecodeErrorZ_clone(const struct LDKCResult_BlindedFailureDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_ChannelShutdownStateDecodeErrorZ in the success state.
  */
@@ -21719,34 +28381,34 @@ struct LDKCResult_ChannelShutdownStateDecodeErrorZ CResult_ChannelShutdownStateD
 void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
 
 /**
- * Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements.
+ * Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements.
  */
-struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
+struct LDKC2Tuple_ThirtyTwoBytesChannelManagerZ C2Tuple_ThirtyTwoBytesChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
 
 /**
- * Frees any resources used by the C2Tuple_BlockHashChannelManagerZ.
+ * Frees any resources used by the C2Tuple_ThirtyTwoBytesChannelManagerZ.
  */
-void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
+void C2Tuple_ThirtyTwoBytesChannelManagerZ_free(struct LDKC2Tuple_ThirtyTwoBytesChannelManagerZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state.
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state.
  */
-struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_ThirtyTwoBytesChannelManagerZ o);
 
 /**
- * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state.
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the error state.
  */
-struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR o);
+bool CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.
+ * Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.
  */
-void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
+void CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ _res);
 
 /**
  * Creates a new CResult_MaxDustHTLCExposureDecodeErrorZ in the success state.
@@ -21971,64 +28633,64 @@ struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(co
  * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
+struct LDKC2Tuple_OutPointCVec_u8ZZ C2Tuple_OutPointCVec_u8ZZ_clone(const struct LDKC2Tuple_OutPointCVec_u8ZZ *NONNULL_PTR orig);
 
 /**
- * Creates a new C2Tuple_OutPointScriptZ from the contained elements.
+ * Creates a new C2Tuple_OutPointCVec_u8ZZ from the contained elements.
  */
-struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
+struct LDKC2Tuple_OutPointCVec_u8ZZ C2Tuple_OutPointCVec_u8ZZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
 
 /**
- * Frees any resources used by the C2Tuple_OutPointScriptZ.
+ * Frees any resources used by the C2Tuple_OutPointCVec_u8ZZ.
  */
-void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
+void C2Tuple_OutPointCVec_u8ZZ_free(struct LDKC2Tuple_OutPointCVec_u8ZZ _res);
 
 /**
  * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
+struct LDKC2Tuple_u32CVec_u8ZZ C2Tuple_u32CVec_u8ZZ_clone(const struct LDKC2Tuple_u32CVec_u8ZZ *NONNULL_PTR orig);
 
 /**
- * Creates a new C2Tuple_u32ScriptZ from the contained elements.
+ * Creates a new C2Tuple_u32CVec_u8ZZ from the contained elements.
  */
-struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
+struct LDKC2Tuple_u32CVec_u8ZZ C2Tuple_u32CVec_u8ZZ_new(uint32_t a, struct LDKCVec_u8Z b);
 
 /**
- * Frees any resources used by the C2Tuple_u32ScriptZ.
+ * Frees any resources used by the C2Tuple_u32CVec_u8ZZ.
  */
-void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
+void C2Tuple_u32CVec_u8ZZ_free(struct LDKC2Tuple_u32CVec_u8ZZ _res);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
+void CVec_C2Tuple_u32CVec_u8ZZZ_free(struct LDKCVec_C2Tuple_u32CVec_u8ZZZ _res);
 
 /**
  * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
+struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ *NONNULL_PTR orig);
 
 /**
- * Creates a new C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ from the contained elements.
+ * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ from the contained elements.
  */
-struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
+struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32CVec_u8ZZZ b);
 
 /**
- * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.
+ * Frees any resources used by the C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.
  */
-void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
+void C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_free(struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ _res);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
+void CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ _res);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
+void CVec_CommitmentTransactionZ_free(struct LDKCVec_CommitmentTransactionZ _res);
 
 /**
  * Creates a new tuple which has the same data as `orig`
@@ -22055,17 +28717,17 @@ void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
  * Creates a new tuple which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
+struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
 
 /**
- * Creates a new C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ from the contained elements.
+ * Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ from the contained elements.
  */
-struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
+struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
 
 /**
- * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.
+ * Frees any resources used by the C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.
  */
-void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
+void C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ _res);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
@@ -22078,34 +28740,52 @@ void CVec_TransactionOutputsZ_free(struct LDKCVec_TransactionOutputsZ _res);
 void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
 
 /**
- * Creates a new C2Tuple_BlockHashChannelMonitorZ from the contained elements.
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ C2Tuple_ThirtyTwoBytesChannelMonitorZ_clone(const struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements.
  */
-struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
+struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
 
 /**
- * Frees any resources used by the C2Tuple_BlockHashChannelMonitorZ.
+ * Frees any resources used by the C2Tuple_ThirtyTwoBytesChannelMonitorZ.
  */
-void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
+void C2Tuple_ThirtyTwoBytesChannelMonitorZ_free(struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ _res);
 
 /**
- * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state.
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the success state.
  */
-struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ o);
 
 /**
- * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state.
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the error state.
  */
-struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
+bool CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.
+ * Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.
+ */
+void CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
 
 /**
  * Creates a new C2Tuple_PublicKeyTypeZ from the contained elements.
@@ -22123,60 +28803,93 @@ void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
 void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
 
 /**
- * Constructs a new COption_OffersMessageZ containing a crate::lightning::onion_message::offers::OffersMessage
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_OffersMessageZ COption_OffersMessageZ_some(struct LDKOffersMessage o);
+struct LDKC2Tuple_PublicKeyCVec_SocketAddressZZ C2Tuple_PublicKeyCVec_SocketAddressZZ_clone(const struct LDKC2Tuple_PublicKeyCVec_SocketAddressZZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_OffersMessageZ containing nothing
+ * Creates a new C2Tuple_PublicKeyCVec_SocketAddressZZ from the contained elements.
  */
-struct LDKCOption_OffersMessageZ COption_OffersMessageZ_none(void);
+struct LDKC2Tuple_PublicKeyCVec_SocketAddressZZ C2Tuple_PublicKeyCVec_SocketAddressZZ_new(struct LDKPublicKey a, struct LDKCVec_SocketAddressZ b);
 
 /**
- * Frees any resources associated with the crate::lightning::onion_message::offers::OffersMessage, if we are in the Some state
+ * Frees any resources used by the C2Tuple_PublicKeyCVec_SocketAddressZZ.
  */
-void COption_OffersMessageZ_free(struct LDKCOption_OffersMessageZ _res);
+void C2Tuple_PublicKeyCVec_SocketAddressZZ_free(struct LDKC2Tuple_PublicKeyCVec_SocketAddressZZ _res);
 
 /**
- * Creates a new COption_OffersMessageZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-struct LDKCOption_OffersMessageZ COption_OffersMessageZ_clone(const struct LDKCOption_OffersMessageZ *NONNULL_PTR orig);
+void CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ_free(struct LDKCVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ _res);
+
+/**
+ * Constructs a new COption_OnionMessageContentsZ containing a crate::lightning::onion_message::packet::OnionMessageContents
+ */
+struct LDKCOption_OnionMessageContentsZ COption_OnionMessageContentsZ_some(struct LDKOnionMessageContents o);
 
 /**
- * Constructs a new COption_CustomOnionMessageContentsZ containing a crate::lightning::onion_message::packet::CustomOnionMessageContents
+ * Constructs a new COption_OnionMessageContentsZ containing nothing
  */
-struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_some(struct LDKCustomOnionMessageContents o);
+struct LDKCOption_OnionMessageContentsZ COption_OnionMessageContentsZ_none(void);
 
 /**
- * Constructs a new COption_CustomOnionMessageContentsZ containing nothing
+ * Frees any resources associated with the crate::lightning::onion_message::packet::OnionMessageContents, if we are in the Some state
  */
-struct LDKCOption_CustomOnionMessageContentsZ COption_CustomOnionMessageContentsZ_none(void);
+void COption_OnionMessageContentsZ_free(struct LDKCOption_OnionMessageContentsZ _res);
 
 /**
- * Frees any resources associated with the crate::lightning::onion_message::packet::CustomOnionMessageContents, if we are in the Some state
+ * Creates a new COption_OnionMessageContentsZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void COption_CustomOnionMessageContentsZ_free(struct LDKCOption_CustomOnionMessageContentsZ _res);
+struct LDKCOption_OnionMessageContentsZ COption_OnionMessageContentsZ_clone(const struct LDKCOption_OnionMessageContentsZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ in the success state.
+ * Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ in the success state.
  */
-struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_ok(struct LDKCOption_CustomOnionMessageContentsZ o);
+struct LDKCResult_COption_OnionMessageContentsZDecodeErrorZ CResult_COption_OnionMessageContentsZDecodeErrorZ_ok(struct LDKCOption_OnionMessageContentsZ o);
 
 /**
- * Creates a new CResult_COption_CustomOnionMessageContentsZDecodeErrorZ in the error state.
+ * Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ in the error state.
  */
-struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_COption_OnionMessageContentsZDecodeErrorZ CResult_COption_OnionMessageContentsZDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_is_ok(const struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ *NONNULL_PTR o);
+bool CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok(const struct LDKCResult_COption_OnionMessageContentsZDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_COption_CustomOnionMessageContentsZDecodeErrorZ.
+ * Frees any resources used by the CResult_COption_OnionMessageContentsZDecodeErrorZ.
  */
-void CResult_COption_CustomOnionMessageContentsZDecodeErrorZ_free(struct LDKCResult_COption_CustomOnionMessageContentsZDecodeErrorZ _res);
+void CResult_COption_OnionMessageContentsZDecodeErrorZ_free(struct LDKCResult_COption_OnionMessageContentsZDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_COption_OnionMessageContentsZDecodeErrorZ CResult_COption_OnionMessageContentsZDecodeErrorZ_clone(const struct LDKCResult_COption_OnionMessageContentsZDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone(const struct LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements.
+ */
+struct LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(struct LDKOnionMessageContents a, struct LDKDestination b, struct LDKBlindedPath c);
+
+/**
+ * Frees any resources used by the C3Tuple_OnionMessageContentsDestinationBlindedPathZ.
+ */
+void C3Tuple_OnionMessageContentsDestinationBlindedPathZ_free(struct LDKC3Tuple_OnionMessageContentsDestinationBlindedPathZ _res);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ_free(struct LDKCVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ _res);
 
 /**
  * Constructs a new COption_TypeZ containing a crate::lightning::ln::wire::Type
@@ -22193,6 +28906,12 @@ struct LDKCOption_TypeZ COption_TypeZ_none(void);
  */
 void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
 
+/**
+ * Creates a new COption_TypeZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_COption_TypeZDecodeErrorZ in the success state.
  */
@@ -22214,46 +28933,36 @@ bool CResult_COption_TypeZDecodeErrorZ_is_ok(const struct LDKCResult_COption_Typ
 void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
 
 /**
- * Constructs a new COption_NetAddressZ containing a crate::lightning::ln::msgs::NetAddress
+ * Creates a new CResult_COption_TypeZDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_NetAddressZ COption_NetAddressZ_some(struct LDKNetAddress o);
+struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_NetAddressZ containing nothing
+ * Constructs a new COption_SocketAddressZ containing a crate::lightning::ln::msgs::SocketAddress
  */
-struct LDKCOption_NetAddressZ COption_NetAddressZ_none(void);
+struct LDKCOption_SocketAddressZ COption_SocketAddressZ_some(struct LDKSocketAddress o);
 
 /**
- * Frees any resources associated with the crate::lightning::ln::msgs::NetAddress, if we are in the Some state
+ * Constructs a new COption_SocketAddressZ containing nothing
  */
-void COption_NetAddressZ_free(struct LDKCOption_NetAddressZ _res);
+struct LDKCOption_SocketAddressZ COption_SocketAddressZ_none(void);
 
 /**
- * Creates a new COption_NetAddressZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Frees any resources associated with the crate::lightning::ln::msgs::SocketAddress, if we are in the Some state
  */
-struct LDKCOption_NetAddressZ COption_NetAddressZ_clone(const struct LDKCOption_NetAddressZ *NONNULL_PTR orig);
+void COption_SocketAddressZ_free(struct LDKCOption_SocketAddressZ _res);
 
 /**
- * Creates a new tuple which has the same data as `orig`
+ * Creates a new COption_SocketAddressZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKC2Tuple_PublicKeyCOption_NetAddressZZ C2Tuple_PublicKeyCOption_NetAddressZZ_clone(const struct LDKC2Tuple_PublicKeyCOption_NetAddressZZ *NONNULL_PTR orig);
-
-/**
- * Creates a new C2Tuple_PublicKeyCOption_NetAddressZZ from the contained elements.
- */
-struct LDKC2Tuple_PublicKeyCOption_NetAddressZZ C2Tuple_PublicKeyCOption_NetAddressZZ_new(struct LDKPublicKey a, struct LDKCOption_NetAddressZ b);
-
-/**
- * Frees any resources used by the C2Tuple_PublicKeyCOption_NetAddressZZ.
- */
-void C2Tuple_PublicKeyCOption_NetAddressZZ_free(struct LDKC2Tuple_PublicKeyCOption_NetAddressZZ _res);
+struct LDKCOption_SocketAddressZ COption_SocketAddressZ_clone(const struct LDKCOption_SocketAddressZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_C2Tuple_PublicKeyCOption_NetAddressZZZ_free(struct LDKCVec_C2Tuple_PublicKeyCOption_NetAddressZZZ _res);
+void CVec_PeerDetailsZ_free(struct LDKCVec_PeerDetailsZ _res);
 
 /**
  * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state.
@@ -22354,72 +29063,283 @@ bool CResult_u32GraphSyncErrorZ_is_ok(const struct LDKCResult_u32GraphSyncErrorZ
 void CResult_u32GraphSyncErrorZ_free(struct LDKCResult_u32GraphSyncErrorZ _res);
 
 /**
- * Constructs a new COption_KeyPairZ containing a crate::c_types::SecretKey
+ * Creates a new CResult_CVec_u8ZIOErrorZ in the success state.
+ */
+struct LDKCResult_CVec_u8ZIOErrorZ CResult_CVec_u8ZIOErrorZ_ok(struct LDKCVec_u8Z o);
+
+/**
+ * Creates a new CResult_CVec_u8ZIOErrorZ in the error state.
+ */
+struct LDKCResult_CVec_u8ZIOErrorZ CResult_CVec_u8ZIOErrorZ_err(enum LDKIOError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_CVec_u8ZIOErrorZ_is_ok(const struct LDKCResult_CVec_u8ZIOErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_CVec_u8ZIOErrorZ.
+ */
+void CResult_CVec_u8ZIOErrorZ_free(struct LDKCResult_CVec_u8ZIOErrorZ _res);
+
+/**
+ * Creates a new CResult_CVec_u8ZIOErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_CVec_u8ZIOErrorZ CResult_CVec_u8ZIOErrorZ_clone(const struct LDKCResult_CVec_u8ZIOErrorZ *NONNULL_PTR orig);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_StrZ_free(struct LDKCVec_StrZ _res);
+
+/**
+ * Creates a new CResult_CVec_StrZIOErrorZ in the success state.
+ */
+struct LDKCResult_CVec_StrZIOErrorZ CResult_CVec_StrZIOErrorZ_ok(struct LDKCVec_StrZ o);
+
+/**
+ * Creates a new CResult_CVec_StrZIOErrorZ in the error state.
+ */
+struct LDKCResult_CVec_StrZIOErrorZ CResult_CVec_StrZIOErrorZ_err(enum LDKIOError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_CVec_StrZIOErrorZ_is_ok(const struct LDKCResult_CVec_StrZIOErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_CVec_StrZIOErrorZ.
+ */
+void CResult_CVec_StrZIOErrorZ_free(struct LDKCResult_CVec_StrZIOErrorZ _res);
+
+/**
+ * Creates a new CResult_CVec_StrZIOErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_CVec_StrZIOErrorZ CResult_CVec_StrZIOErrorZ_clone(const struct LDKCResult_CVec_StrZIOErrorZ *NONNULL_PTR orig);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_free(struct LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ _res);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the success state.
+ */
+struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(struct LDKCVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ o);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the error state.
+ */
+struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_err(enum LDKIOError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_is_ok(const struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.
+ */
+void CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ _res);
+
+/**
+ * Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state.
+ */
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(struct LDKC2Tuple_ThirtyTwoBytesChannelMonitorZ o);
+
+/**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the error state.
+ */
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_err(enum LDKIOError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_is_ok(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.
+ */
+void CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ _res);
+
+/**
+ * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(const struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the success state.
+ */
+struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(struct LDKUnsignedInvoiceRequest o);
+
+/**
+ * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state.
+ */
+struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ.
+ */
+void CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ _res);
+
+/**
+ * Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_KeyPairZ COption_KeyPairZ_some(struct LDKSecretKey o);
+struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_KeyPairZ containing nothing
+ * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the success state.
  */
-struct LDKCOption_KeyPairZ COption_KeyPairZ_none(void);
+struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_ok(struct LDKInvoiceRequest o);
+
+/**
+ * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the error state.
+ */
+struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_InvoiceRequestBolt12SemanticErrorZ.
+ */
+void CResult_InvoiceRequestBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ _res);
+
+/**
+ * Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ CResult_InvoiceRequestBolt12SemanticErrorZ_clone(const struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ *NONNULL_PTR orig);
+
+/**
+ * Constructs a new COption_SecretKeyZ containing a crate::c_types::SecretKey
+ */
+struct LDKCOption_SecretKeyZ COption_SecretKeyZ_some(struct LDKSecretKey o);
+
+/**
+ * Constructs a new COption_SecretKeyZ containing nothing
+ */
+struct LDKCOption_SecretKeyZ COption_SecretKeyZ_none(void);
 
 /**
  * Frees any resources associated with the crate::c_types::SecretKey, if we are in the Some state
  */
-void COption_KeyPairZ_free(struct LDKCOption_KeyPairZ _res);
+void COption_SecretKeyZ_free(struct LDKCOption_SecretKeyZ _res);
 
 /**
- * Creates a new COption_KeyPairZ which has the same data as `orig`
+ * Creates a new COption_SecretKeyZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_KeyPairZ COption_KeyPairZ_clone(const struct LDKCOption_KeyPairZ *NONNULL_PTR orig);
+struct LDKCOption_SecretKeyZ COption_SecretKeyZ_clone(const struct LDKCOption_SecretKeyZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_COption_KeyPairZNoneZ in the success state.
+ * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
  */
-struct LDKCResult_COption_KeyPairZNoneZ CResult_COption_KeyPairZNoneZ_ok(struct LDKCOption_KeyPairZ o);
+struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithExplicitSigningPubkeyBuilder o);
 
 /**
- * Creates a new CResult_COption_KeyPairZNoneZ in the error state.
+ * Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
  */
-struct LDKCResult_COption_KeyPairZNoneZ CResult_COption_KeyPairZNoneZ_err(void);
+struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_COption_KeyPairZNoneZ_is_ok(const struct LDKCResult_COption_KeyPairZNoneZ *NONNULL_PTR o);
+bool CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_COption_KeyPairZNoneZ.
+ * Frees any resources used by the CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.
  */
-void CResult_COption_KeyPairZNoneZ_free(struct LDKCResult_COption_KeyPairZNoneZ _res);
+void CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ _res);
 
 /**
- * Creates a new CResult_COption_KeyPairZNoneZ which has the same data as `orig`
+ * Creates a new CResult_VerifiedInvoiceRequestNoneZ in the success state.
+ */
+struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_ok(struct LDKVerifiedInvoiceRequest o);
+
+/**
+ * Creates a new CResult_VerifiedInvoiceRequestNoneZ in the error state.
+ */
+struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_VerifiedInvoiceRequestNoneZ_is_ok(const struct LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_VerifiedInvoiceRequestNoneZ.
+ */
+void CResult_VerifiedInvoiceRequestNoneZ_free(struct LDKCResult_VerifiedInvoiceRequestNoneZ _res);
+
+/**
+ * Creates a new CResult_VerifiedInvoiceRequestNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_COption_KeyPairZNoneZ CResult_COption_KeyPairZNoneZ_clone(const struct LDKCResult_COption_KeyPairZNoneZ *NONNULL_PTR orig);
+struct LDKCResult_VerifiedInvoiceRequestNoneZ CResult_VerifiedInvoiceRequestNoneZ_clone(const struct LDKCResult_VerifiedInvoiceRequestNoneZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_ScriptZ containing a crate::c_types::derived::CVec_u8Z
+ * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
  */
-struct LDKCOption_ScriptZ COption_ScriptZ_some(struct LDKCVec_u8Z o);
+struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(struct LDKInvoiceWithDerivedSigningPubkeyBuilder o);
 
 /**
- * Constructs a new COption_ScriptZ containing nothing
+ * Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
  */
-struct LDKCOption_ScriptZ COption_ScriptZ_none(void);
+struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(enum LDKBolt12SemanticError e);
 
 /**
- * Frees any resources associated with the crate::c_types::derived::CVec_u8Z, if we are in the Some state
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(const struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.
+ */
+void CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ _res);
+
+/**
+ * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the success state.
+ */
+struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_ok(struct LDKInvoiceRequestFields o);
+
+/**
+ * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the error state.
+ */
+struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
  */
-void COption_ScriptZ_free(struct LDKCOption_ScriptZ _res);
+bool CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Creates a new COption_ScriptZ which has the same data as `orig`
+ * Frees any resources used by the CResult_InvoiceRequestFieldsDecodeErrorZ.
+ */
+void CResult_InvoiceRequestFieldsDecodeErrorZ_free(struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_ScriptZ COption_ScriptZ_clone(const struct LDKCOption_ScriptZ *NONNULL_PTR orig);
+struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ CResult_InvoiceRequestFieldsDecodeErrorZ_clone(const struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ *NONNULL_PTR orig);
 
 /**
  * Constructs a new COption_NoneZ containing a
@@ -22441,6 +29361,27 @@ void COption_NoneZ_free(enum LDKCOption_NoneZ _res);
  */
 void CVec_WitnessZ_free(struct LDKCVec_WitnessZ _res);
 
+/**
+ * Constructs a new COption_ECDSASignatureZ containing a crate::c_types::ECDSASignature
+ */
+struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_some(struct LDKECDSASignature o);
+
+/**
+ * Constructs a new COption_ECDSASignatureZ containing nothing
+ */
+struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_none(void);
+
+/**
+ * Frees any resources associated with the crate::c_types::ECDSASignature, if we are in the Some state
+ */
+void COption_ECDSASignatureZ_free(struct LDKCOption_ECDSASignatureZ _res);
+
+/**
+ * Creates a new COption_ECDSASignatureZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCOption_ECDSASignatureZ COption_ECDSASignatureZ_clone(const struct LDKCOption_ECDSASignatureZ *NONNULL_PTR orig);
+
 /**
  * Constructs a new COption_i64Z containing a i64
  */
@@ -22463,51 +29404,56 @@ void COption_i64Z_free(struct LDKCOption_i64Z _res);
 struct LDKCOption_i64Z COption_i64Z_clone(const struct LDKCOption_i64Z *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_TxidZ containing a crate::c_types::ThirtyTwoBytes
+ * Creates a new CResult_SocketAddressDecodeErrorZ in the success state.
  */
-struct LDKCOption_TxidZ COption_TxidZ_some(struct LDKThirtyTwoBytes o);
+struct LDKCResult_SocketAddressDecodeErrorZ CResult_SocketAddressDecodeErrorZ_ok(struct LDKSocketAddress o);
 
 /**
- * Constructs a new COption_TxidZ containing nothing
+ * Creates a new CResult_SocketAddressDecodeErrorZ in the error state.
  */
-struct LDKCOption_TxidZ COption_TxidZ_none(void);
+struct LDKCResult_SocketAddressDecodeErrorZ CResult_SocketAddressDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
- * Frees any resources associated with the crate::c_types::ThirtyTwoBytes, if we are in the Some state
+ * Checks if the given object is currently in the success state
  */
-void COption_TxidZ_free(struct LDKCOption_TxidZ _res);
+bool CResult_SocketAddressDecodeErrorZ_is_ok(const struct LDKCResult_SocketAddressDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Creates a new COption_TxidZ which has the same data as `orig`
+ * Frees any resources used by the CResult_SocketAddressDecodeErrorZ.
+ */
+void CResult_SocketAddressDecodeErrorZ_free(struct LDKCResult_SocketAddressDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_SocketAddressDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_TxidZ COption_TxidZ_clone(const struct LDKCOption_TxidZ *NONNULL_PTR orig);
+struct LDKCResult_SocketAddressDecodeErrorZ CResult_SocketAddressDecodeErrorZ_clone(const struct LDKCResult_SocketAddressDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_NetAddressDecodeErrorZ in the success state.
+ * Creates a new CResult_SocketAddressSocketAddressParseErrorZ in the success state.
  */
-struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
+struct LDKCResult_SocketAddressSocketAddressParseErrorZ CResult_SocketAddressSocketAddressParseErrorZ_ok(struct LDKSocketAddress o);
 
 /**
- * Creates a new CResult_NetAddressDecodeErrorZ in the error state.
+ * Creates a new CResult_SocketAddressSocketAddressParseErrorZ in the error state.
  */
-struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
+struct LDKCResult_SocketAddressSocketAddressParseErrorZ CResult_SocketAddressSocketAddressParseErrorZ_err(enum LDKSocketAddressParseError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_NetAddressDecodeErrorZ_is_ok(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR o);
+bool CResult_SocketAddressSocketAddressParseErrorZ_is_ok(const struct LDKCResult_SocketAddressSocketAddressParseErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_NetAddressDecodeErrorZ.
+ * Frees any resources used by the CResult_SocketAddressSocketAddressParseErrorZ.
  */
-void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
+void CResult_SocketAddressSocketAddressParseErrorZ_free(struct LDKCResult_SocketAddressSocketAddressParseErrorZ _res);
 
 /**
- * Creates a new CResult_NetAddressDecodeErrorZ which has the same data as `orig`
+ * Creates a new CResult_SocketAddressSocketAddressParseErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
+struct LDKCResult_SocketAddressSocketAddressParseErrorZ CResult_SocketAddressSocketAddressParseErrorZ_clone(const struct LDKCResult_SocketAddressSocketAddressParseErrorZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
@@ -22581,6 +29527,110 @@ void CResult_AcceptChannelV2DecodeErrorZ_free(struct LDKCResult_AcceptChannelV2D
  */
 struct LDKCResult_AcceptChannelV2DecodeErrorZ CResult_AcceptChannelV2DecodeErrorZ_clone(const struct LDKCResult_AcceptChannelV2DecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_StfuDecodeErrorZ in the success state.
+ */
+struct LDKCResult_StfuDecodeErrorZ CResult_StfuDecodeErrorZ_ok(struct LDKStfu o);
+
+/**
+ * Creates a new CResult_StfuDecodeErrorZ in the error state.
+ */
+struct LDKCResult_StfuDecodeErrorZ CResult_StfuDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_StfuDecodeErrorZ_is_ok(const struct LDKCResult_StfuDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_StfuDecodeErrorZ.
+ */
+void CResult_StfuDecodeErrorZ_free(struct LDKCResult_StfuDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_StfuDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_StfuDecodeErrorZ CResult_StfuDecodeErrorZ_clone(const struct LDKCResult_StfuDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_SpliceDecodeErrorZ in the success state.
+ */
+struct LDKCResult_SpliceDecodeErrorZ CResult_SpliceDecodeErrorZ_ok(struct LDKSplice o);
+
+/**
+ * Creates a new CResult_SpliceDecodeErrorZ in the error state.
+ */
+struct LDKCResult_SpliceDecodeErrorZ CResult_SpliceDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_SpliceDecodeErrorZ_is_ok(const struct LDKCResult_SpliceDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_SpliceDecodeErrorZ.
+ */
+void CResult_SpliceDecodeErrorZ_free(struct LDKCResult_SpliceDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_SpliceDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_SpliceDecodeErrorZ CResult_SpliceDecodeErrorZ_clone(const struct LDKCResult_SpliceDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_SpliceAckDecodeErrorZ in the success state.
+ */
+struct LDKCResult_SpliceAckDecodeErrorZ CResult_SpliceAckDecodeErrorZ_ok(struct LDKSpliceAck o);
+
+/**
+ * Creates a new CResult_SpliceAckDecodeErrorZ in the error state.
+ */
+struct LDKCResult_SpliceAckDecodeErrorZ CResult_SpliceAckDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_SpliceAckDecodeErrorZ_is_ok(const struct LDKCResult_SpliceAckDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_SpliceAckDecodeErrorZ.
+ */
+void CResult_SpliceAckDecodeErrorZ_free(struct LDKCResult_SpliceAckDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_SpliceAckDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_SpliceAckDecodeErrorZ CResult_SpliceAckDecodeErrorZ_clone(const struct LDKCResult_SpliceAckDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_SpliceLockedDecodeErrorZ in the success state.
+ */
+struct LDKCResult_SpliceLockedDecodeErrorZ CResult_SpliceLockedDecodeErrorZ_ok(struct LDKSpliceLocked o);
+
+/**
+ * Creates a new CResult_SpliceLockedDecodeErrorZ in the error state.
+ */
+struct LDKCResult_SpliceLockedDecodeErrorZ CResult_SpliceLockedDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_SpliceLockedDecodeErrorZ_is_ok(const struct LDKCResult_SpliceLockedDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_SpliceLockedDecodeErrorZ.
+ */
+void CResult_SpliceLockedDecodeErrorZ_free(struct LDKCResult_SpliceLockedDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_SpliceLockedDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_SpliceLockedDecodeErrorZ CResult_SpliceLockedDecodeErrorZ_clone(const struct LDKCResult_SpliceLockedDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_TxAddInputDecodeErrorZ in the success state.
  */
@@ -23257,6 +30307,32 @@ void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillH
  */
 struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_OnionPacketDecodeErrorZ in the success state.
+ */
+struct LDKCResult_OnionPacketDecodeErrorZ CResult_OnionPacketDecodeErrorZ_ok(struct LDKOnionPacket o);
+
+/**
+ * Creates a new CResult_OnionPacketDecodeErrorZ in the error state.
+ */
+struct LDKCResult_OnionPacketDecodeErrorZ CResult_OnionPacketDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_OnionPacketDecodeErrorZ_is_ok(const struct LDKCResult_OnionPacketDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_OnionPacketDecodeErrorZ.
+ */
+void CResult_OnionPacketDecodeErrorZ_free(struct LDKCResult_OnionPacketDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_OnionPacketDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_OnionPacketDecodeErrorZ CResult_OnionPacketDecodeErrorZ_clone(const struct LDKCResult_OnionPacketDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state.
  */
@@ -23309,6 +30385,32 @@ void CResult_OnionMessageDecodeErrorZ_free(struct LDKCResult_OnionMessageDecodeE
  */
 struct LDKCResult_OnionMessageDecodeErrorZ CResult_OnionMessageDecodeErrorZ_clone(const struct LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the success state.
+ */
+struct LDKCResult_FinalOnionHopDataDecodeErrorZ CResult_FinalOnionHopDataDecodeErrorZ_ok(struct LDKFinalOnionHopData o);
+
+/**
+ * Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the error state.
+ */
+struct LDKCResult_FinalOnionHopDataDecodeErrorZ CResult_FinalOnionHopDataDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_FinalOnionHopDataDecodeErrorZ_is_ok(const struct LDKCResult_FinalOnionHopDataDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_FinalOnionHopDataDecodeErrorZ.
+ */
+void CResult_FinalOnionHopDataDecodeErrorZ_free(struct LDKCResult_FinalOnionHopDataDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_FinalOnionHopDataDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_FinalOnionHopDataDecodeErrorZ CResult_FinalOnionHopDataDecodeErrorZ_clone(const struct LDKCResult_FinalOnionHopDataDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_PingDecodeErrorZ in the success state.
  */
@@ -24051,30 +31153,51 @@ bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_Tru
 void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
 
 /**
- * Creates a new CResult_CVec_SignatureZNoneZ in the success state.
+ * Creates a new CResult_CVec_ECDSASignatureZNoneZ in the success state.
  */
-struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
+struct LDKCResult_CVec_ECDSASignatureZNoneZ CResult_CVec_ECDSASignatureZNoneZ_ok(struct LDKCVec_ECDSASignatureZ o);
 
 /**
- * Creates a new CResult_CVec_SignatureZNoneZ in the error state.
+ * Creates a new CResult_CVec_ECDSASignatureZNoneZ in the error state.
  */
-struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
+struct LDKCResult_CVec_ECDSASignatureZNoneZ CResult_CVec_ECDSASignatureZNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
+bool CResult_CVec_ECDSASignatureZNoneZ_is_ok(const struct LDKCResult_CVec_ECDSASignatureZNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_CVec_SignatureZNoneZ.
+ * Frees any resources used by the CResult_CVec_ECDSASignatureZNoneZ.
  */
-void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
+void CResult_CVec_ECDSASignatureZNoneZ_free(struct LDKCResult_CVec_ECDSASignatureZNoneZ _res);
 
 /**
- * Creates a new CResult_CVec_SignatureZNoneZ which has the same data as `orig`
+ * Creates a new CResult_CVec_ECDSASignatureZNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
+struct LDKCResult_CVec_ECDSASignatureZNoneZ CResult_CVec_ECDSASignatureZNoneZ_clone(const struct LDKCResult_CVec_ECDSASignatureZNoneZ *NONNULL_PTR orig);
+
+/**
+ * Constructs a new COption_usizeZ containing a usize
+ */
+struct LDKCOption_usizeZ COption_usizeZ_some(uintptr_t o);
+
+/**
+ * Constructs a new COption_usizeZ containing nothing
+ */
+struct LDKCOption_usizeZ COption_usizeZ_none(void);
+
+/**
+ * Frees any resources associated with the usize, if we are in the Some state
+ */
+void COption_usizeZ_free(struct LDKCOption_usizeZ _res);
+
+/**
+ * Creates a new COption_usizeZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCOption_usizeZ COption_usizeZ_clone(const struct LDKCOption_usizeZ *NONNULL_PTR orig);
 
 /**
  * Creates a new CResult_ShutdownScriptDecodeErrorZ in the success state.
@@ -24128,6 +31251,11 @@ void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_Shutdow
  */
 struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
 
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
+
 /**
  * Creates a new CResult_PaymentPurposeDecodeErrorZ in the success state.
  */
@@ -24154,6 +31282,32 @@ void CResult_PaymentPurposeDecodeErrorZ_free(struct LDKCResult_PaymentPurposeDec
  */
 struct LDKCResult_PaymentPurposeDecodeErrorZ CResult_PaymentPurposeDecodeErrorZ_clone(const struct LDKCResult_PaymentPurposeDecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_ClaimedHTLCDecodeErrorZ in the success state.
+ */
+struct LDKCResult_ClaimedHTLCDecodeErrorZ CResult_ClaimedHTLCDecodeErrorZ_ok(struct LDKClaimedHTLC o);
+
+/**
+ * Creates a new CResult_ClaimedHTLCDecodeErrorZ in the error state.
+ */
+struct LDKCResult_ClaimedHTLCDecodeErrorZ CResult_ClaimedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_ClaimedHTLCDecodeErrorZ_is_ok(const struct LDKCResult_ClaimedHTLCDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_ClaimedHTLCDecodeErrorZ.
+ */
+void CResult_ClaimedHTLCDecodeErrorZ_free(struct LDKCResult_ClaimedHTLCDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_ClaimedHTLCDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_ClaimedHTLCDecodeErrorZ CResult_ClaimedHTLCDecodeErrorZ_clone(const struct LDKCResult_ClaimedHTLCDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Constructs a new COption_PathFailureZ containing a crate::lightning::events::PathFailure
  */
@@ -24322,46 +31476,30 @@ void CResult_PaymentFailureReasonDecodeErrorZ_free(struct LDKCResult_PaymentFail
 struct LDKCResult_PaymentFailureReasonDecodeErrorZ CResult_PaymentFailureReasonDecodeErrorZ_clone(const struct LDKCResult_PaymentFailureReasonDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_u128Z containing a crate::c_types::U128
+ * Constructs a new COption_U128Z containing a crate::c_types::U128
  */
-struct LDKCOption_u128Z COption_u128Z_some(struct LDKU128 o);
+struct LDKCOption_U128Z COption_U128Z_some(struct LDKU128 o);
 
 /**
- * Constructs a new COption_u128Z containing nothing
+ * Constructs a new COption_U128Z containing nothing
  */
-struct LDKCOption_u128Z COption_u128Z_none(void);
+struct LDKCOption_U128Z COption_U128Z_none(void);
 
 /**
  * Frees any resources associated with the crate::c_types::U128, if we are in the Some state
  */
-void COption_u128Z_free(struct LDKCOption_u128Z _res);
+void COption_U128Z_free(struct LDKCOption_U128Z _res);
 
 /**
- * Creates a new COption_u128Z which has the same data as `orig`
+ * Creates a new COption_U128Z which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCOption_u128Z COption_u128Z_clone(const struct LDKCOption_u128Z *NONNULL_PTR orig);
-
-/**
- * Constructs a new COption_PaymentIdZ containing a crate::c_types::ThirtyTwoBytes
- */
-struct LDKCOption_PaymentIdZ COption_PaymentIdZ_some(struct LDKThirtyTwoBytes o);
+struct LDKCOption_U128Z COption_U128Z_clone(const struct LDKCOption_U128Z *NONNULL_PTR orig);
 
 /**
- * Constructs a new COption_PaymentIdZ containing nothing
- */
-struct LDKCOption_PaymentIdZ COption_PaymentIdZ_none(void);
-
-/**
- * Frees any resources associated with the crate::c_types::ThirtyTwoBytes, if we are in the Some state
- */
-void COption_PaymentIdZ_free(struct LDKCOption_PaymentIdZ _res);
-
-/**
- * Creates a new COption_PaymentIdZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-struct LDKCOption_PaymentIdZ COption_PaymentIdZ_clone(const struct LDKCOption_PaymentIdZ *NONNULL_PTR orig);
+void CVec_ClaimedHTLCZ_free(struct LDKCVec_ClaimedHTLCZ _res);
 
 /**
  * Constructs a new COption_PaymentFailureReasonZ containing a crate::lightning::events::PaymentFailureReason
@@ -24431,31 +31569,6 @@ void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDec
  */
 struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
 
-/**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
- */
-void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
-
-/**
- * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the success state.
- */
-struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
-
-/**
- * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the error state.
- */
-struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
-
-/**
- * Checks if the given object is currently in the success state
- */
-bool CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR o);
-
-/**
- * Frees any resources used by the CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.
- */
-void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
-
 /**
  * Creates a new CResult_SiPrefixBolt11ParseErrorZ in the success state.
  */
@@ -24551,30 +31664,30 @@ struct LDKC3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ C3Tuple_RawBolt11
 void C3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ_free(struct LDKC3Tuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ _res);
 
 /**
- * Creates a new CResult_PayeePubKeyErrorZ in the success state.
+ * Creates a new CResult_PayeePubKeySecp256k1ErrorZ in the success state.
  */
-struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
+struct LDKCResult_PayeePubKeySecp256k1ErrorZ CResult_PayeePubKeySecp256k1ErrorZ_ok(struct LDKPayeePubKey o);
 
 /**
- * Creates a new CResult_PayeePubKeyErrorZ in the error state.
+ * Creates a new CResult_PayeePubKeySecp256k1ErrorZ in the error state.
  */
-struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
+struct LDKCResult_PayeePubKeySecp256k1ErrorZ CResult_PayeePubKeySecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PayeePubKeyErrorZ_is_ok(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR o);
+bool CResult_PayeePubKeySecp256k1ErrorZ_is_ok(const struct LDKCResult_PayeePubKeySecp256k1ErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PayeePubKeyErrorZ.
+ * Frees any resources used by the CResult_PayeePubKeySecp256k1ErrorZ.
  */
-void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
+void CResult_PayeePubKeySecp256k1ErrorZ_free(struct LDKCResult_PayeePubKeySecp256k1ErrorZ _res);
 
 /**
- * Creates a new CResult_PayeePubKeyErrorZ which has the same data as `orig`
+ * Creates a new CResult_PayeePubKeySecp256k1ErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
+struct LDKCResult_PayeePubKeySecp256k1ErrorZ CResult_PayeePubKeySecp256k1ErrorZ_clone(const struct LDKCResult_PayeePubKeySecp256k1ErrorZ *NONNULL_PTR orig);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
@@ -24659,11 +31772,6 @@ void CResult_Bolt11InvoiceBolt11SemanticErrorZ_free(struct LDKCResult_Bolt11Invo
  */
 struct LDKCResult_Bolt11InvoiceBolt11SemanticErrorZ CResult_Bolt11InvoiceBolt11SemanticErrorZ_clone(const struct LDKCResult_Bolt11InvoiceBolt11SemanticErrorZ *NONNULL_PTR orig);
 
-/**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
- */
-void CVec_AddressZ_free(struct LDKCVec_AddressZ _res);
-
 /**
  * Creates a new CResult_DescriptionCreationErrorZ in the success state.
  */
@@ -24873,82 +31981,270 @@ void CResult_UntrustedStringDecodeErrorZ_free(struct LDKCResult_UntrustedStringD
 struct LDKCResult_UntrustedStringDecodeErrorZ CResult_UntrustedStringDecodeErrorZ_clone(const struct LDKCResult_UntrustedStringDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_PaymentIdPaymentErrorZ in the success state.
+ * Creates a new CResult_ChannelIdDecodeErrorZ in the success state.
  */
-struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_ok(struct LDKThirtyTwoBytes o);
+struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_ok(struct LDKChannelId o);
 
 /**
- * Creates a new CResult_PaymentIdPaymentErrorZ in the error state.
+ * Creates a new CResult_ChannelIdDecodeErrorZ in the error state.
  */
-struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_err(struct LDKPaymentError e);
+struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_PaymentIdPaymentErrorZ_is_ok(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR o);
+bool CResult_ChannelIdDecodeErrorZ_is_ok(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_PaymentIdPaymentErrorZ.
+ * Frees any resources used by the CResult_ChannelIdDecodeErrorZ.
  */
-void CResult_PaymentIdPaymentErrorZ_free(struct LDKCResult_PaymentIdPaymentErrorZ _res);
+void CResult_ChannelIdDecodeErrorZ_free(struct LDKCResult_ChannelIdDecodeErrorZ _res);
 
 /**
- * Creates a new CResult_PaymentIdPaymentErrorZ which has the same data as `orig`
+ * Creates a new CResult_ChannelIdDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_clone(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR orig);
+struct LDKCResult_ChannelIdDecodeErrorZ CResult_ChannelIdDecodeErrorZ_clone(const struct LDKCResult_ChannelIdDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC2Tuple__u832u16Z C2Tuple__u832u16Z_clone(const struct LDKC2Tuple__u832u16Z *NONNULL_PTR orig);
+
+/**
+ * Creates a new C2Tuple__u832u16Z from the contained elements.
+ */
+struct LDKC2Tuple__u832u16Z C2Tuple__u832u16Z_new(struct LDKThirtyTwoBytes a, uint16_t b);
 
 /**
- * Creates a new CResult_NonePaymentErrorZ in the success state.
+ * Frees any resources used by the C2Tuple__u832u16Z.
  */
-struct LDKCResult_NonePaymentErrorZ CResult_NonePaymentErrorZ_ok(void);
+void C2Tuple__u832u16Z_free(struct LDKC2Tuple__u832u16Z _res);
 
 /**
- * Creates a new CResult_NonePaymentErrorZ in the error state.
+ * Creates a new CResult_PaymentRelayDecodeErrorZ in the success state.
  */
-struct LDKCResult_NonePaymentErrorZ CResult_NonePaymentErrorZ_err(struct LDKPaymentError e);
+struct LDKCResult_PaymentRelayDecodeErrorZ CResult_PaymentRelayDecodeErrorZ_ok(struct LDKPaymentRelay o);
+
+/**
+ * Creates a new CResult_PaymentRelayDecodeErrorZ in the error state.
+ */
+struct LDKCResult_PaymentRelayDecodeErrorZ CResult_PaymentRelayDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_NonePaymentErrorZ_is_ok(const struct LDKCResult_NonePaymentErrorZ *NONNULL_PTR o);
+bool CResult_PaymentRelayDecodeErrorZ_is_ok(const struct LDKCResult_PaymentRelayDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_NonePaymentErrorZ.
+ * Frees any resources used by the CResult_PaymentRelayDecodeErrorZ.
  */
-void CResult_NonePaymentErrorZ_free(struct LDKCResult_NonePaymentErrorZ _res);
+void CResult_PaymentRelayDecodeErrorZ_free(struct LDKCResult_PaymentRelayDecodeErrorZ _res);
 
 /**
- * Creates a new CResult_NonePaymentErrorZ which has the same data as `orig`
+ * Creates a new CResult_PaymentRelayDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_NonePaymentErrorZ CResult_NonePaymentErrorZ_clone(const struct LDKCResult_NonePaymentErrorZ *NONNULL_PTR orig);
+struct LDKCResult_PaymentRelayDecodeErrorZ CResult_PaymentRelayDecodeErrorZ_clone(const struct LDKCResult_PaymentRelayDecodeErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_StringErrorZ in the success state.
+ * Creates a new CResult_PaymentConstraintsDecodeErrorZ in the success state.
  */
-struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
+struct LDKCResult_PaymentConstraintsDecodeErrorZ CResult_PaymentConstraintsDecodeErrorZ_ok(struct LDKPaymentConstraints o);
 
 /**
- * Creates a new CResult_StringErrorZ in the error state.
+ * Creates a new CResult_PaymentConstraintsDecodeErrorZ in the error state.
  */
-struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
+struct LDKCResult_PaymentConstraintsDecodeErrorZ CResult_PaymentConstraintsDecodeErrorZ_err(struct LDKDecodeError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_StringErrorZ_is_ok(const struct LDKCResult_StringErrorZ *NONNULL_PTR o);
+bool CResult_PaymentConstraintsDecodeErrorZ_is_ok(const struct LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_StringErrorZ.
+ * Frees any resources used by the CResult_PaymentConstraintsDecodeErrorZ.
  */
-void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
+void CResult_PaymentConstraintsDecodeErrorZ_free(struct LDKCResult_PaymentConstraintsDecodeErrorZ _res);
 
 /**
- * Creates a new CResult_StringErrorZ which has the same data as `orig`
+ * Creates a new CResult_PaymentConstraintsDecodeErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_StringErrorZ CResult_StringErrorZ_clone(const struct LDKCResult_StringErrorZ *NONNULL_PTR orig);
+struct LDKCResult_PaymentConstraintsDecodeErrorZ CResult_PaymentConstraintsDecodeErrorZ_clone(const struct LDKCResult_PaymentConstraintsDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_PaymentContextDecodeErrorZ in the success state.
+ */
+struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_ok(struct LDKPaymentContext o);
+
+/**
+ * Creates a new CResult_PaymentContextDecodeErrorZ in the error state.
+ */
+struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_PaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_PaymentContextDecodeErrorZ.
+ */
+void CResult_PaymentContextDecodeErrorZ_free(struct LDKCResult_PaymentContextDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_PaymentContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_PaymentContextDecodeErrorZ CResult_PaymentContextDecodeErrorZ_clone(const struct LDKCResult_PaymentContextDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the success state.
+ */
+struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_ok(struct LDKUnknownPaymentContext o);
+
+/**
+ * Creates a new CResult_UnknownPaymentContextDecodeErrorZ in the error state.
+ */
+struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_UnknownPaymentContextDecodeErrorZ_is_ok(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_UnknownPaymentContextDecodeErrorZ.
+ */
+void CResult_UnknownPaymentContextDecodeErrorZ_free(struct LDKCResult_UnknownPaymentContextDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_UnknownPaymentContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_UnknownPaymentContextDecodeErrorZ CResult_UnknownPaymentContextDecodeErrorZ_clone(const struct LDKCResult_UnknownPaymentContextDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the success state.
+ */
+struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_ok(struct LDKBolt12OfferContext o);
+
+/**
+ * Creates a new CResult_Bolt12OfferContextDecodeErrorZ in the error state.
+ */
+struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_Bolt12OfferContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_Bolt12OfferContextDecodeErrorZ.
+ */
+void CResult_Bolt12OfferContextDecodeErrorZ_free(struct LDKCResult_Bolt12OfferContextDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_Bolt12OfferContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_Bolt12OfferContextDecodeErrorZ CResult_Bolt12OfferContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12OfferContextDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the success state.
+ */
+struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_ok(struct LDKBolt12RefundContext o);
+
+/**
+ * Creates a new CResult_Bolt12RefundContextDecodeErrorZ in the error state.
+ */
+struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_Bolt12RefundContextDecodeErrorZ_is_ok(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_Bolt12RefundContextDecodeErrorZ.
+ */
+void CResult_Bolt12RefundContextDecodeErrorZ_free(struct LDKCResult_Bolt12RefundContextDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_Bolt12RefundContextDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_Bolt12RefundContextDecodeErrorZ CResult_Bolt12RefundContextDecodeErrorZ_clone(const struct LDKCResult_Bolt12RefundContextDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_StrSecp256k1ErrorZ in the success state.
+ */
+struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_ok(struct LDKStr o);
+
+/**
+ * Creates a new CResult_StrSecp256k1ErrorZ in the error state.
+ */
+struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_err(enum LDKSecp256k1Error e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_StrSecp256k1ErrorZ_is_ok(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_StrSecp256k1ErrorZ.
+ */
+void CResult_StrSecp256k1ErrorZ_free(struct LDKCResult_StrSecp256k1ErrorZ _res);
+
+/**
+ * Creates a new CResult_StrSecp256k1ErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_StrSecp256k1ErrorZ CResult_StrSecp256k1ErrorZ_clone(const struct LDKCResult_StrSecp256k1ErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_clone(const struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ from the contained elements.
+ */
+struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_new(struct LDKThirtyTwoBytes a, struct LDKRecipientOnionFields b, struct LDKRouteParameters c);
+
+/**
+ * Frees any resources used by the C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ.
+ */
+void C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ_free(struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ _res);
+
+/**
+ * Creates a new CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ in the success state.
+ */
+struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_ok(struct LDKC3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZ o);
+
+/**
+ * Creates a new CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ in the error state.
+ */
+struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_is_ok(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ.
+ */
+void CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_free(struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ _res);
+
+/**
+ * Creates a new CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ CResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ_clone(const struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ *NONNULL_PTR orig);
 
 /**
  * Creates a new CResult_TxOutUtxoLookupErrorZ in the success state.
@@ -24977,50 +32273,98 @@ void CResult_TxOutUtxoLookupErrorZ_free(struct LDKCResult_TxOutUtxoLookupErrorZ
 struct LDKCResult_TxOutUtxoLookupErrorZ CResult_TxOutUtxoLookupErrorZ_clone(const struct LDKCResult_TxOutUtxoLookupErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_OnionMessagePathNoneZ in the success state.
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_ok(struct LDKOnionMessagePath o);
+struct LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_clone(const struct LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_OnionMessagePathNoneZ in the error state.
+ * Creates a new C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ from the contained elements.
  */
-struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_err(void);
+struct LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_new(struct LDKPublicKey a, struct LDKOnionMessage b, struct LDKCOption_CVec_SocketAddressZZ c);
+
+/**
+ * Frees any resources used by the C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ.
+ */
+void C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ_free(struct LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ _res);
+
+/**
+ * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ in the success state.
+ */
+struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_ok(struct LDKC3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZ o);
+
+/**
+ * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ in the error state.
+ */
+struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_err(struct LDKSendError e);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_OnionMessagePathNoneZ_is_ok(const struct LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR o);
+bool CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_is_ok(const struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_OnionMessagePathNoneZ.
+ * Frees any resources used by the CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ.
  */
-void CResult_OnionMessagePathNoneZ_free(struct LDKCResult_OnionMessagePathNoneZ _res);
+void CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_free(struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ _res);
 
 /**
- * Creates a new CResult_OnionMessagePathNoneZ which has the same data as `orig`
+ * Creates a new CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_OnionMessagePathNoneZ CResult_OnionMessagePathNoneZ_clone(const struct LDKCResult_OnionMessagePathNoneZ *NONNULL_PTR orig);
+struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ CResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ_clone(const struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ *NONNULL_PTR orig);
 
 /**
- * Creates a new CResult_NoneSendErrorZ in the success state.
+ * Creates a new CResult_PeeledOnionNoneZ in the success state.
  */
-struct LDKCResult_NoneSendErrorZ CResult_NoneSendErrorZ_ok(void);
+struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_ok(struct LDKPeeledOnion o);
 
 /**
- * Creates a new CResult_NoneSendErrorZ in the error state.
+ * Creates a new CResult_PeeledOnionNoneZ in the error state.
  */
-struct LDKCResult_NoneSendErrorZ CResult_NoneSendErrorZ_err(struct LDKSendError e);
+struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_NoneSendErrorZ_is_ok(const struct LDKCResult_NoneSendErrorZ *NONNULL_PTR o);
+bool CResult_PeeledOnionNoneZ_is_ok(const struct LDKCResult_PeeledOnionNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_PeeledOnionNoneZ.
+ */
+void CResult_PeeledOnionNoneZ_free(struct LDKCResult_PeeledOnionNoneZ _res);
 
 /**
- * Frees any resources used by the CResult_NoneSendErrorZ.
+ * Creates a new CResult_PeeledOnionNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_PeeledOnionNoneZ CResult_PeeledOnionNoneZ_clone(const struct LDKCResult_PeeledOnionNoneZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_SendSuccessSendErrorZ in the success state.
+ */
+struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_ok(struct LDKSendSuccess o);
+
+/**
+ * Creates a new CResult_SendSuccessSendErrorZ in the error state.
+ */
+struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_err(struct LDKSendError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_SendSuccessSendErrorZ_is_ok(const struct LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_SendSuccessSendErrorZ.
+ */
+void CResult_SendSuccessSendErrorZ_free(struct LDKCResult_SendSuccessSendErrorZ _res);
+
+/**
+ * Creates a new CResult_SendSuccessSendErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void CResult_NoneSendErrorZ_free(struct LDKCResult_NoneSendErrorZ _res);
+struct LDKCResult_SendSuccessSendErrorZ CResult_SendSuccessSendErrorZ_clone(const struct LDKCResult_SendSuccessSendErrorZ *NONNULL_PTR orig);
 
 /**
  * Creates a new CResult_BlindedPathNoneZ in the success state.
@@ -25048,6 +32392,37 @@ void CResult_BlindedPathNoneZ_free(struct LDKCResult_BlindedPathNoneZ _res);
  */
 struct LDKCResult_BlindedPathNoneZ CResult_BlindedPathNoneZ_clone(const struct LDKCResult_BlindedPathNoneZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ in the success state.
+ */
+struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_ok(struct LDKC2Tuple_BlindedPayInfoBlindedPathZ o);
+
+/**
+ * Creates a new CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ in the error state.
+ */
+struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_is_ok(const struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ.
+ */
+void CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_free(struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ _res);
+
+/**
+ * Creates a new CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ CResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ_clone(const struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ *NONNULL_PTR orig);
+
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_ForwardNodeZ_free(struct LDKCVec_ForwardNodeZ _res);
+
 /**
  * Creates a new CResult_BlindedPathDecodeErrorZ in the success state.
  */
@@ -25126,6 +32501,58 @@ void CResult_InvoiceErrorDecodeErrorZ_free(struct LDKCResult_InvoiceErrorDecodeE
  */
 struct LDKCResult_InvoiceErrorDecodeErrorZ CResult_InvoiceErrorDecodeErrorZ_clone(const struct LDKCResult_InvoiceErrorDecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the success state.
+ */
+struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_ok(struct LDKTrackedSpendableOutput o);
+
+/**
+ * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ in the error state.
+ */
+struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_TrackedSpendableOutputDecodeErrorZ_is_ok(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_TrackedSpendableOutputDecodeErrorZ.
+ */
+void CResult_TrackedSpendableOutputDecodeErrorZ_free(struct LDKCResult_TrackedSpendableOutputDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_TrackedSpendableOutputDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_TrackedSpendableOutputDecodeErrorZ CResult_TrackedSpendableOutputDecodeErrorZ_clone(const struct LDKCResult_TrackedSpendableOutputDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the success state.
+ */
+struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_ok(struct LDKOutputSpendStatus o);
+
+/**
+ * Creates a new CResult_OutputSpendStatusDecodeErrorZ in the error state.
+ */
+struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_OutputSpendStatusDecodeErrorZ_is_ok(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_OutputSpendStatusDecodeErrorZ.
+ */
+void CResult_OutputSpendStatusDecodeErrorZ_free(struct LDKCResult_OutputSpendStatusDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_OutputSpendStatusDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_OutputSpendStatusDecodeErrorZ CResult_OutputSpendStatusDecodeErrorZ_clone(const struct LDKCResult_OutputSpendStatusDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Constructs a new COption_FilterZ containing a crate::lightning::chain::Filter
  */
@@ -25141,6 +32568,217 @@ struct LDKCOption_FilterZ COption_FilterZ_none(void);
  */
 void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
 
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_TrackedSpendableOutputZ_free(struct LDKCVec_TrackedSpendableOutputZ _res);
+
+/**
+ * Creates a new CResult_OutputSweeperDecodeErrorZ in the success state.
+ */
+struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_ok(struct LDKOutputSweeper o);
+
+/**
+ * Creates a new CResult_OutputSweeperDecodeErrorZ in the error state.
+ */
+struct LDKCResult_OutputSweeperDecodeErrorZ CResult_OutputSweeperDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_OutputSweeperDecodeErrorZ_is_ok(const struct LDKCResult_OutputSweeperDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_OutputSweeperDecodeErrorZ.
+ */
+void CResult_OutputSweeperDecodeErrorZ_free(struct LDKCResult_OutputSweeperDecodeErrorZ _res);
+
+/**
+ * Creates a new C2Tuple_BestBlockOutputSweeperZ from the contained elements.
+ */
+struct LDKC2Tuple_BestBlockOutputSweeperZ C2Tuple_BestBlockOutputSweeperZ_new(struct LDKBestBlock a, struct LDKOutputSweeper b);
+
+/**
+ * Frees any resources used by the C2Tuple_BestBlockOutputSweeperZ.
+ */
+void C2Tuple_BestBlockOutputSweeperZ_free(struct LDKC2Tuple_BestBlockOutputSweeperZ _res);
+
+/**
+ * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the success state.
+ */
+struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_ok(struct LDKC2Tuple_BestBlockOutputSweeperZ o);
+
+/**
+ * Creates a new CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ in the error state.
+ */
+struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ.
+ */
+void CResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_DelayedPaymentBasepointDecodeErrorZ in the success state.
+ */
+struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_ok(struct LDKDelayedPaymentBasepoint o);
+
+/**
+ * Creates a new CResult_DelayedPaymentBasepointDecodeErrorZ in the error state.
+ */
+struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_DelayedPaymentBasepointDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_DelayedPaymentBasepointDecodeErrorZ.
+ */
+void CResult_DelayedPaymentBasepointDecodeErrorZ_free(struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_DelayedPaymentBasepointDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ CResult_DelayedPaymentBasepointDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_DelayedPaymentKeyDecodeErrorZ in the success state.
+ */
+struct LDKCResult_DelayedPaymentKeyDecodeErrorZ CResult_DelayedPaymentKeyDecodeErrorZ_ok(struct LDKDelayedPaymentKey o);
+
+/**
+ * Creates a new CResult_DelayedPaymentKeyDecodeErrorZ in the error state.
+ */
+struct LDKCResult_DelayedPaymentKeyDecodeErrorZ CResult_DelayedPaymentKeyDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_DelayedPaymentKeyDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_DelayedPaymentKeyDecodeErrorZ.
+ */
+void CResult_DelayedPaymentKeyDecodeErrorZ_free(struct LDKCResult_DelayedPaymentKeyDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_DelayedPaymentKeyDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_DelayedPaymentKeyDecodeErrorZ CResult_DelayedPaymentKeyDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentKeyDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_HtlcBasepointDecodeErrorZ in the success state.
+ */
+struct LDKCResult_HtlcBasepointDecodeErrorZ CResult_HtlcBasepointDecodeErrorZ_ok(struct LDKHtlcBasepoint o);
+
+/**
+ * Creates a new CResult_HtlcBasepointDecodeErrorZ in the error state.
+ */
+struct LDKCResult_HtlcBasepointDecodeErrorZ CResult_HtlcBasepointDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_HtlcBasepointDecodeErrorZ_is_ok(const struct LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_HtlcBasepointDecodeErrorZ.
+ */
+void CResult_HtlcBasepointDecodeErrorZ_free(struct LDKCResult_HtlcBasepointDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_HtlcBasepointDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_HtlcBasepointDecodeErrorZ CResult_HtlcBasepointDecodeErrorZ_clone(const struct LDKCResult_HtlcBasepointDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_HtlcKeyDecodeErrorZ in the success state.
+ */
+struct LDKCResult_HtlcKeyDecodeErrorZ CResult_HtlcKeyDecodeErrorZ_ok(struct LDKHtlcKey o);
+
+/**
+ * Creates a new CResult_HtlcKeyDecodeErrorZ in the error state.
+ */
+struct LDKCResult_HtlcKeyDecodeErrorZ CResult_HtlcKeyDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_HtlcKeyDecodeErrorZ_is_ok(const struct LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_HtlcKeyDecodeErrorZ.
+ */
+void CResult_HtlcKeyDecodeErrorZ_free(struct LDKCResult_HtlcKeyDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_HtlcKeyDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_HtlcKeyDecodeErrorZ CResult_HtlcKeyDecodeErrorZ_clone(const struct LDKCResult_HtlcKeyDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_RevocationBasepointDecodeErrorZ in the success state.
+ */
+struct LDKCResult_RevocationBasepointDecodeErrorZ CResult_RevocationBasepointDecodeErrorZ_ok(struct LDKRevocationBasepoint o);
+
+/**
+ * Creates a new CResult_RevocationBasepointDecodeErrorZ in the error state.
+ */
+struct LDKCResult_RevocationBasepointDecodeErrorZ CResult_RevocationBasepointDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_RevocationBasepointDecodeErrorZ_is_ok(const struct LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_RevocationBasepointDecodeErrorZ.
+ */
+void CResult_RevocationBasepointDecodeErrorZ_free(struct LDKCResult_RevocationBasepointDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_RevocationBasepointDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_RevocationBasepointDecodeErrorZ CResult_RevocationBasepointDecodeErrorZ_clone(const struct LDKCResult_RevocationBasepointDecodeErrorZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_RevocationKeyDecodeErrorZ in the success state.
+ */
+struct LDKCResult_RevocationKeyDecodeErrorZ CResult_RevocationKeyDecodeErrorZ_ok(struct LDKRevocationKey o);
+
+/**
+ * Creates a new CResult_RevocationKeyDecodeErrorZ in the error state.
+ */
+struct LDKCResult_RevocationKeyDecodeErrorZ CResult_RevocationKeyDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_RevocationKeyDecodeErrorZ_is_ok(const struct LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_RevocationKeyDecodeErrorZ.
+ */
+void CResult_RevocationKeyDecodeErrorZ_free(struct LDKCResult_RevocationKeyDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_RevocationKeyDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_RevocationKeyDecodeErrorZ CResult_RevocationKeyDecodeErrorZ_clone(const struct LDKCResult_RevocationKeyDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_LockedChannelMonitorNoneZ in the success state.
  */
@@ -25161,10 +32799,26 @@ bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChann
  */
 void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
 
+/**
+ * Creates a new tuple which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_clone(const struct LDKC2Tuple_OutPointChannelIdZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements.
+ */
+struct LDKC2Tuple_OutPointChannelIdZ C2Tuple_OutPointChannelIdZ_new(struct LDKOutPoint a, struct LDKChannelId b);
+
+/**
+ * Frees any resources used by the C2Tuple_OutPointChannelIdZ.
+ */
+void C2Tuple_OutPointChannelIdZ_free(struct LDKC2Tuple_OutPointChannelIdZ _res);
+
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
+void CVec_C2Tuple_OutPointChannelIdZZ_free(struct LDKCVec_C2Tuple_OutPointChannelIdZZ _res);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
@@ -25299,6 +32953,11 @@ void Hostname_free(struct LDKHostname this_obj);
  */
 struct LDKHostname Hostname_clone(const struct LDKHostname *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the Hostname.
+ */
+uint64_t Hostname_hash(const struct LDKHostname *NONNULL_PTR o);
+
 /**
  * Checks if two Hostnames contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -25331,6 +32990,11 @@ void TransactionU16LenLimited_free(struct LDKTransactionU16LenLimited this_obj);
  */
 struct LDKTransactionU16LenLimited TransactionU16LenLimited_clone(const struct LDKTransactionU16LenLimited *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TransactionU16LenLimited.
+ */
+uint64_t TransactionU16LenLimited_hash(const struct LDKTransactionU16LenLimited *NONNULL_PTR o);
+
 /**
  * Checks if two TransactionU16LenLimiteds contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -25349,6 +33013,11 @@ MUST_USE_RES struct LDKCResult_TransactionU16LenLimitedNoneZ TransactionU16LenLi
  */
 MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_into_transaction(struct LDKTransactionU16LenLimited this_arg);
 
+/**
+ * Returns a reference to the contained `Transaction`
+ */
+MUST_USE_RES struct LDKTransaction TransactionU16LenLimited_as_transaction(const struct LDKTransactionU16LenLimited *NONNULL_PTR this_arg);
+
 /**
  * Serialize the TransactionU16LenLimited object into a byte array which can be read by TransactionU16LenLimited_read
  */
@@ -25364,12 +33033,12 @@ struct LDKCResult_TransactionU16LenLimitedDecodeErrorZ TransactionU16LenLimited_
  * A receiver knowing the PublicKey (e.g. the node's id) and the message can be sure that the signature was generated by the caller.
  * Signatures are EC recoverable, meaning that given the message and the signature the PublicKey of the signer can be extracted.
  */
-struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
+struct LDKCResult_StrSecp256k1ErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
 
 /**
  * Recovers the PublicKey of the signer of the message given the message and the signature.
  */
-struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
+struct LDKCResult_PublicKeySecp256k1ErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
 
 /**
  * Verifies a message was signed by a PrivateKey that derives to a given PublicKey, given a message, a signature,
@@ -25382,11 +33051,139 @@ bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
  */
 struct LDKCVec_u8Z construct_invoice_preimage(struct LDKu8slice hrp_bytes, struct LDKCVec_U5Z data_without_signature);
 
+/**
+ * Calls the free function if one is set
+ */
+void KVStore_free(struct LDKKVStore this_ptr);
+
 /**
  * Calls the free function if one is set
  */
 void Persister_free(struct LDKPersister this_ptr);
 
+/**
+ * Read previously persisted [`ChannelMonitor`]s from the store.
+ */
+struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ read_channel_monitors(struct LDKKVStore kv_store, struct LDKEntropySource entropy_source, struct LDKSignerProvider signer_provider);
+
+/**
+ * Frees any resources used by the MonitorUpdatingPersister, if is_owned is set and inner is non-NULL.
+ */
+void MonitorUpdatingPersister_free(struct LDKMonitorUpdatingPersister this_obj);
+
+/**
+ * Constructs a new [`MonitorUpdatingPersister`].
+ *
+ * The `maximum_pending_updates` parameter controls how many updates may be stored before a
+ * [`MonitorUpdatingPersister`] consolidates updates by writing a full monitor. Note that
+ * consolidation will frequently occur with fewer updates than what you set here; this number
+ * is merely the maximum that may be stored. When setting this value, consider that for higher
+ * values of `maximum_pending_updates`:
+ *
+ *   - [`MonitorUpdatingPersister`] will tend to write more [`ChannelMonitorUpdate`]s than
+ * [`ChannelMonitor`]s, approaching one [`ChannelMonitor`] write for every
+ * `maximum_pending_updates` [`ChannelMonitorUpdate`]s.
+ *   - [`MonitorUpdatingPersister`] will issue deletes differently. Lazy deletes will come in
+ * \"waves\" for each [`ChannelMonitor`] write. A larger `maximum_pending_updates` means bigger,
+ * less frequent \"waves.\"
+ *   - [`MonitorUpdatingPersister`] will potentially have more listing to do if you need to run
+ * [`MonitorUpdatingPersister::cleanup_stale_updates`].
+ */
+MUST_USE_RES struct LDKMonitorUpdatingPersister MonitorUpdatingPersister_new(struct LDKKVStore kv_store, struct LDKLogger logger, uint64_t maximum_pending_updates, struct LDKEntropySource entropy_source, struct LDKSignerProvider signer_provider);
+
+/**
+ * Reads all stored channel monitors, along with any stored updates for them.
+ *
+ * It is extremely important that your [`KVStore::read`] implementation uses the
+ * [`io::ErrorKind::NotFound`] variant correctly. For more information, please see the
+ * documentation for [`MonitorUpdatingPersister`].
+ */
+MUST_USE_RES struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ MonitorUpdatingPersister_read_all_channel_monitors_with_updates(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator);
+
+/**
+ * Read a single channel monitor, along with any stored updates for it.
+ *
+ * It is extremely important that your [`KVStore::read`] implementation uses the
+ * [`io::ErrorKind::NotFound`] variant correctly. For more information, please see the
+ * documentation for [`MonitorUpdatingPersister`].
+ *
+ * For `monitor_key`, channel storage keys be the channel's transaction ID and index, or
+ * [`OutPoint`], with an underscore `_` between them. For example, given:
+ *
+ *   - Transaction ID: `deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef`
+ *   - Index: `1`
+ *
+ * The correct `monitor_key` would be:
+ * `deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef_1`
+ *
+ * Loading a large number of monitors will be faster if done in parallel. You can use this
+ * function to accomplish this. Take care to limit the number of parallel readers.
+ */
+MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ MonitorUpdatingPersister_read_channel_monitor_with_updates(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, struct LDKStr monitor_key);
+
+/**
+ * Cleans up stale updates for all monitors.
+ *
+ * This function works by first listing all monitors, and then for each of them, listing all
+ * updates. The updates that have an `update_id` less than or equal to than the stored monitor
+ * are deleted. The deletion can either be lazy or non-lazy based on the `lazy` flag; this will
+ * be passed to [`KVStore::remove`].
+ */
+MUST_USE_RES struct LDKCResult_NoneIOErrorZ MonitorUpdatingPersister_cleanup_stale_updates(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg, bool lazy);
+
+/**
+ * Constructs a new Persist which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Persist must be freed before this_arg is
+ */
+struct LDKPersist MonitorUpdatingPersister_as_Persist(const struct LDKMonitorUpdatingPersister *NONNULL_PTR this_arg);
+
+/**
+ * Creates a copy of the ShortChannelIdError
+ */
+enum LDKShortChannelIdError ShortChannelIdError_clone(const enum LDKShortChannelIdError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new BlockOverflow-variant ShortChannelIdError
+ */
+enum LDKShortChannelIdError ShortChannelIdError_block_overflow(void);
+
+/**
+ * Utility method to constructs a new TxIndexOverflow-variant ShortChannelIdError
+ */
+enum LDKShortChannelIdError ShortChannelIdError_tx_index_overflow(void);
+
+/**
+ * Utility method to constructs a new VoutIndexOverflow-variant ShortChannelIdError
+ */
+enum LDKShortChannelIdError ShortChannelIdError_vout_index_overflow(void);
+
+/**
+ * Checks if two ShortChannelIdErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool ShortChannelIdError_eq(const enum LDKShortChannelIdError *NONNULL_PTR a, const enum LDKShortChannelIdError *NONNULL_PTR b);
+
+/**
+ * Extracts the block height (most significant 3-bytes) from the `short_channel_id`
+ */
+uint32_t block_from_scid(uint64_t short_channel_id);
+
+/**
+ * Extracts the tx index (bytes [2..4]) from the `short_channel_id`
+ */
+uint32_t tx_index_from_scid(uint64_t short_channel_id);
+
+/**
+ * Extracts the vout (bytes [0..2]) from the `short_channel_id`
+ */
+uint16_t vout_from_scid(uint64_t short_channel_id);
+
+/**
+ * Constructs a `short_channel_id` using the components pieces. Results in an error
+ * if the block height, tx index, or vout index overflow the maximum sizes.
+ */
+struct LDKCResult_u64ShortChannelIdErrorZ scid_from_parts(uint64_t block, uint64_t tx_index, uint64_t vout_index);
+
 /**
  * Frees any resources used by the UntrustedString, if is_owned is set and inner is non-NULL.
  */
@@ -25413,6 +33210,11 @@ struct LDKUntrustedString UntrustedString_clone(const struct LDKUntrustedString
  */
 bool UntrustedString_eq(const struct LDKUntrustedString *NONNULL_PTR a, const struct LDKUntrustedString *NONNULL_PTR b);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UntrustedString.
+ */
+uint64_t UntrustedString_hash(const struct LDKUntrustedString *NONNULL_PTR o);
+
 /**
  * Serialize the UntrustedString object into a byte array which can be read by UntrustedString_read
  */
@@ -25437,6 +33239,211 @@ void PrintableString_set_a(struct LDKPrintableString *NONNULL_PTR this_ptr, stru
  */
 MUST_USE_RES struct LDKPrintableString PrintableString_new(struct LDKStr a_arg);
 
+/**
+ * Frees any resources used by the TrackedSpendableOutput, if is_owned is set and inner is non-NULL.
+ */
+void TrackedSpendableOutput_free(struct LDKTrackedSpendableOutput this_obj);
+
+/**
+ * The tracked output descriptor.
+ */
+struct LDKSpendableOutputDescriptor TrackedSpendableOutput_get_descriptor(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+
+/**
+ * The tracked output descriptor.
+ */
+void TrackedSpendableOutput_set_descriptor(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKSpendableOutputDescriptor val);
+
+/**
+ * The channel this output belongs to.
+ *
+ * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`]
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelId TrackedSpendableOutput_get_channel_id(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+
+/**
+ * The channel this output belongs to.
+ *
+ * Will be `None` if no `channel_id` was given to [`OutputSweeper::track_spendable_outputs`]
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void TrackedSpendableOutput_set_channel_id(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
+
+/**
+ * The current status of the output spend.
+ */
+struct LDKOutputSpendStatus TrackedSpendableOutput_get_status(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr);
+
+/**
+ * The current status of the output spend.
+ */
+void TrackedSpendableOutput_set_status(struct LDKTrackedSpendableOutput *NONNULL_PTR this_ptr, struct LDKOutputSpendStatus val);
+
+/**
+ * Constructs a new TrackedSpendableOutput given each field
+ *
+ * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKTrackedSpendableOutput TrackedSpendableOutput_new(struct LDKSpendableOutputDescriptor descriptor_arg, struct LDKChannelId channel_id_arg, struct LDKOutputSpendStatus status_arg);
+
+/**
+ * Creates a copy of the TrackedSpendableOutput
+ */
+struct LDKTrackedSpendableOutput TrackedSpendableOutput_clone(const struct LDKTrackedSpendableOutput *NONNULL_PTR orig);
+
+/**
+ * Checks if two TrackedSpendableOutputs contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool TrackedSpendableOutput_eq(const struct LDKTrackedSpendableOutput *NONNULL_PTR a, const struct LDKTrackedSpendableOutput *NONNULL_PTR b);
+
+/**
+ * Returns whether the output is spent in the given transaction.
+ */
+MUST_USE_RES bool TrackedSpendableOutput_is_spent_in(const struct LDKTrackedSpendableOutput *NONNULL_PTR this_arg, struct LDKTransaction tx);
+
+/**
+ * Serialize the TrackedSpendableOutput object into a byte array which can be read by TrackedSpendableOutput_read
+ */
+struct LDKCVec_u8Z TrackedSpendableOutput_write(const struct LDKTrackedSpendableOutput *NONNULL_PTR obj);
+
+/**
+ * Read a TrackedSpendableOutput from a byte array, created by TrackedSpendableOutput_write
+ */
+struct LDKCResult_TrackedSpendableOutputDecodeErrorZ TrackedSpendableOutput_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the OutputSpendStatus
+ */
+void OutputSpendStatus_free(struct LDKOutputSpendStatus this_ptr);
+
+/**
+ * Creates a copy of the OutputSpendStatus
+ */
+struct LDKOutputSpendStatus OutputSpendStatus_clone(const struct LDKOutputSpendStatus *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new PendingInitialBroadcast-variant OutputSpendStatus
+ */
+struct LDKOutputSpendStatus OutputSpendStatus_pending_initial_broadcast(struct LDKCOption_u32Z delayed_until_height);
+
+/**
+ * Utility method to constructs a new PendingFirstConfirmation-variant OutputSpendStatus
+ */
+struct LDKOutputSpendStatus OutputSpendStatus_pending_first_confirmation(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx);
+
+/**
+ * Utility method to constructs a new PendingThresholdConfirmations-variant OutputSpendStatus
+ */
+struct LDKOutputSpendStatus OutputSpendStatus_pending_threshold_confirmations(struct LDKThirtyTwoBytes first_broadcast_hash, uint32_t latest_broadcast_height, struct LDKTransaction latest_spending_tx, uint32_t confirmation_height, struct LDKThirtyTwoBytes confirmation_hash);
+
+/**
+ * Checks if two OutputSpendStatuss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool OutputSpendStatus_eq(const struct LDKOutputSpendStatus *NONNULL_PTR a, const struct LDKOutputSpendStatus *NONNULL_PTR b);
+
+/**
+ * Serialize the OutputSpendStatus object into a byte array which can be read by OutputSpendStatus_read
+ */
+struct LDKCVec_u8Z OutputSpendStatus_write(const struct LDKOutputSpendStatus *NONNULL_PTR obj);
+
+/**
+ * Read a OutputSpendStatus from a byte array, created by OutputSpendStatus_write
+ */
+struct LDKCResult_OutputSpendStatusDecodeErrorZ OutputSpendStatus_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the OutputSweeper, if is_owned is set and inner is non-NULL.
+ */
+void OutputSweeper_free(struct LDKOutputSweeper this_obj);
+
+/**
+ * Constructs a new [`OutputSweeper`].
+ *
+ * If chain data is provided via the [`Confirm`] interface or via filtered blocks, users also
+ * need to register their [`Filter`] implementation via the given `chain_data_source`.
+ */
+MUST_USE_RES struct LDKOutputSweeper OutputSweeper_new(struct LDKBestBlock best_block, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKCOption_FilterZ chain_data_source, struct LDKOutputSpender output_spender, struct LDKChangeDestinationSource change_destination_source, struct LDKKVStore kv_store, struct LDKLogger logger);
+
+/**
+ * Tells the sweeper to track the given outputs descriptors.
+ *
+ * Usually, this should be called based on the values emitted by the
+ * [`Event::SpendableOutputs`].
+ *
+ * The given `exclude_static_outputs` flag controls whether the sweeper will filter out
+ * [`SpendableOutputDescriptor::StaticOutput`]s, which may be handled directly by the on-chain
+ * wallet implementation.
+ *
+ * If `delay_until_height` is set, we will delay the spending until the respective block
+ * height is reached. This can be used to batch spends, e.g., to reduce on-chain fees.
+ *
+ * Returns `Err` on persistence failure, in which case the call may be safely retried.
+ *
+ * [`Event::SpendableOutputs`]: crate::events::Event::SpendableOutputs
+ *
+ * Note that channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ OutputSweeper_track_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ output_descriptors, struct LDKChannelId channel_id, bool exclude_static_outputs, struct LDKCOption_u32Z delay_until_height);
+
+/**
+ * Returns a list of the currently tracked spendable outputs.
+ */
+MUST_USE_RES struct LDKCVec_TrackedSpendableOutputZ OutputSweeper_tracked_spendable_outputs(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+
+/**
+ * Gets the latest best block which was connected either via the [`Listen`] or
+ * [`Confirm`] interfaces.
+ */
+MUST_USE_RES struct LDKBestBlock OutputSweeper_current_best_block(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new Listen which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is
+ */
+struct LDKListen OutputSweeper_as_Listen(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new Confirm which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Confirm must be freed before this_arg is
+ */
+struct LDKConfirm OutputSweeper_as_Confirm(const struct LDKOutputSweeper *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the SpendingDelay
+ */
+void SpendingDelay_free(struct LDKSpendingDelay this_ptr);
+
+/**
+ * Creates a copy of the SpendingDelay
+ */
+struct LDKSpendingDelay SpendingDelay_clone(const struct LDKSpendingDelay *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Relative-variant SpendingDelay
+ */
+struct LDKSpendingDelay SpendingDelay_relative(uint32_t num_blocks);
+
+/**
+ * Utility method to constructs a new Absolute-variant SpendingDelay
+ */
+struct LDKSpendingDelay SpendingDelay_absolute(uint32_t height);
+
+/**
+ * Read a OutputSweeper from a byte array, created by OutputSweeper_write
+ */
+struct LDKCResult_OutputSweeperDecodeErrorZ OutputSweeper_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g);
+
+/**
+ * Read a C2Tuple_BestBlockOutputSweeperZ from a byte array, created by C2Tuple_BestBlockOutputSweeperZ_write
+ */
+struct LDKCResult_C2Tuple_BestBlockOutputSweeperZDecodeErrorZ C2Tuple_BestBlockOutputSweeperZ_read(struct LDKu8slice ser, struct LDKBroadcasterInterface arg_a, struct LDKFeeEstimator arg_b, struct LDKCOption_FilterZ arg_c, struct LDKOutputSpender arg_d, struct LDKChangeDestinationSource arg_e, struct LDKKVStore arg_f, struct LDKLogger arg_g);
+
 /**
  * Calls the free function if one is set
  */
@@ -25447,11 +33454,6 @@ void FutureCallback_free(struct LDKFutureCallback this_ptr);
  */
 void Future_free(struct LDKFuture this_obj);
 
-/**
- * Creates a copy of the Future
- */
-struct LDKFuture Future_clone(const struct LDKFuture *NONNULL_PTR orig);
-
 /**
  * Registers a callback to be called upon completion of this future. If the future has already
  * completed, the callback will be called immediately.
@@ -25461,14 +33463,14 @@ void Future_register_callback_fn(const struct LDKFuture *NONNULL_PTR this_arg, s
 /**
  * Waits until this [`Future`] completes.
  */
-void Future_wait(struct LDKFuture this_arg);
+void Future_wait(const struct LDKFuture *NONNULL_PTR this_arg);
 
 /**
  * Waits until this [`Future`] completes or the given amount of time has elapsed.
  *
  * Returns true if the [`Future`] completed, false if the time elapsed.
  */
-MUST_USE_RES bool Future_wait_timeout(struct LDKFuture this_arg, uint64_t max_wait);
+MUST_USE_RES bool Future_wait_timeout(const struct LDKFuture *NONNULL_PTR this_arg, uint64_t max_wait);
 
 /**
  * Frees any resources used by the Sleeper, if is_owned is set and inner is non-NULL.
@@ -25478,12 +33480,12 @@ void Sleeper_free(struct LDKSleeper this_obj);
 /**
  * Constructs a new sleeper from one future, allowing blocking on it.
  */
-MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(struct LDKFuture future);
+MUST_USE_RES struct LDKSleeper Sleeper_from_single_future(const struct LDKFuture *NONNULL_PTR future);
 
 /**
  * Constructs a new sleeper from two futures, allowing blocking on both at once.
  */
-MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(struct LDKFuture fut_a, struct LDKFuture fut_b);
+MUST_USE_RES struct LDKSleeper Sleeper_from_two_futures(const struct LDKFuture *NONNULL_PTR fut_a, const struct LDKFuture *NONNULL_PTR fut_b);
 
 /**
  * Constructs a new sleeper on many futures, allowing blocking on all at once.
@@ -25568,6 +33570,44 @@ enum LDKLevel Record_get_level(const struct LDKRecord *NONNULL_PTR this_ptr);
  */
 void Record_set_level(struct LDKRecord *NONNULL_PTR this_ptr, enum LDKLevel val);
 
+/**
+ * The node id of the peer pertaining to the logged record.
+ *
+ * Note that in some cases a [`Self::channel_id`] may be filled in but this may still be
+ * `None`, depending on if the peer information is readily available in LDK when the log is
+ * generated.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKPublicKey Record_get_peer_id(const struct LDKRecord *NONNULL_PTR this_ptr);
+
+/**
+ * The node id of the peer pertaining to the logged record.
+ *
+ * Note that in some cases a [`Self::channel_id`] may be filled in but this may still be
+ * `None`, depending on if the peer information is readily available in LDK when the log is
+ * generated.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void Record_set_peer_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The channel id of the channel pertaining to the logged record. May be a temporary id before
+ * the channel has been funded.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelId Record_get_channel_id(const struct LDKRecord *NONNULL_PTR this_ptr);
+
+/**
+ * The channel id of the channel pertaining to the logged record. May be a temporary id before
+ * the channel has been funded.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void Record_set_channel_id(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKChannelId val);
+
 /**
  * The message body.
  */
@@ -25608,6 +33648,14 @@ uint32_t Record_get_line(const struct LDKRecord *NONNULL_PTR this_ptr);
  */
 void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
 
+/**
+ * Constructs a new Record given each field
+ *
+ * Note that peer_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Note that channel_id_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKRecord Record_new(enum LDKLevel level_arg, struct LDKPublicKey peer_id_arg, struct LDKChannelId channel_id_arg, struct LDKStr args_arg, struct LDKStr module_path_arg, struct LDKStr file_arg, uint32_t line_arg);
+
 /**
  * Creates a copy of the Record
  */
@@ -26408,13 +34456,16 @@ uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONN
 void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too
- * small to claim on-chain.
+ * Limit our total exposure to potential loss to on-chain fees on close, including in-flight
+ * HTLCs which are burned to fees as they are too small to claim on-chain and fees on
+ * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate.
+ *
+ * # HTLC-based Dust Exposure
  *
  * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will
  * not be claimable on-chain, instead being turned into additional miner fees if either
  * party force-closes the channel. Because the threshold is per-HTLC, our total exposure
- * to such payments may be sustantial if there are many dust HTLCs present when the
+ * to such payments may be substantial if there are many dust HTLCs present when the
  * channel is force-closed.
  *
  * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
@@ -26428,18 +34479,51 @@ void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR th
  * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total
  * exposure across all three types per-channel.
  *
- * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000.
+ * # Transaction Fee Dust Exposure
+ *
+ * Further, counterparties broadcasting a commitment transaction in a force-close may result
+ * in other balance being burned to fees, and thus all fees on commitment and HTLC
+ * transactions in excess of our local fee estimates are included in the dust calculation.
+ *
+ * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750
+ * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per
+ * non-dust HTLC we're allowed to have with our peers before risking a force-closure for
+ * inbound channels.
+ *
+ * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500
+ * sat/KW), we risk force-closure if we disagree with our peer by:
+ * * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in
+ *   both directions (the maximum),
+ * * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both
+ *   directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+ * * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs
+ *   in both directions (the maximum),
+ * * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs
+ *   in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+ *
+ * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement
+ * will scale linearly with increases (or decreases) in the our feerate estimates. Further,
+ * for anchor channels we expect our counterparty to use a relatively low feerate estimate
+ * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and
+ * feerate disagreement force-closures should only occur when theirs is higher than ours.
+ *
+ * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000.
+ *
+ * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
  */
 struct LDKMaxDustHTLCExposure ChannelConfig_get_max_dust_htlc_exposure(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
 
 /**
- * Limit our total exposure to in-flight HTLCs which are burned to fees as they are too
- * small to claim on-chain.
+ * Limit our total exposure to potential loss to on-chain fees on close, including in-flight
+ * HTLCs which are burned to fees as they are too small to claim on-chain and fees on
+ * commitment transaction(s) broadcasted by our counterparty in excess of our own fee estimate.
+ *
+ * # HTLC-based Dust Exposure
  *
  * When an HTLC present in one of our channels is below a \"dust\" threshold, the HTLC will
  * not be claimable on-chain, instead being turned into additional miner fees if either
  * party force-closes the channel. Because the threshold is per-HTLC, our total exposure
- * to such payments may be sustantial if there are many dust HTLCs present when the
+ * to such payments may be substantial if there are many dust HTLCs present when the
  * channel is force-closed.
  *
  * The dust threshold for each HTLC is based on the `dust_limit_satoshis` for each party in a
@@ -26453,7 +34537,37 @@ struct LDKMaxDustHTLCExposure ChannelConfig_get_max_dust_htlc_exposure(const str
  * The selected limit is applied for sent, forwarded, and received HTLCs and limits the total
  * exposure across all three types per-channel.
  *
- * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 5000.
+ * # Transaction Fee Dust Exposure
+ *
+ * Further, counterparties broadcasting a commitment transaction in a force-close may result
+ * in other balance being burned to fees, and thus all fees on commitment and HTLC
+ * transactions in excess of our local fee estimates are included in the dust calculation.
+ *
+ * Because of this, another way to look at this limit is to divide it by 43,000 (or 218,750
+ * for non-anchor channels) and see it as the maximum feerate disagreement (in sats/vB) per
+ * non-dust HTLC we're allowed to have with our peers before risking a force-closure for
+ * inbound channels.
+ *
+ * Thus, for the default value of 10_000 * a current feerate estimate of 10 sat/vB (or 2,500
+ * sat/KW), we risk force-closure if we disagree with our peer by:
+ * * `10_000 * 2_500 / 43_000 / (483*2)` = 0.6 sat/vB for anchor channels with 483 HTLCs in
+ *   both directions (the maximum),
+ * * `10_000 * 2_500 / 43_000 / (50*2)` = 5.8 sat/vB for anchor channels with 50 HTLCs in both
+ *   directions (the LDK default max from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+ * * `10_000 * 2_500 / 218_750 / (483*2)` = 0.1 sat/vB for non-anchor channels with 483 HTLCs
+ *   in both directions (the maximum),
+ * * `10_000 * 2_500 / 218_750 / (50*2)` = 1.1 sat/vB for non-anchor channels with 50 HTLCs
+ *   in both (the LDK default maximum from [`ChannelHandshakeConfig::our_max_accepted_htlcs`])
+ *
+ * Note that when using [`MaxDustHTLCExposure::FeeRateMultiplier`] this maximum disagreement
+ * will scale linearly with increases (or decreases) in the our feerate estimates. Further,
+ * for anchor channels we expect our counterparty to use a relatively low feerate estimate
+ * while we use [`ConfirmationTarget::OnChainSweep`] (which should be relatively high) and
+ * feerate disagreement force-closures should only occur when theirs is higher than ours.
+ *
+ * Default value: [`MaxDustHTLCExposure::FeeRateMultiplier`] with a multiplier of 10_000.
+ *
+ * [`ConfirmationTarget::OnChainSweep`]: crate::chain::chaininterface::ConfirmationTarget::OnChainSweep
  */
 void ChannelConfig_set_max_dust_htlc_exposure(struct LDKChannelConfig *NONNULL_PTR this_ptr, struct LDKMaxDustHTLCExposure val);
 
@@ -26466,20 +34580,20 @@ void ChannelConfig_set_max_dust_htlc_exposure(struct LDKChannelConfig *NONNULL_P
  * funder/initiator.
  *
  * When we are the funder, because we have to pay the channel closing fee, we bound the
- * acceptable fee by our [`Background`] and [`Normal`] fees, with the upper bound increased by
+ * acceptable fee by our [`ChannelCloseMinimum`] and [`NonAnchorChannelFee`] fees, with the upper bound increased by
  * this value. Because the on-chain fee we'd pay to force-close the channel is kept near our
- * [`Normal`] feerate during normal operation, this value represents the additional fee we're
+ * [`NonAnchorChannelFee`] feerate during normal operation, this value represents the additional fee we're
  * willing to pay in order to avoid waiting for our counterparty's to_self_delay to reclaim our
  * funds.
  *
  * When we are not the funder, we require the closing transaction fee pay at least our
- * [`Background`] fee estimate, but allow our counterparty to pay as much fee as they like.
+ * [`ChannelCloseMinimum`] fee estimate, but allow our counterparty to pay as much fee as they like.
  * Thus, this value is ignored when we are not the funder.
  *
  * Default value: 1000 satoshis.
  *
- * [`Normal`]: crate::chain::chaininterface::ConfirmationTarget::Normal
- * [`Background`]: crate::chain::chaininterface::ConfirmationTarget::Background
+ * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
+ * [`ChannelCloseMinimum`]: crate::chain::chaininterface::ConfirmationTarget::ChannelCloseMinimum
  */
 uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
 
@@ -26492,20 +34606,20 @@ uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct L
  * funder/initiator.
  *
  * When we are the funder, because we have to pay the channel closing fee, we bound the
- * acceptable fee by our [`Background`] and [`Normal`] fees, with the upper bound increased by
+ * acceptable fee by our [`ChannelCloseMinimum`] and [`NonAnchorChannelFee`] fees, with the upper bound increased by
  * this value. Because the on-chain fee we'd pay to force-close the channel is kept near our
- * [`Normal`] feerate during normal operation, this value represents the additional fee we're
+ * [`NonAnchorChannelFee`] feerate during normal operation, this value represents the additional fee we're
  * willing to pay in order to avoid waiting for our counterparty's to_self_delay to reclaim our
  * funds.
  *
  * When we are not the funder, we require the closing transaction fee pay at least our
- * [`Background`] fee estimate, but allow our counterparty to pay as much fee as they like.
+ * [`ChannelCloseMinimum`] fee estimate, but allow our counterparty to pay as much fee as they like.
  * Thus, this value is ignored when we are not the funder.
  *
  * Default value: 1000 satoshis.
  *
- * [`Normal`]: crate::chain::chaininterface::ConfirmationTarget::Normal
- * [`Background`]: crate::chain::chaininterface::ConfirmationTarget::Background
+ * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
+ * [`ChannelCloseMinimum`]: crate::chain::chaininterface::ConfirmationTarget::ChannelCloseMinimum
  */
 void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
 
@@ -26519,7 +34633,9 @@ void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelC
  * - The counterparty will get an [`HTLCIntercepted`] event upon payment forward, and call
  *   [`forward_intercepted_htlc`] with less than the amount provided in
  *   [`HTLCIntercepted::expected_outbound_amount_msat`]. The difference between the expected and
- *   actual forward amounts is their fee.
+ *   actual forward amounts is their fee. See
+ *   <https://github.com/BitcoinAndLightningLayerSpecs/lsp/tree/main/LSPS2#flow-lsp-trusts-client-model>
+ *   for how this feature may be used in the LSP use case.
  *
  * # Note
  * It's important for payee wallet software to verify that [`PaymentClaimable::amount_msat`] is
@@ -26552,7 +34668,9 @@ bool ChannelConfig_get_accept_underpaying_htlcs(const struct LDKChannelConfig *N
  * - The counterparty will get an [`HTLCIntercepted`] event upon payment forward, and call
  *   [`forward_intercepted_htlc`] with less than the amount provided in
  *   [`HTLCIntercepted::expected_outbound_amount_msat`]. The difference between the expected and
- *   actual forward amounts is their fee.
+ *   actual forward amounts is their fee. See
+ *   <https://github.com/BitcoinAndLightningLayerSpecs/lsp/tree/main/LSPS2#flow-lsp-trusts-client-model>
+ *   for how this feature may be used in the LSP use case.
  *
  * # Note
  * It's important for payee wallet software to verify that [`PaymentClaimable::amount_msat`] is
@@ -26848,11 +34966,41 @@ MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
  */
 void BestBlock_free(struct LDKBestBlock this_obj);
 
+/**
+ * The block's hash
+ */
+const uint8_t (*BestBlock_get_block_hash(const struct LDKBestBlock *NONNULL_PTR this_ptr))[32];
+
+/**
+ * The block's hash
+ */
+void BestBlock_set_block_hash(struct LDKBestBlock *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * The height at which the block was confirmed.
+ */
+uint32_t BestBlock_get_height(const struct LDKBestBlock *NONNULL_PTR this_ptr);
+
+/**
+ * The height at which the block was confirmed.
+ */
+void BestBlock_set_height(struct LDKBestBlock *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Constructs a new BestBlock given each field
+ */
+MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash_arg, uint32_t height_arg);
+
 /**
  * Creates a copy of the BestBlock
  */
 struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the BestBlock.
+ */
+uint64_t BestBlock_hash(const struct LDKBestBlock *NONNULL_PTR o);
+
 /**
  * Checks if two BestBlocks contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -26867,19 +35015,14 @@ bool BestBlock_eq(const struct LDKBestBlock *NONNULL_PTR a, const struct LDKBest
 MUST_USE_RES struct LDKBestBlock BestBlock_from_network(enum LDKNetwork network);
 
 /**
- * Returns a `BestBlock` as identified by the given block hash and height.
+ * Serialize the BestBlock object into a byte array which can be read by BestBlock_read
  */
-MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
+struct LDKCVec_u8Z BestBlock_write(const struct LDKBestBlock *NONNULL_PTR obj);
 
 /**
- * Returns the best block hash.
+ * Read a BestBlock from a byte array, created by BestBlock_write
  */
-MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
-
-/**
- * Returns the best block height.
- */
-MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
+struct LDKCResult_BestBlockDecodeErrorZ BestBlock_read(struct LDKu8slice ser);
 
 /**
  * Calls the free function if one is set
@@ -26907,9 +35050,9 @@ enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_completed(void);
 enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_in_progress(void);
 
 /**
- * Utility method to constructs a new PermanentFailure-variant ChannelMonitorUpdateStatus
+ * Utility method to constructs a new UnrecoverableError-variant ChannelMonitorUpdateStatus
  */
-enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_permanent_failure(void);
+enum LDKChannelMonitorUpdateStatus ChannelMonitorUpdateStatus_unrecoverable_error(void);
 
 /**
  * Checks if two ChannelMonitorUpdateStatuss contain equal inner contents.
@@ -26935,12 +35078,12 @@ void WatchedOutput_free(struct LDKWatchedOutput this_obj);
 /**
  * First block where the transaction output may have been spent.
  */
-struct LDKCOption_BlockHashZ WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+struct LDKCOption_ThirtyTwoBytesZ WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
 
 /**
  * First block where the transaction output may have been spent.
  */
-void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCOption_BlockHashZ val);
+void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
 
 /**
  * Outpoint identifying the transaction output.
@@ -26955,7 +35098,7 @@ void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, s
 /**
  * Spending condition of the transaction output.
  */
-struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
 
 /**
  * Spending condition of the transaction output.
@@ -26965,7 +35108,7 @@ void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_p
 /**
  * Constructs a new WatchedOutput given each field
  */
-MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKCOption_BlockHashZ block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
+MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKCOption_ThirtyTwoBytesZ block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
 
 /**
  * Creates a copy of the WatchedOutput
@@ -26995,24 +35138,39 @@ void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
 enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
 
 /**
- * Utility method to constructs a new MempoolMinimum-variant ConfirmationTarget
+ * Utility method to constructs a new OnChainSweep-variant ConfirmationTarget
+ */
+enum LDKConfirmationTarget ConfirmationTarget_on_chain_sweep(void);
+
+/**
+ * Utility method to constructs a new MinAllowedAnchorChannelRemoteFee-variant ConfirmationTarget
+ */
+enum LDKConfirmationTarget ConfirmationTarget_min_allowed_anchor_channel_remote_fee(void);
+
+/**
+ * Utility method to constructs a new MinAllowedNonAnchorChannelRemoteFee-variant ConfirmationTarget
  */
-enum LDKConfirmationTarget ConfirmationTarget_mempool_minimum(void);
+enum LDKConfirmationTarget ConfirmationTarget_min_allowed_non_anchor_channel_remote_fee(void);
 
 /**
- * Utility method to constructs a new Background-variant ConfirmationTarget
+ * Utility method to constructs a new AnchorChannelFee-variant ConfirmationTarget
  */
-enum LDKConfirmationTarget ConfirmationTarget_background(void);
+enum LDKConfirmationTarget ConfirmationTarget_anchor_channel_fee(void);
 
 /**
- * Utility method to constructs a new Normal-variant ConfirmationTarget
+ * Utility method to constructs a new NonAnchorChannelFee-variant ConfirmationTarget
  */
-enum LDKConfirmationTarget ConfirmationTarget_normal(void);
+enum LDKConfirmationTarget ConfirmationTarget_non_anchor_channel_fee(void);
 
 /**
- * Utility method to constructs a new HighPriority-variant ConfirmationTarget
+ * Utility method to constructs a new ChannelCloseMinimum-variant ConfirmationTarget
  */
-enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
+enum LDKConfirmationTarget ConfirmationTarget_channel_close_minimum(void);
+
+/**
+ * Utility method to constructs a new OutputSpendingFee-variant ConfirmationTarget
+ */
+enum LDKConfirmationTarget ConfirmationTarget_output_spending_fee(void);
 
 /**
  * Generates a non-cryptographic 64-bit hash of the ConfirmationTarget.
@@ -27101,12 +35259,12 @@ MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const s
 MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
 
 /**
- * Lists the funding outpoint of each [`ChannelMonitor`] being monitored.
+ * Lists the funding outpoint and channel ID of each [`ChannelMonitor`] being monitored.
  *
  * Note that [`ChannelMonitor`]s are not removed when a channel is closed as they are always
  * monitoring for on-chain state resolutions.
  */
-MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCVec_C2Tuple_OutPointChannelIdZZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
 
 /**
  * Lists the pending updates for each [`ChannelMonitor`] (by `OutPoint` being monitored).
@@ -27151,6 +35309,29 @@ MUST_USE_RES struct LDKFuture ChainMonitor_get_update_future(const struct LDKCha
  */
 void ChainMonitor_rebroadcast_pending_claims(const struct LDKChainMonitor *NONNULL_PTR this_arg);
 
+/**
+ * Triggers rebroadcasts of pending claims from force-closed channels after a transaction
+ * signature generation failure.
+ *
+ * `monitor_opt` can be used as a filter to only trigger them for a specific channel monitor.
+ *
+ * Note that monitor_opt (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChainMonitor_signer_unblocked(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint monitor_opt);
+
+/**
+ * Archives fully resolved channel monitors by calling [`Persist::archive_persisted_channel`].
+ *
+ * This is useful for pruning fully resolved monitors from the monitor set and primary
+ * storage so they are not kept in memory and reloaded on restart.
+ *
+ * Should be called occasionally (once every handful of blocks or on startup).
+ *
+ * Depending on the implementation of [`Persist::archive_persisted_channel`] the monitor
+ * data could be moved to an archive location or removed entirely.
+ */
+void ChainMonitor_archive_fully_resolved_channel_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
+
 /**
  * Constructs a new Listen which calls the relevant methods on this_arg.
  * This copies the `inner` pointer in this_arg and thus the returned Listen must be freed before this_arg is
@@ -27218,6 +35399,26 @@ uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate
  */
 void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
 
+/**
+ * The channel ID associated with these updates.
+ *
+ * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and
+ * always `Some` otherwise.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelId ChannelMonitorUpdate_get_channel_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
+
+/**
+ * The channel ID associated with these updates.
+ *
+ * Will be `None` for `ChannelMonitorUpdate`s constructed on LDK versions prior to 0.0.121 and
+ * always `Some` otherwise.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelMonitorUpdate_set_channel_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, struct LDKChannelId val);
+
 /**
  * Creates a copy of the ChannelMonitorUpdate
  */
@@ -27256,19 +35457,19 @@ struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_
 struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
 
 /**
- * Utility method to constructs a new CommitmentTxConfirmed-variant MonitorEvent
+ * Utility method to constructs a new HolderForceClosedWithInfo-variant MonitorEvent
  */
-struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
+struct LDKMonitorEvent MonitorEvent_holder_force_closed_with_info(struct LDKClosureReason reason, struct LDKOutPoint outpoint, struct LDKChannelId channel_id);
 
 /**
- * Utility method to constructs a new Completed-variant MonitorEvent
+ * Utility method to constructs a new HolderForceClosed-variant MonitorEvent
  */
-struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
+struct LDKMonitorEvent MonitorEvent_holder_force_closed(struct LDKOutPoint a);
 
 /**
- * Utility method to constructs a new UpdateFailed-variant MonitorEvent
+ * Utility method to constructs a new Completed-variant MonitorEvent
  */
-struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
+struct LDKMonitorEvent MonitorEvent_completed(struct LDKOutPoint funding_txo, struct LDKChannelId channel_id, uint64_t monitor_update_id);
 
 /**
  * Checks if two MonitorEvents contain equal inner contents.
@@ -27326,32 +35527,32 @@ struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
 /**
  * Utility method to constructs a new ClaimableOnChannelClose-variant Balance
  */
-struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
+struct LDKBalance Balance_claimable_on_channel_close(uint64_t amount_satoshis);
 
 /**
  * Utility method to constructs a new ClaimableAwaitingConfirmations-variant Balance
  */
-struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
+struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t amount_satoshis, uint32_t confirmation_height);
 
 /**
  * Utility method to constructs a new ContentiousClaimable-variant Balance
  */
-struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_preimage);
+struct LDKBalance Balance_contentious_claimable(uint64_t amount_satoshis, uint32_t timeout_height, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_preimage);
 
 /**
  * Utility method to constructs a new MaybeTimeoutClaimableHTLC-variant Balance
  */
-struct LDKBalance Balance_maybe_timeout_claimable_htlc(uint64_t claimable_amount_satoshis, uint32_t claimable_height, struct LDKThirtyTwoBytes payment_hash);
+struct LDKBalance Balance_maybe_timeout_claimable_htlc(uint64_t amount_satoshis, uint32_t claimable_height, struct LDKThirtyTwoBytes payment_hash);
 
 /**
  * Utility method to constructs a new MaybePreimageClaimableHTLC-variant Balance
  */
-struct LDKBalance Balance_maybe_preimage_claimable_htlc(uint64_t claimable_amount_satoshis, uint32_t expiry_height, struct LDKThirtyTwoBytes payment_hash);
+struct LDKBalance Balance_maybe_preimage_claimable_htlc(uint64_t amount_satoshis, uint32_t expiry_height, struct LDKThirtyTwoBytes payment_hash);
 
 /**
  * Utility method to constructs a new CounterpartyRevokedOutputClaimable-variant Balance
  */
-struct LDKBalance Balance_counterparty_revoked_output_claimable(uint64_t claimable_amount_satoshis);
+struct LDKBalance Balance_counterparty_revoked_output_claimable(uint64_t amount_satoshis);
 
 /**
  * Checks if two Balances contain equal inner contents.
@@ -27374,6 +35575,11 @@ MUST_USE_RES uint64_t Balance_claimable_amount_satoshis(const struct LDKBalance
  */
 void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
 
+/**
+ * Creates a copy of the ChannelMonitor
+ */
+struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
+
 /**
  * Serialize the ChannelMonitor object into a byte array which can be read by ChannelMonitor_read
  */
@@ -27385,7 +35591,7 @@ struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_
  *
  * panics if the given update is not the next update by update_id.
  */
-MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Gets the update_id from the latest ChannelMonitorUpdate which was applied to this
@@ -27396,20 +35602,25 @@ MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChanne
 /**
  * Gets the funding transaction outpoint of the channel this ChannelMonitor is monitoring for.
  */
-MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKC2Tuple_OutPointCVec_u8ZZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+
+/**
+ * Gets the channel_id of the channel this ChannelMonitor is monitoring for.
+ */
+MUST_USE_RES struct LDKChannelId ChannelMonitor_channel_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
 
 /**
  * Gets a list of txids, with their output scripts (in the order they appear in the
  * transaction), which we must learn about spends of via block_connected().
  */
-MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
 
 /**
  * Loads the funding txo and outputs to watch into the given `chain::Filter` by repeatedly
  * calling `chain::Filter::register_output` and `chain::Filter::register_tx` until all outputs
  * have been registered.
  */
-void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
+void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Get the list of HTLCs who's status has been updated on chain. This should be called by
@@ -27434,6 +35645,69 @@ MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_m
  */
 void ChannelMonitor_process_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKEventHandler *NONNULL_PTR 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_RES struct LDKCommitmentTransaction ChannelMonitor_initial_counterparty_commitment_tx(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+
+/**
+ * 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.
+ *
+ * This is provided so that watchtower clients in the persistence pipeline are able to build
+ * justice transactions for each counterparty commitment upon each update. It's intended to be
+ * used within an implementation of [`Persist::update_persisted_channel`], which is provided
+ * with a monitor and an update. Once revoked, signing a justice transaction can be done using
+ * [`Self::sign_to_local_justice_tx`].
+ *
+ * It is expected that a watchtower client may use this method to retrieve the latest counterparty
+ * commitment transaction(s), and then hold the necessary data until a later update in which
+ * the monitor has been updated with the corresponding revocation data, at which point the
+ * monitor can sign the justice transaction.
+ *
+ * This will only return a non-empty list for monitor updates that have been created after
+ * upgrading to LDK 0.0.117+. Note that no restriction lies on the monitors themselves, which
+ * may have been created prior to upgrading.
+ *
+ * [`Persist::update_persisted_channel`]: crate::chain::chainmonitor::Persist::update_persisted_channel
+ */
+MUST_USE_RES struct LDKCVec_CommitmentTransactionZ ChannelMonitor_counterparty_commitment_txs_from_update(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR update);
+
+/**
+ * Wrapper around [`EcdsaChannelSigner::sign_justice_revoked_output`] to make
+ * signing the justice transaction easier for implementors of
+ * [`chain::chainmonitor::Persist`]. On success this method returns the provided transaction
+ * signing the input at `input_idx`. This method will only produce a valid signature for
+ * a transaction spending the `to_local` output of a commitment transaction, i.e. this cannot
+ * be used for revoked HTLC outputs.
+ *
+ * `Value` is the value of the output being spent by the input at `input_idx`, committed
+ * in the BIP 143 signature.
+ *
+ * This method will only succeed if this monitor has received the revocation secret for the
+ * provided `commitment_number`. If a commitment number is provided that does not correspond
+ * to the commitment transaction being revoked, this will return a signed transaction, but
+ * the signature will not be valid.
+ *
+ * [`EcdsaChannelSigner::sign_justice_revoked_output`]: crate::sign::ecdsa::EcdsaChannelSigner::sign_justice_revoked_output
+ * [`Persist`]: crate::chain::chainmonitor::Persist
+ */
+MUST_USE_RES struct LDKCResult_TransactionNoneZ ChannelMonitor_sign_to_local_justice_tx(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input_idx, uint64_t value, uint64_t commitment_number);
+
 /**
  * Gets the `node_id` of the counterparty for this channel.
  *
@@ -27445,23 +35719,17 @@ void ChannelMonitor_process_pending_events(const struct LDKChannelMonitor *NONNU
 MUST_USE_RES struct LDKPublicKey ChannelMonitor_get_counterparty_node_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
 
 /**
- * Used by ChannelManager deserialization to broadcast the latest holder state if its copy of
- * the Channel was out-of-date.
- *
- * You may also use this to broadcast the latest local commitment transaction, either because
- * a monitor update failed with [`ChannelMonitorUpdateStatus::PermanentFailure`] or because we've
- * fallen behind (i.e. we've received proof that our counterparty side knows a revocation
- * secret we gave them that they shouldn't know).
+ * You may use this to broadcast the latest local commitment transaction, either because
+ * a monitor update failed or because we've fallen behind (i.e. we've received proof that our
+ * counterparty side knows a revocation secret we gave them that they shouldn't know).
  *
- * Broadcasting these transactions in the second case is UNSAFE, as they allow counterparty
+ * Broadcasting these transactions in this manner is UNSAFE, as they allow counterparty
  * side to punish you. Nevertheless you may want to broadcast them if counterparty doesn't
  * close channel with their commitment transaction after a substantial amount of time. Best
  * may be to contact the other node operator out-of-band to coordinate other options available
- * to you. In any-case, the choice is up to you.
- *
- * [`ChannelMonitorUpdateStatus::PermanentFailure`]: super::ChannelMonitorUpdateStatus::PermanentFailure
+ * to you.
  */
-MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
+void ChannelMonitor_broadcast_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Processes transactions in a newly connected block, which may result in any of the following:
@@ -27476,13 +35744,13 @@ MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commit
  *
  * [`get_outputs_to_watch`]: #method.get_outputs_to_watch
  */
-MUST_USE_RES struct LDKCVec_TransactionOutputsZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
+MUST_USE_RES struct LDKCVec_TransactionOutputsZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Determines if the disconnected block contained any transactions of interest and updates
  * appropriately.
  */
-void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
+void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Processes transactions confirmed in a block with the given header and height, returning new
@@ -27493,7 +35761,7 @@ void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_P
  *
  * [`block_connected`]: Self::block_connected
  */
-MUST_USE_RES struct LDKCVec_TransactionOutputsZ ChannelMonitor_transactions_confirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
+MUST_USE_RES struct LDKCVec_TransactionOutputsZ ChannelMonitor_transactions_confirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Processes a transaction that was reorganized out of the chain.
@@ -27503,7 +35771,7 @@ MUST_USE_RES struct LDKCVec_TransactionOutputsZ ChannelMonitor_transactions_conf
  *
  * [`block_disconnected`]: Self::block_disconnected
  */
-void ChannelMonitor_transaction_unconfirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
+void ChannelMonitor_transaction_unconfirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Updates the monitor with the current best chain tip, returning new outputs to watch. See
@@ -27514,12 +35782,12 @@ void ChannelMonitor_transaction_unconfirmed(const struct LDKChannelMonitor *NONN
  *
  * [`block_connected`]: Self::block_connected
  */
-MUST_USE_RES struct LDKCVec_TransactionOutputsZ ChannelMonitor_best_block_updated(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
+MUST_USE_RES struct LDKCVec_TransactionOutputsZ ChannelMonitor_best_block_updated(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Returns the set of txids that should be monitored for re-organization out of the chain.
  */
-MUST_USE_RES struct LDKCVec_C2Tuple_TxidCOption_BlockHashZZZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCVec_C3Tuple_ThirtyTwoBytesu32COption_ThirtyTwoBytesZZZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
 
 /**
  * Gets the latest best block which was connected either via the [`chain::Listen`] or
@@ -27534,7 +35802,44 @@ MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct
  * invoking this every 30 seconds, or lower if running in an environment with spotty
  * connections, like on mobile.
  */
-void ChannelMonitor_rebroadcast_pending_claims(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
+void ChannelMonitor_rebroadcast_pending_claims(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+
+/**
+ * Triggers rebroadcasts of pending claims from a force-closed channel after a transaction
+ * signature generation failure.
+ */
+void ChannelMonitor_signer_unblocked(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+
+/**
+ * Returns the descriptors for relevant outputs (i.e., those that we can spend) within the
+ * transaction if they exist and the transaction has at least [`ANTI_REORG_DELAY`]
+ * confirmations. For [`SpendableOutputDescriptor::DelayedPaymentOutput`] descriptors to be
+ * returned, the transaction must have at least `max(ANTI_REORG_DELAY, to_self_delay)`
+ * confirmations.
+ *
+ * Descriptors returned by this method are primarily exposed via [`Event::SpendableOutputs`]
+ * once they are no longer under reorg risk. This method serves as a way to retrieve these
+ * descriptors at a later time, either for historical purposes, or to replay any
+ * missed/unhandled descriptors. For the purpose of gathering historical records, if the
+ * channel close has fully resolved (i.e., [`ChannelMonitor::get_claimable_balances`] returns
+ * an empty set), you can retrieve all spendable outputs by providing all descendant spending
+ * transactions starting from the channel's funding transaction and going down three levels.
+ *
+ * `tx` is a transaction we'll scan the outputs of. Any transaction can be provided. If any
+ * outputs which can be spent by us are found, at least one descriptor is returned.
+ *
+ * `confirmation_height` must be the height of the block in which `tx` was included in.
+ */
+MUST_USE_RES struct LDKCVec_SpendableOutputDescriptorZ ChannelMonitor_get_spendable_outputs(const struct LDKChannelMonitor *NONNULL_PTR this_arg, struct LDKTransaction tx, uint32_t confirmation_height);
+
+/**
+ * Checks if the monitor is fully resolved. Resolved monitor is one that has claimed all of
+ * its outputs and balances (i.e. [`Self::get_claimable_balances`] returns an empty set).
+ *
+ * This function returns true only if [`Self::get_claimable_balances`] has been empty for at least
+ * 4032 blocks as an additional protection against any bugs resulting in spuriously empty balance sets.
+ */
+MUST_USE_RES bool ChannelMonitor_is_fully_resolved(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Gets the balances in this channel which are either claimable by us if we were to
@@ -27547,8 +35852,7 @@ void ChannelMonitor_rebroadcast_pending_claims(const struct LDKChannelMonitor *N
  * confirmations on the claim transaction.
  *
  * Note that for `ChannelMonitors` which track a channel which went on-chain with versions of
- * LDK prior to 0.0.111, balances may not be fully captured if our counterparty broadcasted
- * a revoked state.
+ * LDK prior to 0.0.111, not all or excess balances may be included.
  *
  * See [`Balance`] for additional details on the types of claimable balances which
  * may be returned here and their meanings.
@@ -27556,9 +35860,9 @@ void ChannelMonitor_rebroadcast_pending_claims(const struct LDKChannelMonitor *N
 MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
 
 /**
- * Read a C2Tuple_BlockHashChannelMonitorZ from a byte array, created by C2Tuple_BlockHashChannelMonitorZ_write
+ * Read a C2Tuple_ThirtyTwoBytesChannelMonitorZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelMonitorZ_write
  */
-struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKEntropySource *NONNULL_PTR arg_a, const struct LDKSignerProvider *NONNULL_PTR arg_b);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKEntropySource *NONNULL_PTR arg_a, const struct LDKSignerProvider *NONNULL_PTR arg_b);
 
 /**
  * Frees any resources used by the OutPoint, if is_owned is set and inner is non-NULL.
@@ -27607,11 +35911,6 @@ bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoi
  */
 uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
 
-/**
- * Convert an `OutPoint` to a lightning channel id.
- */
-MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
-
 /**
  * Serialize the OutPoint object into a byte array which can be read by OutPoint_read
  */
@@ -27622,25 +35921,344 @@ struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
  */
 struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
 
+/**
+ * Frees any resources used by the InboundHTLCErr, if is_owned is set and inner is non-NULL.
+ */
+void InboundHTLCErr_free(struct LDKInboundHTLCErr this_obj);
+
+/**
+ * BOLT 4 error code.
+ */
+uint16_t InboundHTLCErr_get_err_code(const struct LDKInboundHTLCErr *NONNULL_PTR this_ptr);
+
+/**
+ * BOLT 4 error code.
+ */
+void InboundHTLCErr_set_err_code(struct LDKInboundHTLCErr *NONNULL_PTR this_ptr, uint16_t val);
+
+/**
+ * Data attached to this error.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u8Z InboundHTLCErr_get_err_data(const struct LDKInboundHTLCErr *NONNULL_PTR this_ptr);
+
+/**
+ * Data attached to this error.
+ */
+void InboundHTLCErr_set_err_data(struct LDKInboundHTLCErr *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+
+/**
+ * Error message text.
+ */
+struct LDKStr InboundHTLCErr_get_msg(const struct LDKInboundHTLCErr *NONNULL_PTR this_ptr);
+
+/**
+ * Error message text.
+ */
+void InboundHTLCErr_set_msg(struct LDKInboundHTLCErr *NONNULL_PTR this_ptr, struct LDKStr val);
+
+/**
+ * Constructs a new InboundHTLCErr given each field
+ */
+MUST_USE_RES struct LDKInboundHTLCErr InboundHTLCErr_new(uint16_t err_code_arg, struct LDKCVec_u8Z err_data_arg, struct LDKStr msg_arg);
+
+/**
+ * Creates a copy of the InboundHTLCErr
+ */
+struct LDKInboundHTLCErr InboundHTLCErr_clone(const struct LDKInboundHTLCErr *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the InboundHTLCErr.
+ */
+uint64_t InboundHTLCErr_hash(const struct LDKInboundHTLCErr *NONNULL_PTR o);
+
+/**
+ * Checks if two InboundHTLCErrs contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool InboundHTLCErr_eq(const struct LDKInboundHTLCErr *NONNULL_PTR a, const struct LDKInboundHTLCErr *NONNULL_PTR b);
+
+/**
+ * Peel one layer off an incoming onion, returning a [`PendingHTLCInfo`] that contains information
+ * about the intended next-hop for the HTLC.
+ *
+ * This does all the relevant context-free checks that LDK requires for payment relay or
+ * acceptance. If the payment is to be received, and the amount matches the expected amount for
+ * a given invoice, this indicates the [`msgs::UpdateAddHTLC`], once fully committed in the
+ * channel, will generate an [`Event::PaymentClaimable`].
+ *
+ * [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable
+ */
+struct LDKCResult_PendingHTLCInfoInboundHTLCErrZ peel_payment_onion(const struct LDKUpdateAddHTLC *NONNULL_PTR msg, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKLogger *NONNULL_PTR logger, uint32_t cur_height, bool accept_mpp_keysend, bool allow_skimmed_fees);
+
+/**
+ * Frees any resources used by the PendingHTLCRouting
+ */
+void PendingHTLCRouting_free(struct LDKPendingHTLCRouting this_ptr);
+
+/**
+ * Creates a copy of the PendingHTLCRouting
+ */
+struct LDKPendingHTLCRouting PendingHTLCRouting_clone(const struct LDKPendingHTLCRouting *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Forward-variant PendingHTLCRouting
+ */
+struct LDKPendingHTLCRouting PendingHTLCRouting_forward(struct LDKOnionPacket onion_packet, uint64_t short_channel_id, struct LDKBlindedForward blinded);
+
+/**
+ * Utility method to constructs a new Receive-variant PendingHTLCRouting
+ */
+struct LDKPendingHTLCRouting PendingHTLCRouting_receive(struct LDKFinalOnionHopData payment_data, struct LDKCOption_CVec_u8ZZ payment_metadata, struct LDKCOption_PaymentContextZ payment_context, uint32_t incoming_cltv_expiry, struct LDKThirtyTwoBytes phantom_shared_secret, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
+
+/**
+ * Utility method to constructs a new ReceiveKeysend-variant PendingHTLCRouting
+ */
+struct LDKPendingHTLCRouting PendingHTLCRouting_receive_keysend(struct LDKFinalOnionHopData payment_data, struct LDKThirtyTwoBytes payment_preimage, struct LDKCOption_CVec_u8ZZ payment_metadata, uint32_t incoming_cltv_expiry, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs, bool requires_blinded_error);
+
+/**
+ * Frees any resources used by the BlindedForward, if is_owned is set and inner is non-NULL.
+ */
+void BlindedForward_free(struct LDKBlindedForward this_obj);
+
+/**
+ * The `blinding_point` that was set in the inbound [`msgs::UpdateAddHTLC`], or in the inbound
+ * onion payload if we're the introduction node. Useful for calculating the next hop's
+ * [`msgs::UpdateAddHTLC::blinding_point`].
+ */
+struct LDKPublicKey BlindedForward_get_inbound_blinding_point(const struct LDKBlindedForward *NONNULL_PTR this_ptr);
+
+/**
+ * The `blinding_point` that was set in the inbound [`msgs::UpdateAddHTLC`], or in the inbound
+ * onion payload if we're the introduction node. Useful for calculating the next hop's
+ * [`msgs::UpdateAddHTLC::blinding_point`].
+ */
+void BlindedForward_set_inbound_blinding_point(struct LDKBlindedForward *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * If needed, this determines how this HTLC should be failed backwards, based on whether we are
+ * the introduction node.
+ */
+enum LDKBlindedFailure BlindedForward_get_failure(const struct LDKBlindedForward *NONNULL_PTR this_ptr);
+
+/**
+ * If needed, this determines how this HTLC should be failed backwards, based on whether we are
+ * the introduction node.
+ */
+void BlindedForward_set_failure(struct LDKBlindedForward *NONNULL_PTR this_ptr, enum LDKBlindedFailure val);
+
+/**
+ * Constructs a new BlindedForward given each field
+ */
+MUST_USE_RES struct LDKBlindedForward BlindedForward_new(struct LDKPublicKey inbound_blinding_point_arg, enum LDKBlindedFailure failure_arg);
+
+/**
+ * Creates a copy of the BlindedForward
+ */
+struct LDKBlindedForward BlindedForward_clone(const struct LDKBlindedForward *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the BlindedForward.
+ */
+uint64_t BlindedForward_hash(const struct LDKBlindedForward *NONNULL_PTR o);
+
+/**
+ * Checks if two BlindedForwards contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool BlindedForward_eq(const struct LDKBlindedForward *NONNULL_PTR a, const struct LDKBlindedForward *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the PendingHTLCInfo, if is_owned is set and inner is non-NULL.
+ */
+void PendingHTLCInfo_free(struct LDKPendingHTLCInfo this_obj);
+
+/**
+ * Further routing details based on whether the HTLC is being forwarded or received.
+ */
+struct LDKPendingHTLCRouting PendingHTLCInfo_get_routing(const struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Further routing details based on whether the HTLC is being forwarded or received.
+ */
+void PendingHTLCInfo_set_routing(struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr, struct LDKPendingHTLCRouting val);
+
+/**
+ * The onion shared secret we build with the sender used to decrypt the onion.
+ *
+ * This is later used to encrypt failure packets in the event that the HTLC is failed.
+ */
+const uint8_t (*PendingHTLCInfo_get_incoming_shared_secret(const struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr))[32];
+
+/**
+ * The onion shared secret we build with the sender used to decrypt the onion.
+ *
+ * This is later used to encrypt failure packets in the event that the HTLC is failed.
+ */
+void PendingHTLCInfo_set_incoming_shared_secret(struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Hash of the payment preimage, to lock the payment until the receiver releases the preimage.
+ */
+const uint8_t (*PendingHTLCInfo_get_payment_hash(const struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr))[32];
+
+/**
+ * Hash of the payment preimage, to lock the payment until the receiver releases the preimage.
+ */
+void PendingHTLCInfo_set_payment_hash(struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Amount received in the incoming HTLC.
+ *
+ * This field was added in LDK 0.0.113 and will be `None` for objects written by prior
+ * versions.
+ */
+struct LDKCOption_u64Z PendingHTLCInfo_get_incoming_amt_msat(const struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Amount received in the incoming HTLC.
+ *
+ * This field was added in LDK 0.0.113 and will be `None` for objects written by prior
+ * versions.
+ */
+void PendingHTLCInfo_set_incoming_amt_msat(struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * The amount the sender indicated should be forwarded on to the next hop or amount the sender
+ * intended for us to receive for received payments.
+ *
+ * If the received amount is less than this for received payments, an intermediary hop has
+ * attempted to steal some of our funds and we should fail the HTLC (the sender should retry
+ * it along another path).
+ *
+ * Because nodes can take less than their required fees, and because senders may wish to
+ * improve their own privacy, this amount may be less than [`Self::incoming_amt_msat`] for
+ * received payments. In such cases, recipients must handle this HTLC as if it had received
+ * [`Self::outgoing_amt_msat`].
+ */
+uint64_t PendingHTLCInfo_get_outgoing_amt_msat(const struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The amount the sender indicated should be forwarded on to the next hop or amount the sender
+ * intended for us to receive for received payments.
+ *
+ * If the received amount is less than this for received payments, an intermediary hop has
+ * attempted to steal some of our funds and we should fail the HTLC (the sender should retry
+ * it along another path).
+ *
+ * Because nodes can take less than their required fees, and because senders may wish to
+ * improve their own privacy, this amount may be less than [`Self::incoming_amt_msat`] for
+ * received payments. In such cases, recipients must handle this HTLC as if it had received
+ * [`Self::outgoing_amt_msat`].
+ */
+void PendingHTLCInfo_set_outgoing_amt_msat(struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The CLTV the sender has indicated we should set on the forwarded HTLC (or has indicated
+ * should have been set on the received HTLC for received payments).
+ */
+uint32_t PendingHTLCInfo_get_outgoing_cltv_value(const struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The CLTV the sender has indicated we should set on the forwarded HTLC (or has indicated
+ * should have been set on the received HTLC for received payments).
+ */
+void PendingHTLCInfo_set_outgoing_cltv_value(struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * The fee taken for this HTLC in addition to the standard protocol HTLC fees.
+ *
+ * If this is a payment for forwarding, this is the fee we are taking before forwarding the
+ * HTLC.
+ *
+ * If this is a received payment, this is the fee that our counterparty took.
+ *
+ * This is used to allow LSPs to take fees as a part of payments, without the sender having to
+ * shoulder them.
+ */
+struct LDKCOption_u64Z PendingHTLCInfo_get_skimmed_fee_msat(const struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The fee taken for this HTLC in addition to the standard protocol HTLC fees.
+ *
+ * If this is a payment for forwarding, this is the fee we are taking before forwarding the
+ * HTLC.
+ *
+ * If this is a received payment, this is the fee that our counterparty took.
+ *
+ * This is used to allow LSPs to take fees as a part of payments, without the sender having to
+ * shoulder them.
+ */
+void PendingHTLCInfo_set_skimmed_fee_msat(struct LDKPendingHTLCInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * Constructs a new PendingHTLCInfo given each field
+ */
+MUST_USE_RES struct LDKPendingHTLCInfo PendingHTLCInfo_new(struct LDKPendingHTLCRouting routing_arg, struct LDKThirtyTwoBytes incoming_shared_secret_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u64Z incoming_amt_msat_arg, uint64_t outgoing_amt_msat_arg, uint32_t outgoing_cltv_value_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg);
+
+/**
+ * Creates a copy of the PendingHTLCInfo
+ */
+struct LDKPendingHTLCInfo PendingHTLCInfo_clone(const struct LDKPendingHTLCInfo *NONNULL_PTR orig);
+
+/**
+ * Creates a copy of the BlindedFailure
+ */
+enum LDKBlindedFailure BlindedFailure_clone(const enum LDKBlindedFailure *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new FromIntroductionNode-variant BlindedFailure
+ */
+enum LDKBlindedFailure BlindedFailure_from_introduction_node(void);
+
+/**
+ * Utility method to constructs a new FromBlindedNode-variant BlindedFailure
+ */
+enum LDKBlindedFailure BlindedFailure_from_blinded_node(void);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the BlindedFailure.
+ */
+uint64_t BlindedFailure_hash(const enum LDKBlindedFailure *NONNULL_PTR o);
+
+/**
+ * Checks if two BlindedFailures contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool BlindedFailure_eq(const enum LDKBlindedFailure *NONNULL_PTR a, const enum LDKBlindedFailure *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the FailureCode
+ */
+void FailureCode_free(struct LDKFailureCode this_ptr);
+
 /**
  * Creates a copy of the FailureCode
  */
-enum LDKFailureCode FailureCode_clone(const enum LDKFailureCode *NONNULL_PTR orig);
+struct LDKFailureCode FailureCode_clone(const struct LDKFailureCode *NONNULL_PTR orig);
 
 /**
  * Utility method to constructs a new TemporaryNodeFailure-variant FailureCode
  */
-enum LDKFailureCode FailureCode_temporary_node_failure(void);
+struct LDKFailureCode FailureCode_temporary_node_failure(void);
 
 /**
  * Utility method to constructs a new RequiredNodeFeatureMissing-variant FailureCode
  */
-enum LDKFailureCode FailureCode_required_node_feature_missing(void);
+struct LDKFailureCode FailureCode_required_node_feature_missing(void);
 
 /**
  * Utility method to constructs a new IncorrectOrUnknownPaymentDetails-variant FailureCode
  */
-enum LDKFailureCode FailureCode_incorrect_or_unknown_payment_details(void);
+struct LDKFailureCode FailureCode_incorrect_or_unknown_payment_details(void);
+
+/**
+ * Utility method to constructs a new InvalidOnionPayload-variant FailureCode
+ */
+struct LDKFailureCode FailureCode_invalid_onion_payload(struct LDKCOption_C2Tuple_u64u16ZZ a);
 
 /**
  * Frees any resources used by the ChannelManager, if is_owned is set and inner is non-NULL.
@@ -27828,6 +36446,8 @@ void ChannelCounterparty_set_outbound_htlc_maximum_msat(struct LDKChannelCounter
 
 /**
  * Constructs a new ChannelCounterparty given each field
+ *
+ * Note that forwarding_info_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
 MUST_USE_RES struct LDKChannelCounterparty ChannelCounterparty_new(struct LDKPublicKey node_id_arg, struct LDKInitFeatures features_arg, uint64_t unspendable_punishment_reserve_arg, struct LDKCounterpartyForwardingInfo forwarding_info_arg, struct LDKCOption_u64Z outbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z outbound_htlc_maximum_msat_arg);
 
@@ -27847,7 +36467,7 @@ void ChannelDetails_free(struct LDKChannelDetails this_obj);
  * Note that this means this value is *not* persistent - it can change once during the
  * lifetime of the channel.
  */
-const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
 
 /**
  * The channel's ID (prior to funding transaction generation, this is a random 32 bytes,
@@ -27855,7 +36475,7 @@ const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NO
  * Note that this means this value is *not* persistent - it can change once during the
  * lifetime of the channel.
  */
-void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * Parameters which apply to our counterparty. See individual fields for more information.
@@ -27871,9 +36491,6 @@ void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_
  * The Channel's funding transaction output, if we've negotiated the funding transaction with
  * our counterparty already.
  *
- * Note that, if this has been set, `channel_id` will be equivalent to
- * `funding_txo.unwrap().to_channel_id()`.
- *
  * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
 struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
@@ -27882,9 +36499,6 @@ struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails
  * The Channel's funding transaction output, if we've negotiated the funding transaction with
  * our counterparty already.
  *
- * Note that, if this has been set, `channel_id` will be equivalent to
- * `funding_txo.unwrap().to_channel_id()`.
- *
  * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
 void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
@@ -28032,16 +36646,28 @@ struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const s
 void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
 
 /**
- * The `user_channel_id` passed in to create_channel, or a random value if the channel was
- * inbound. This may be zero for inbound channels serialized with LDK versions prior to
- * 0.0.113.
+ * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
+ * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
+ * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
+ * `user_channel_id` will be randomized for an inbound channel.  This may be zero for objects
+ * serialized with LDK versions prior to 0.0.113.
+ *
+ * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
+ * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
+ * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
  */
 struct LDKU128 ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
 
 /**
- * The `user_channel_id` passed in to create_channel, or a random value if the channel was
- * inbound. This may be zero for inbound channels serialized with LDK versions prior to
- * 0.0.113.
+ * The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
+ * channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
+ * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
+ * `user_channel_id` will be randomized for an inbound channel.  This may be zero for objects
+ * serialized with LDK versions prior to 0.0.113.
+ *
+ * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
+ * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
+ * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
  */
 void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKU128 val);
 
@@ -28359,11 +36985,6 @@ struct LDKChannelConfig ChannelDetails_get_config(const struct LDKChannelDetails
  */
 void ChannelDetails_set_config(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
 
-/**
- * Constructs a new ChannelDetails given each field
- */
-MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKChannelTypeFeatures channel_type_arg, struct LDKCOption_u64Z short_channel_id_arg, struct LDKCOption_u64Z outbound_scid_alias_arg, struct LDKCOption_u64Z inbound_scid_alias_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, struct LDKU128 user_channel_id_arg, struct LDKCOption_u32Z feerate_sat_per_1000_weight_arg, uint64_t balance_msat_arg, uint64_t outbound_capacity_msat_arg, uint64_t next_outbound_htlc_limit_msat_arg, uint64_t next_outbound_htlc_minimum_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u32Z confirmations_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_channel_ready_arg, struct LDKCOption_ChannelShutdownStateZ channel_shutdown_state_arg, bool is_usable_arg, bool is_public_arg, struct LDKCOption_u64Z inbound_htlc_minimum_msat_arg, struct LDKCOption_u64Z inbound_htlc_maximum_msat_arg, struct LDKChannelConfig config_arg);
-
 /**
  * Creates a copy of the ChannelDetails
  */
@@ -28435,20 +37056,25 @@ void RecentPaymentDetails_free(struct LDKRecentPaymentDetails this_ptr);
  */
 struct LDKRecentPaymentDetails RecentPaymentDetails_clone(const struct LDKRecentPaymentDetails *NONNULL_PTR orig);
 
+/**
+ * Utility method to constructs a new AwaitingInvoice-variant RecentPaymentDetails
+ */
+struct LDKRecentPaymentDetails RecentPaymentDetails_awaiting_invoice(struct LDKThirtyTwoBytes payment_id);
+
 /**
  * Utility method to constructs a new Pending-variant RecentPaymentDetails
  */
-struct LDKRecentPaymentDetails RecentPaymentDetails_pending(struct LDKThirtyTwoBytes payment_hash, uint64_t total_msat);
+struct LDKRecentPaymentDetails RecentPaymentDetails_pending(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, uint64_t total_msat);
 
 /**
  * Utility method to constructs a new Fulfilled-variant RecentPaymentDetails
  */
-struct LDKRecentPaymentDetails RecentPaymentDetails_fulfilled(struct LDKCOption_PaymentHashZ payment_hash);
+struct LDKRecentPaymentDetails RecentPaymentDetails_fulfilled(struct LDKThirtyTwoBytes payment_id, struct LDKCOption_ThirtyTwoBytesZ payment_hash);
 
 /**
  * Utility method to constructs a new Abandoned-variant RecentPaymentDetails
  */
-struct LDKRecentPaymentDetails RecentPaymentDetails_abandoned(struct LDKThirtyTwoBytes payment_hash);
+struct LDKRecentPaymentDetails RecentPaymentDetails_abandoned(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash);
 
 /**
  * Frees any resources used by the PhantomRouteHints, if is_owned is set and inner is non-NULL.
@@ -28543,6 +37169,9 @@ MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configurati
  * connection is available, the outbound `open_channel` message may fail to send, resulting in
  * the channel eventually being silently forgotten (dropped on reload).
  *
+ * If `temporary_channel_id` is specified, it will be used as the temporary channel ID of the
+ * channel. Otherwise, a random one will be generated for you.
+ *
  * Returns the new Channel's temporary `channel_id`. This ID will appear as
  * [`Event::FundingGenerationReady::temporary_channel_id`] and in
  * [`ChannelDetails::channel_id`] until after
@@ -28554,9 +37183,10 @@ MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configurati
  * [`Event::FundingGenerationReady::temporary_channel_id`]: events::Event::FundingGenerationReady::temporary_channel_id
  * [`Event::ChannelClosed::channel_id`]: events::Event::ChannelClosed::channel_id
  *
+ * Note that temporary_channel_id (or a relevant inner pointer) may be NULL or all-0s to represent None
  * Note that override_config (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKCResult__u832APIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKUserConfig override_config);
+MUST_USE_RES struct LDKCResult_ChannelIdAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, struct LDKU128 user_channel_id, struct LDKChannelId temporary_channel_id, struct LDKUserConfig override_config);
 
 /**
  * Gets the list of open channels, in random order. See [`ChannelDetails`] field documentation for
@@ -28596,11 +37226,11 @@ MUST_USE_RES struct LDKCVec_RecentPaymentDetailsZ ChannelManager_list_recent_pay
  * will be accepted on the given channel, and after additional timeout/the closing of all
  * pending HTLCs, the channel will be closed on chain.
  *
- *  * If we are the channel initiator, we will pay between our [`Background`] and
- *    [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`Normal`] fee
- *    estimate.
+ *  * If we are the channel initiator, we will pay between our [`ChannelCloseMinimum`] and
+ *    [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`NonAnchorChannelFee`]
+ *    fee estimate.
  *  * If our counterparty is the channel initiator, we will require a channel closing
- *    transaction feerate of at least our [`Background`] feerate or the feerate which
+ *    transaction feerate of at least our [`ChannelCloseMinimum`] feerate or the feerate which
  *    would appear on a force-closure transaction, whichever is lower. We will allow our
  *    counterparty to pay as much fee as they'd like, however.
  *
@@ -28612,11 +37242,11 @@ MUST_USE_RES struct LDKCVec_RecentPaymentDetailsZ ChannelManager_list_recent_pay
  * channel.
  *
  * [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
- * [`Background`]: crate::chain::chaininterface::ConfirmationTarget::Background
- * [`Normal`]: crate::chain::chaininterface::ConfirmationTarget::Normal
+ * [`ChannelCloseMinimum`]: crate::chain::chaininterface::ConfirmationTarget::ChannelCloseMinimum
+ * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
  * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
 
 /**
  * Begins the process of closing a channel. After this call (plus some timeout), no new HTLCs
@@ -28627,8 +37257,8 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const
  * the channel being closed or not:
  *  * If we are the channel initiator, we will pay at least this feerate on the closing
  *    transaction. The upper-bound is set by
- *    [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`Normal`] fee
- *    estimate (or `target_feerate_sat_per_1000_weight`, if it is greater).
+ *    [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`NonAnchorChannelFee`]
+ *    fee estimate (or `target_feerate_sat_per_1000_weight`, if it is greater).
  *  * If our counterparty is the channel initiator, we will refuse to accept a channel closure
  *    transaction feerate below `target_feerate_sat_per_1000_weight` (or the feerate which
  *    will appear on a force-closure transaction, whichever is lower).
@@ -28646,13 +37276,12 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const
  * channel.
  *
  * [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
- * [`Background`]: crate::chain::chaininterface::ConfirmationTarget::Background
- * [`Normal`]: crate::chain::chaininterface::ConfirmationTarget::Normal
+ * [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
  * [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
  *
  * Note that shutdown_script (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_feerate_and_script(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u32Z target_feerate_sats_per_1000_weight, struct LDKShutdownScript shutdown_script);
 
 /**
  * Force closes a channel, immediately broadcasting the latest local transaction(s) and
@@ -28660,17 +37289,17 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_f
  * the manager, or if the `counterparty_node_id` isn't the counterparty of the corresponding
  * channel.
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_broadcasting_latest_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
 
 /**
  * Force closes a channel, rejecting new HTLCs on the given channel but skips broadcasting
  * the latest local transaction(s). Fails if `channel_id` is unknown to the manager, or if the
  * `counterparty_node_id` isn't the counterparty of the corresponding channel.
  *
- * You can always get the latest local transaction(s) to broadcast from
- * [`ChannelMonitor::get_latest_holder_commitment_txn`].
+ * You can always broadcast the latest local transaction(s) via
+ * [`ChannelMonitor::broadcast_latest_holder_commitment_txn`].
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], struct LDKPublicKey counterparty_node_id);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_without_broadcasting_txn(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR channel_id, struct LDKPublicKey counterparty_node_id);
 
 /**
  * Force close all channels, immediately broadcasting the latest local commitment transaction
@@ -28721,9 +37350,8 @@ void ChannelManager_force_close_all_channels_without_broadcasting_txn(const stru
  * In general, a path may raise:
  *  * [`APIError::InvalidRoute`] when an invalid route or forwarding parameter (cltv_delta, fee,
  *    node public key) is specified.
- *  * [`APIError::ChannelUnavailable`] if the next-hop channel is not available for updates
- *    (including due to previous monitor update failure or new permanent monitor update
- *    failure).
+ *  * [`APIError::ChannelUnavailable`] if the next-hop channel is not available as it has been
+ *    closed, doesn't exist, or the peer is currently disconnected.
  *  * [`APIError::MonitorUpdateInProgress`] if a new monitor update failure prevented sending the
  *    relevant updates.
  *
@@ -28747,10 +37375,12 @@ MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payme
 MUST_USE_RES struct LDKCResult_NoneRetryableSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id, struct LDKRouteParameters route_params, struct LDKRetry retry_strategy);
 
 /**
- * Signals that no further retries for the given payment should occur. Useful if you have a
+ * Signals that no further attempts for the given payment should occur. Useful if you have a
  * pending outbound payment with retries remaining, but wish to stop retrying the payment before
  * retries are exhausted.
  *
+ * # Event Generation
+ *
  * If no [`Event::PaymentFailed`] event had been generated before, one will be generated as soon
  * as there are no remaining pending HTLCs for this payment.
  *
@@ -28758,11 +37388,20 @@ MUST_USE_RES struct LDKCResult_NoneRetryableSendFailureZ ChannelManager_send_pay
  * wait until you receive either a [`Event::PaymentFailed`] or [`Event::PaymentSent`] event to
  * determine the ultimate status of a payment.
  *
- * If an [`Event::PaymentFailed`] event is generated and we restart without this
- * [`ChannelManager`] having been persisted, another [`Event::PaymentFailed`] may be generated.
+ * # Requested Invoices
  *
- * [`Event::PaymentFailed`]: events::Event::PaymentFailed
- * [`Event::PaymentSent`]: events::Event::PaymentSent
+ * In the case of paying a [`Bolt12Invoice`] via [`ChannelManager::pay_for_offer`], abandoning
+ * the payment prior to receiving the invoice will result in an [`Event::InvoiceRequestFailed`]
+ * and prevent any attempts at paying it once received. The other events may only be generated
+ * once the invoice has been received.
+ *
+ * # Restart Behavior
+ *
+ * If an [`Event::PaymentFailed`] is generated and we restart without first persisting the
+ * [`ChannelManager`], another [`Event::PaymentFailed`] may be generated; likewise for
+ * [`Event::InvoiceRequestFailed`].
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
  */
 void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id);
 
@@ -28781,7 +37420,7 @@ void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR
  *
  * [`send_payment`]: Self::send_payment
  */
-MUST_USE_RES struct LDKCResult_PaymentHashPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKCOption_PaymentPreimageZ payment_preimage, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id);
+MUST_USE_RES struct LDKCResult_ThirtyTwoBytesPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id);
 
 /**
  * Similar to [`ChannelManager::send_spontaneous_payment`], but will automatically find a route
@@ -28792,14 +37431,40 @@ MUST_USE_RES struct LDKCResult_PaymentHashPaymentSendFailureZ ChannelManager_sen
  *
  * [`PaymentParameters::for_keysend`]: crate::routing::router::PaymentParameters::for_keysend
  */
-MUST_USE_RES struct LDKCResult_PaymentHashRetryableSendFailureZ ChannelManager_send_spontaneous_payment_with_retry(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_PaymentPreimageZ payment_preimage, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id, struct LDKRouteParameters route_params, struct LDKRetry retry_strategy);
+MUST_USE_RES struct LDKCResult_ThirtyTwoBytesRetryableSendFailureZ ChannelManager_send_spontaneous_payment_with_retry(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKRecipientOnionFields recipient_onion, struct LDKThirtyTwoBytes payment_id, struct LDKRouteParameters route_params, struct LDKRetry retry_strategy);
 
 /**
  * Send a payment that is probing the given route for liquidity. We calculate the
  * [`PaymentHash`] of probes based on a static secret and a random [`PaymentId`], which allows
  * us to easily discern them from real payments.
  */
-MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ChannelManager_send_probe(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPath path);
+MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZPaymentSendFailureZ ChannelManager_send_probe(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPath path);
+
+/**
+ * Sends payment probes over all paths of a route that would be used to pay the given
+ * amount to the given `node_id`.
+ *
+ * See [`ChannelManager::send_preflight_probes`] for more information.
+ */
+MUST_USE_RES struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ChannelManager_send_spontaneous_preflight_probes(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, uint64_t amount_msat, uint32_t final_cltv_expiry_delta, struct LDKCOption_u64Z liquidity_limit_multiplier);
+
+/**
+ * Sends payment probes over all paths of a route that would be used to pay a route found
+ * according to the given [`RouteParameters`].
+ *
+ * This may be used to send \"pre-flight\" probes, i.e., to train our scorer before conducting
+ * the actual payment. Note this is only useful if there likely is sufficient time for the
+ * probe to settle before sending out the actual payment, e.g., when waiting for user
+ * confirmation in a wallet UI.
+ *
+ * Otherwise, there is a chance the probe could take up some liquidity needed to complete the
+ * actual payment. Users should therefore be cautious and might avoid sending probes if
+ * liquidity is scarce and/or they don't expect the probe to return before they send the
+ * payment. To mitigate this issue, channels with available liquidity less than the required
+ * amount times the given `liquidity_limit_multiplier` won't be used to send pre-flight
+ * probes. If `None` is given as `liquidity_limit_multiplier`, it defaults to `3`.
+ */
+MUST_USE_RES struct LDKCResult_CVec_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZZProbeSendFailureZ ChannelManager_send_preflight_probes(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKRouteParameters route_params, struct LDKCOption_u64Z liquidity_limit_multiplier);
 
 /**
  * Call this upon creation of a funding transaction for the given channel.
@@ -28833,7 +37498,21 @@ MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ
  * [`Event::FundingGenerationReady`]: crate::events::Event::FundingGenerationReady
  * [`Event::ChannelClosed`]: crate::events::Event::ChannelClosed
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKTransaction funding_transaction);
+
+/**
+ * Call this upon creation of a batch funding transaction for the given channels.
+ *
+ * Return values are identical to [`Self::funding_transaction_generated`], respective to
+ * each individual channel and transaction output.
+ *
+ * Do NOT broadcast the funding transaction yourself. This batch funding transaction
+ * will only be broadcast when we have safely received and persisted the counterparty's
+ * signature for each channel.
+ *
+ * If there is an error, all channels in the batch are to be considered closed.
+ */
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_batch_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_ChannelIdPublicKeyZZ temporary_channels, struct LDKTransaction funding_transaction);
 
 /**
  * Atomically applies partial updates to the [`ChannelConfig`] of the given channels.
@@ -28859,7 +37538,7 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_
  * [`ChannelUnavailable`]: APIError::ChannelUnavailable
  * [`APIMisuseError`]: APIError::APIMisuseError
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfigUpdate *NONNULL_PTR config_update);
 
 /**
  * Atomically updates the [`ChannelConfig`] for the given channels.
@@ -28885,7 +37564,7 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_partial_chann
  * [`ChannelUnavailable`]: APIError::ChannelUnavailable
  * [`APIMisuseError`]: APIError::APIMisuseError
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ThirtyTwoBytesZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_config(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey counterparty_node_id, struct LDKCVec_ChannelIdZ channel_ids, const struct LDKChannelConfig *NONNULL_PTR config);
 
 /**
  * Attempts to forward an intercepted HTLC over the provided channel id and with the provided
@@ -28912,7 +37591,7 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_update_channel_confi
  * [`HTLCIntercepted`]: events::Event::HTLCIntercepted
  * [`HTLCIntercepted::expected_outbound_amount_msat`]: events::Event::HTLCIntercepted::expected_outbound_amount_msat
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const uint8_t (*next_hop_channel_id)[32], struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_forward_intercepted_htlc(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes intercept_id, const struct LDKChannelId *NONNULL_PTR next_hop_channel_id, struct LDKPublicKey next_node_id, uint64_t amt_to_forward_msat);
 
 /**
  * Fails the intercepted HTLC indicated by intercept_id. Should only be called in response to
@@ -28945,6 +37624,10 @@ void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager
  *    with the current [`ChannelConfig`].
  *  * Removing peers which have disconnected but and no longer have any channels.
  *  * Force-closing and removing channels which have not completed establishment in a timely manner.
+ *  * Forgetting about stale outbound payments, either those that have already been fulfilled
+ *    or those awaiting an invoice that hasn't been delivered in the necessary amount of time.
+ *    The latter is determined using the system clock in `std` and the highest seen block time
+ *    minus two hours in `no-std`.
  *
  * Note that this may cause reentrancy through [`chain::Watch::update_channel`] calls or feerate
  * estimate fetches.
@@ -28977,7 +37660,7 @@ void ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_
  *
  * See [`FailureCode`] for valid failure codes.
  */
-void ChannelManager_fail_htlc_backwards_with_reason(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32], enum LDKFailureCode failure_code);
+void ChannelManager_fail_htlc_backwards_with_reason(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32], struct LDKFailureCode failure_code);
 
 /**
  * Provides a payment preimage in response to [`Event::PaymentClaimable`], generating any
@@ -28993,15 +37676,33 @@ void ChannelManager_fail_htlc_backwards_with_reason(const struct LDKChannelManag
  * event matches your expectation. If you fail to do so and call this method, you may provide
  * the sender \"proof-of-payment\" when they did not fulfill the full expected payment.
  *
+ * This function will fail the payment if it has custom TLVs with even type numbers, as we
+ * will assume they are unknown. If you intend to accept even custom TLVs, you should use
+ * [`claim_funds_with_known_custom_tlvs`].
+ *
  * [`Event::PaymentClaimable`]: crate::events::Event::PaymentClaimable
  * [`Event::PaymentClaimable::claim_deadline`]: crate::events::Event::PaymentClaimable::claim_deadline
  * [`Event::PaymentClaimed`]: crate::events::Event::PaymentClaimed
  * [`process_pending_events`]: EventsProvider::process_pending_events
  * [`create_inbound_payment`]: Self::create_inbound_payment
  * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
+ * [`claim_funds_with_known_custom_tlvs`]: Self::claim_funds_with_known_custom_tlvs
  */
 void ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
 
+/**
+ * This is a variant of [`claim_funds`] that allows accepting a payment with custom TLVs with
+ * even type numbers.
+ *
+ * # Note
+ *
+ * You MUST check you've understood all even TLVs before using this to
+ * claim, otherwise you may unintentionally agree to some protocol you do not understand.
+ *
+ * [`claim_funds`]: Self::claim_funds
+ */
+void ChannelManager_claim_funds_with_known_custom_tlvs(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
+
 /**
  * Gets the node_id held by this ChannelManager
  */
@@ -29025,7 +37726,7 @@ MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDK
  * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
  * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
 
 /**
  * Accepts a request to open a channel after a [`events::Event::OpenChannelRequest`], treating
@@ -29047,7 +37748,170 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_chann
  * [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
  * [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
  */
-MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
+MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_channel_from_trusted_peer_0conf(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKChannelId *NONNULL_PTR temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKU128 user_channel_id);
+
+/**
+ * Creates an [`OfferBuilder`] such that the [`Offer`] it builds is recognized by the
+ * [`ChannelManager`] when handling [`InvoiceRequest`] messages for the offer. The offer will
+ * not have an expiration unless otherwise set on the builder.
+ *
+ * # Privacy
+ *
+ * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the offer.
+ * However, if one is not found, uses a one-hop [`BlindedPath`] with
+ * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
+ * the node must be announced, otherwise, there is no way to find a path to the introduction in
+ * order to send the [`InvoiceRequest`].
+ *
+ * Also, uses a derived signing pubkey in the offer for recipient privacy.
+ *
+ * # Limitations
+ *
+ * Requires a direct connection to the introduction node in the responding [`InvoiceRequest`]'s
+ * reply path.
+ *
+ * # Errors
+ *
+ * Errors if the parameterized [`Router`] is unable to create a blinded path for the offer.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ */
+MUST_USE_RES struct LDKCResult_OfferWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_offer_builder(const struct LDKChannelManager *NONNULL_PTR this_arg);
+
+/**
+ * Creates a [`RefundBuilder`] such that the [`Refund`] it builds is recognized by the
+ * [`ChannelManager`] when handling [`Bolt12Invoice`] messages for the refund.
+ *
+ * # Payment
+ *
+ * The provided `payment_id` is used to ensure that only one invoice is paid for the refund.
+ * See [Avoiding Duplicate Payments] for other requirements once the payment has been sent.
+ *
+ * The builder will have the provided expiration set. Any changes to the expiration on the
+ * returned builder will not be honored by [`ChannelManager`]. For `no-std`, the highest seen
+ * block time minus two hours is used for the current time when determining if the refund has
+ * expired.
+ *
+ * To revoke the refund, use [`ChannelManager::abandon_payment`] prior to receiving the
+ * invoice. If abandoned, or an invoice isn't received before expiration, the payment will fail
+ * with an [`Event::InvoiceRequestFailed`].
+ *
+ * If `max_total_routing_fee_msat` is not specified, The default from
+ * [`RouteParameters::from_payment_params_and_value`] is applied.
+ *
+ * # Privacy
+ *
+ * Uses [`MessageRouter::create_blinded_paths`] to construct a [`BlindedPath`] for the refund.
+ * However, if one is not found, uses a one-hop [`BlindedPath`] with
+ * [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
+ * the node must be announced, otherwise, there is no way to find a path to the introduction in
+ * order to send the [`Bolt12Invoice`].
+ *
+ * Also, uses a derived payer id in the refund for payer privacy.
+ *
+ * # Limitations
+ *
+ * Requires a direct connection to an introduction node in the responding
+ * [`Bolt12Invoice::payment_paths`].
+ *
+ * # Errors
+ *
+ * Errors if:
+ * - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
+ * - `amount_msats` is invalid, or
+ * - the parameterized [`Router`] is unable to create a blinded path for the refund.
+ *
+ * [`Refund`]: crate::offers::refund::Refund
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
+ * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
+ */
+MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ ChannelManager_create_refund_builder(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t amount_msats, uint64_t absolute_expiry, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat);
+
+/**
+ * Pays for an [`Offer`] using the given parameters by creating an [`InvoiceRequest`] and
+ * enqueuing it to be sent via an onion message. [`ChannelManager`] will pay the actual
+ * [`Bolt12Invoice`] once it is received.
+ *
+ * Uses [`InvoiceRequestBuilder`] such that the [`InvoiceRequest`] it builds is recognized by
+ * the [`ChannelManager`] when handling a [`Bolt12Invoice`] message in response to the request.
+ * The optional parameters are used in the builder, if `Some`:
+ * - `quantity` for [`InvoiceRequest::quantity`] which must be set if
+ *   [`Offer::expects_quantity`] is `true`.
+ * - `amount_msats` if overpaying what is required for the given `quantity` is desired, and
+ * - `payer_note` for [`InvoiceRequest::payer_note`].
+ *
+ * If `max_total_routing_fee_msat` is not specified, The default from
+ * [`RouteParameters::from_payment_params_and_value`] is applied.
+ *
+ * # Payment
+ *
+ * The provided `payment_id` is used to ensure that only one invoice is paid for the request
+ * when received. See [Avoiding Duplicate Payments] for other requirements once the payment has
+ * been sent.
+ *
+ * To revoke the request, use [`ChannelManager::abandon_payment`] prior to receiving the
+ * invoice. If abandoned, or an invoice isn't received in a reasonable amount of time, the
+ * payment will fail with an [`Event::InvoiceRequestFailed`].
+ *
+ * # Privacy
+ *
+ * Uses a one-hop [`BlindedPath`] for the reply path with [`ChannelManager::get_our_node_id`]
+ * as the introduction node and a derived payer id for payer privacy. As such, currently, the
+ * node must be announced. Otherwise, there is no way to find a path to the introduction node
+ * in order to send the [`Bolt12Invoice`].
+ *
+ * # Limitations
+ *
+ * Requires a direct connection to an introduction node in [`Offer::paths`] or to
+ * [`Offer::signing_pubkey`], if empty. A similar restriction applies to the responding
+ * [`Bolt12Invoice::payment_paths`].
+ *
+ * # Errors
+ *
+ * Errors if:
+ * - a duplicate `payment_id` is provided given the caveats in the aforementioned link,
+ * - the provided parameters are invalid for the offer,
+ * - the offer is for an unsupported chain, or
+ * - the parameterized [`Router`] is unable to create a blinded reply path for the invoice
+ *   request.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
+ * [`InvoiceRequest::payer_note`]: crate::offers::invoice_request::InvoiceRequest::payer_note
+ * [`InvoiceRequestBuilder`]: crate::offers::invoice_request::InvoiceRequestBuilder
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`Bolt12Invoice::payment_paths`]: crate::offers::invoice::Bolt12Invoice::payment_paths
+ * [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
+ */
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ ChannelManager_pay_for_offer(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOffer *NONNULL_PTR offer, struct LDKCOption_u64Z quantity, struct LDKCOption_u64Z amount_msats, struct LDKCOption_StrZ payer_note, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, struct LDKCOption_u64Z max_total_routing_fee_msat);
+
+/**
+ * Creates a [`Bolt12Invoice`] for a [`Refund`] and enqueues it to be sent via an onion
+ * message.
+ *
+ * The resulting invoice uses a [`PaymentHash`] recognized by the [`ChannelManager`] and a
+ * [`BlindedPath`] containing the [`PaymentSecret`] needed to reconstruct the corresponding
+ * [`PaymentPreimage`]. It is returned purely for informational purposes.
+ *
+ * # Limitations
+ *
+ * Requires a direct connection to an introduction node in [`Refund::paths`] or to
+ * [`Refund::payer_id`], if empty. This request is best effort; an invoice will be sent to each
+ * node meeting the aforementioned criteria, but there's no guarantee that they will be
+ * received and no retries will be made.
+ *
+ * # Errors
+ *
+ * Errors if:
+ * - the refund is for an unsupported chain, or
+ * - the parameterized [`Router`] is unable to create a blinded payment path or reply path for
+ *   the invoice.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ ChannelManager_request_refund_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRefund *NONNULL_PTR refund);
 
 /**
  * Gets a payment secret and payment hash for use in an invoice given to a third party wishing
@@ -29056,10 +37920,9 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_chann
  * This differs from [`create_inbound_payment_for_hash`] only in that it generates the
  * [`PaymentHash`] and [`PaymentPreimage`] for you.
  *
- * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`], which
- * will have the [`PaymentClaimable::purpose`] be [`PaymentPurpose::InvoicePayment`] with
- * its [`PaymentPurpose::InvoicePayment::payment_preimage`] field filled in. That should then be
- * passed directly to [`claim_funds`].
+ * The [`PaymentPreimage`] will ultimately be returned to you in the [`PaymentClaimable`] event, which
+ * will have the [`PaymentClaimable::purpose`] return `Some` for [`PaymentPurpose::preimage`]. That
+ * should then be passed directly to [`claim_funds`].
  *
  * See [`create_inbound_payment_for_hash`] for detailed documentation on behavior and requirements.
  *
@@ -29079,11 +37942,10 @@ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_accept_inbound_chann
  * [`claim_funds`]: Self::claim_funds
  * [`PaymentClaimable`]: events::Event::PaymentClaimable
  * [`PaymentClaimable::purpose`]: events::Event::PaymentClaimable::purpose
- * [`PaymentPurpose::InvoicePayment`]: events::PaymentPurpose::InvoicePayment
- * [`PaymentPurpose::InvoicePayment::payment_preimage`]: events::PaymentPurpose::InvoicePayment::payment_preimage
+ * [`PaymentPurpose::preimage`]: events::PaymentPurpose::preimage
  * [`create_inbound_payment_for_hash`]: Self::create_inbound_payment_for_hash
  */
-MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+MUST_USE_RES struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
 
 /**
  * Gets a [`PaymentSecret`] for a given [`PaymentHash`], for which the payment preimage is
@@ -29133,7 +37995,7 @@ MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ ChannelMan
  * [`create_inbound_payment`]: Self::create_inbound_payment
  * [`PaymentClaimable`]: events::Event::PaymentClaimable
  */
-MUST_USE_RES struct LDKCResult_PaymentSecretNoneZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry);
+MUST_USE_RES struct LDKCResult_ThirtyTwoBytesNoneZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, struct LDKCOption_u16Z min_final_cltv_expiry);
 
 /**
  * Gets an LDK-generated payment preimage from a payment hash and payment secret that were
@@ -29141,7 +38003,7 @@ MUST_USE_RES struct LDKCResult_PaymentSecretNoneZ ChannelManager_create_inbound_
  *
  * [`create_inbound_payment`]: Self::create_inbound_payment
  */
-MUST_USE_RES struct LDKCResult_PaymentPreimageAPIErrorZ ChannelManager_get_payment_preimage(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
+MUST_USE_RES struct LDKCResult_ThirtyTwoBytesAPIErrorZ ChannelManager_get_payment_preimage(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
 
 /**
  * Gets a fake short channel id for use in receiving [phantom node payments]. These fake scids
@@ -29199,13 +38061,24 @@ struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNUL
 struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
 /**
- * Gets a [`Future`] that completes when this [`ChannelManager`] needs to be persisted.
+ * Gets a [`Future`] that completes when this [`ChannelManager`] may need to be persisted or
+ * may have events that need processing.
+ *
+ * In order to check if this [`ChannelManager`] needs persisting, call
+ * [`Self::get_and_clear_needs_persistence`].
  *
  * Note that callbacks registered on the [`Future`] MUST NOT call back into this
  * [`ChannelManager`] and should instead register actions to be taken later.
+ */
+MUST_USE_RES struct LDKFuture ChannelManager_get_event_or_persistence_needed_future(const struct LDKChannelManager *NONNULL_PTR this_arg);
+
+/**
+ * Returns true if this [`ChannelManager`] needs to be persisted.
  *
+ * See [`Self::get_event_or_persistence_needed_future`] for retrieving a [`Future`] that
+ * indicates this should be checked.
  */
-MUST_USE_RES struct LDKFuture ChannelManager_get_persistable_update_future(const struct LDKChannelManager *NONNULL_PTR this_arg);
+MUST_USE_RES bool ChannelManager_get_and_clear_needs_persistence(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
 /**
  * Gets the latest best block which was connected either via the [`chain::Listen`] or
@@ -29214,25 +38087,25 @@ MUST_USE_RES struct LDKFuture ChannelManager_get_persistable_update_future(const
 MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
 /**
- * Fetches the set of [`NodeFeatures`] flags which are provided by or required by
+ * Fetches the set of [`NodeFeatures`] flags that are provided by or required by
  * [`ChannelManager`].
  */
 MUST_USE_RES struct LDKNodeFeatures ChannelManager_node_features(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
 /**
- * Fetches the set of [`ChannelFeatures`] flags which are provided by or required by
+ * Fetches the set of [`ChannelFeatures`] flags that are provided by or required by
  * [`ChannelManager`].
  */
 MUST_USE_RES struct LDKChannelFeatures ChannelManager_channel_features(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
 /**
- * Fetches the set of [`ChannelTypeFeatures`] flags which are provided by or required by
+ * Fetches the set of [`ChannelTypeFeatures`] flags that are provided by or required by
  * [`ChannelManager`].
  */
 MUST_USE_RES struct LDKChannelTypeFeatures ChannelManager_channel_type_features(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
 /**
- * Fetches the set of [`InitFeatures`] flags which are provided by or required by
+ * Fetches the set of [`InitFeatures`] flags that are provided by or required by
  * [`ChannelManager`].
  */
 MUST_USE_RES struct LDKInitFeatures ChannelManager_init_features(const struct LDKChannelManager *NONNULL_PTR this_arg);
@@ -29244,7 +38117,19 @@ MUST_USE_RES struct LDKInitFeatures ChannelManager_init_features(const struct LD
 struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
 /**
- * Fetches the set of [`InitFeatures`] flags which are provided by or required by
+ * Constructs a new OffersMessageHandler which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OffersMessageHandler must be freed before this_arg is
+ */
+struct LDKOffersMessageHandler ChannelManager_as_OffersMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is
+ */
+struct LDKNodeIdLookUp ChannelManager_as_NodeIdLookUp(const struct LDKChannelManager *NONNULL_PTR this_arg);
+
+/**
+ * Fetches the set of [`InitFeatures`] flags that are provided by or required by
  * [`ChannelManager`].
  */
 struct LDKInitFeatures provided_init_features(const struct LDKUserConfig *NONNULL_PTR config);
@@ -29289,6 +38174,46 @@ struct LDKCVec_u8Z PhantomRouteHints_write(const struct LDKPhantomRouteHints *NO
  */
 struct LDKCResult_PhantomRouteHintsDecodeErrorZ PhantomRouteHints_read(struct LDKu8slice ser);
 
+/**
+ * Serialize the BlindedForward object into a byte array which can be read by BlindedForward_read
+ */
+struct LDKCVec_u8Z BlindedForward_write(const struct LDKBlindedForward *NONNULL_PTR obj);
+
+/**
+ * Read a BlindedForward from a byte array, created by BlindedForward_write
+ */
+struct LDKCResult_BlindedForwardDecodeErrorZ BlindedForward_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the PendingHTLCRouting object into a byte array which can be read by PendingHTLCRouting_read
+ */
+struct LDKCVec_u8Z PendingHTLCRouting_write(const struct LDKPendingHTLCRouting *NONNULL_PTR obj);
+
+/**
+ * Read a PendingHTLCRouting from a byte array, created by PendingHTLCRouting_write
+ */
+struct LDKCResult_PendingHTLCRoutingDecodeErrorZ PendingHTLCRouting_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the PendingHTLCInfo object into a byte array which can be read by PendingHTLCInfo_read
+ */
+struct LDKCVec_u8Z PendingHTLCInfo_write(const struct LDKPendingHTLCInfo *NONNULL_PTR obj);
+
+/**
+ * Read a PendingHTLCInfo from a byte array, created by PendingHTLCInfo_write
+ */
+struct LDKCResult_PendingHTLCInfoDecodeErrorZ PendingHTLCInfo_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the BlindedFailure object into a byte array which can be read by BlindedFailure_read
+ */
+struct LDKCVec_u8Z BlindedFailure_write(const enum LDKBlindedFailure *NONNULL_PTR obj);
+
+/**
+ * Read a BlindedFailure from a byte array, created by BlindedFailure_write
+ */
+struct LDKCResult_BlindedFailureDecodeErrorZ BlindedFailure_read(struct LDKu8slice ser);
+
 /**
  * Serialize the ChannelManager object into a byte array which can be read by ChannelManager_read
  */
@@ -29437,9 +38362,325 @@ void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs
 MUST_USE_RES struct LDKChannelManagerReadArgs ChannelManagerReadArgs_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKSignerProvider signer_provider, struct LDKFeeEstimator fee_estimator, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKRouter router, struct LDKLogger logger, struct LDKUserConfig default_config, struct LDKCVec_ChannelMonitorZ channel_monitors);
 
 /**
- * Read a C2Tuple_BlockHashChannelManagerZ from a byte array, created by C2Tuple_BlockHashChannelManagerZ_write
+ * Read a C2Tuple_ThirtyTwoBytesChannelManagerZ from a byte array, created by C2Tuple_ThirtyTwoBytesChannelManagerZ_write
+ */
+struct LDKCResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ C2Tuple_ThirtyTwoBytesChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
+
+/**
+ * Frees any resources used by the DelayedPaymentBasepoint, if is_owned is set and inner is non-NULL.
+ */
+void DelayedPaymentBasepoint_free(struct LDKDelayedPaymentBasepoint this_obj);
+
+struct LDKPublicKey DelayedPaymentBasepoint_get_a(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_ptr);
+
+void DelayedPaymentBasepoint_set_a(struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Constructs a new DelayedPaymentBasepoint given each field
+ */
+MUST_USE_RES struct LDKDelayedPaymentBasepoint DelayedPaymentBasepoint_new(struct LDKPublicKey a_arg);
+
+/**
+ * Checks if two DelayedPaymentBasepoints contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool DelayedPaymentBasepoint_eq(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR a, const struct LDKDelayedPaymentBasepoint *NONNULL_PTR b);
+
+/**
+ * Creates a copy of the DelayedPaymentBasepoint
+ */
+struct LDKDelayedPaymentBasepoint DelayedPaymentBasepoint_clone(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the DelayedPaymentBasepoint.
+ */
+uint64_t DelayedPaymentBasepoint_hash(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR o);
+
+/**
+ * Get inner Public Key
+ */
+MUST_USE_RES struct LDKPublicKey DelayedPaymentBasepoint_to_public_key(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg);
+
+/**
+ *Derives the \"tweak\" used in calculate [`DelayedPaymentKey::from_basepoint`].\n\n[`DelayedPaymentKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes DelayedPaymentBasepoint_derive_add_tweak(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point);
+
+/**
+ * Serialize the DelayedPaymentBasepoint object into a byte array which can be read by DelayedPaymentBasepoint_read
+ */
+struct LDKCVec_u8Z DelayedPaymentBasepoint_write(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR obj);
+
+/**
+ * Read a DelayedPaymentBasepoint from a byte array, created by DelayedPaymentBasepoint_write
+ */
+struct LDKCResult_DelayedPaymentBasepointDecodeErrorZ DelayedPaymentBasepoint_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the DelayedPaymentKey, if is_owned is set and inner is non-NULL.
+ */
+void DelayedPaymentKey_free(struct LDKDelayedPaymentKey this_obj);
+
+struct LDKPublicKey DelayedPaymentKey_get_a(const struct LDKDelayedPaymentKey *NONNULL_PTR this_ptr);
+
+void DelayedPaymentKey_set_a(struct LDKDelayedPaymentKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Constructs a new DelayedPaymentKey given each field
+ */
+MUST_USE_RES struct LDKDelayedPaymentKey DelayedPaymentKey_new(struct LDKPublicKey a_arg);
+
+/**
+ * Checks if two DelayedPaymentKeys contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool DelayedPaymentKey_eq(const struct LDKDelayedPaymentKey *NONNULL_PTR a, const struct LDKDelayedPaymentKey *NONNULL_PTR b);
+
+/**
+ * Creates a copy of the DelayedPaymentKey
+ */
+struct LDKDelayedPaymentKey DelayedPaymentKey_clone(const struct LDKDelayedPaymentKey *NONNULL_PTR orig);
+
+/**
+ *Derive a public delayedpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint`
+ */
+MUST_USE_RES struct LDKDelayedPaymentKey DelayedPaymentKey_from_basepoint(const struct LDKDelayedPaymentBasepoint *NONNULL_PTR countersignatory_basepoint, struct LDKPublicKey per_commitment_point);
+
+/**
+ *Build a delayedpubkey directly from an already-derived private key
+ */
+MUST_USE_RES struct LDKDelayedPaymentKey DelayedPaymentKey_from_secret_key(const uint8_t (*sk)[32]);
+
+/**
+ * Get inner Public Key
+ */
+MUST_USE_RES struct LDKPublicKey DelayedPaymentKey_to_public_key(const struct LDKDelayedPaymentKey *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the DelayedPaymentKey object into a byte array which can be read by DelayedPaymentKey_read
+ */
+struct LDKCVec_u8Z DelayedPaymentKey_write(const struct LDKDelayedPaymentKey *NONNULL_PTR obj);
+
+/**
+ * Read a DelayedPaymentKey from a byte array, created by DelayedPaymentKey_write
+ */
+struct LDKCResult_DelayedPaymentKeyDecodeErrorZ DelayedPaymentKey_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the HtlcBasepoint, if is_owned is set and inner is non-NULL.
+ */
+void HtlcBasepoint_free(struct LDKHtlcBasepoint this_obj);
+
+struct LDKPublicKey HtlcBasepoint_get_a(const struct LDKHtlcBasepoint *NONNULL_PTR this_ptr);
+
+void HtlcBasepoint_set_a(struct LDKHtlcBasepoint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Constructs a new HtlcBasepoint given each field
+ */
+MUST_USE_RES struct LDKHtlcBasepoint HtlcBasepoint_new(struct LDKPublicKey a_arg);
+
+/**
+ * Checks if two HtlcBasepoints contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool HtlcBasepoint_eq(const struct LDKHtlcBasepoint *NONNULL_PTR a, const struct LDKHtlcBasepoint *NONNULL_PTR b);
+
+/**
+ * Creates a copy of the HtlcBasepoint
+ */
+struct LDKHtlcBasepoint HtlcBasepoint_clone(const struct LDKHtlcBasepoint *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the HtlcBasepoint.
+ */
+uint64_t HtlcBasepoint_hash(const struct LDKHtlcBasepoint *NONNULL_PTR o);
+
+/**
+ * Get inner Public Key
+ */
+MUST_USE_RES struct LDKPublicKey HtlcBasepoint_to_public_key(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg);
+
+/**
+ *Derives the \"tweak\" used in calculate [`HtlcKey::from_basepoint`].\n\n[`HtlcKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes HtlcBasepoint_derive_add_tweak(const struct LDKHtlcBasepoint *NONNULL_PTR this_arg, struct LDKPublicKey per_commitment_point);
+
+/**
+ * Serialize the HtlcBasepoint object into a byte array which can be read by HtlcBasepoint_read
+ */
+struct LDKCVec_u8Z HtlcBasepoint_write(const struct LDKHtlcBasepoint *NONNULL_PTR obj);
+
+/**
+ * Read a HtlcBasepoint from a byte array, created by HtlcBasepoint_write
+ */
+struct LDKCResult_HtlcBasepointDecodeErrorZ HtlcBasepoint_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the HtlcKey, if is_owned is set and inner is non-NULL.
+ */
+void HtlcKey_free(struct LDKHtlcKey this_obj);
+
+struct LDKPublicKey HtlcKey_get_a(const struct LDKHtlcKey *NONNULL_PTR this_ptr);
+
+void HtlcKey_set_a(struct LDKHtlcKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Constructs a new HtlcKey given each field
+ */
+MUST_USE_RES struct LDKHtlcKey HtlcKey_new(struct LDKPublicKey a_arg);
+
+/**
+ * Checks if two HtlcKeys contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool HtlcKey_eq(const struct LDKHtlcKey *NONNULL_PTR a, const struct LDKHtlcKey *NONNULL_PTR b);
+
+/**
+ * Creates a copy of the HtlcKey
+ */
+struct LDKHtlcKey HtlcKey_clone(const struct LDKHtlcKey *NONNULL_PTR orig);
+
+/**
+ *Derive a public htlcpubkey using one node\'s `per_commitment_point` and its countersignatory\'s `basepoint`
+ */
+MUST_USE_RES struct LDKHtlcKey HtlcKey_from_basepoint(const struct LDKHtlcBasepoint *NONNULL_PTR countersignatory_basepoint, struct LDKPublicKey per_commitment_point);
+
+/**
+ *Build a htlcpubkey directly from an already-derived private key
+ */
+MUST_USE_RES struct LDKHtlcKey HtlcKey_from_secret_key(const uint8_t (*sk)[32]);
+
+/**
+ * Get inner Public Key
+ */
+MUST_USE_RES struct LDKPublicKey HtlcKey_to_public_key(const struct LDKHtlcKey *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the HtlcKey object into a byte array which can be read by HtlcKey_read
+ */
+struct LDKCVec_u8Z HtlcKey_write(const struct LDKHtlcKey *NONNULL_PTR obj);
+
+/**
+ * Read a HtlcKey from a byte array, created by HtlcKey_write
+ */
+struct LDKCResult_HtlcKeyDecodeErrorZ HtlcKey_read(struct LDKu8slice ser);
+
+/**
+ * Adds a tweak to a public key to derive a new public key.
+ *
+ * May panic if `tweak` is not the output of a SHA-256 hash.
+ */
+struct LDKPublicKey add_public_key_tweak(struct LDKPublicKey base_point, const uint8_t (*tweak)[32]);
+
+/**
+ * Frees any resources used by the RevocationBasepoint, if is_owned is set and inner is non-NULL.
+ */
+void RevocationBasepoint_free(struct LDKRevocationBasepoint this_obj);
+
+struct LDKPublicKey RevocationBasepoint_get_a(const struct LDKRevocationBasepoint *NONNULL_PTR this_ptr);
+
+void RevocationBasepoint_set_a(struct LDKRevocationBasepoint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Constructs a new RevocationBasepoint given each field
+ */
+MUST_USE_RES struct LDKRevocationBasepoint RevocationBasepoint_new(struct LDKPublicKey a_arg);
+
+/**
+ * Checks if two RevocationBasepoints contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RevocationBasepoint_eq(const struct LDKRevocationBasepoint *NONNULL_PTR a, const struct LDKRevocationBasepoint *NONNULL_PTR b);
+
+/**
+ * Creates a copy of the RevocationBasepoint
+ */
+struct LDKRevocationBasepoint RevocationBasepoint_clone(const struct LDKRevocationBasepoint *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RevocationBasepoint.
+ */
+uint64_t RevocationBasepoint_hash(const struct LDKRevocationBasepoint *NONNULL_PTR o);
+
+/**
+ * Get inner Public Key
+ */
+MUST_USE_RES struct LDKPublicKey RevocationBasepoint_to_public_key(const struct LDKRevocationBasepoint *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the RevocationBasepoint object into a byte array which can be read by RevocationBasepoint_read
+ */
+struct LDKCVec_u8Z RevocationBasepoint_write(const struct LDKRevocationBasepoint *NONNULL_PTR obj);
+
+/**
+ * Read a RevocationBasepoint from a byte array, created by RevocationBasepoint_write
+ */
+struct LDKCResult_RevocationBasepointDecodeErrorZ RevocationBasepoint_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the RevocationKey, if is_owned is set and inner is non-NULL.
+ */
+void RevocationKey_free(struct LDKRevocationKey this_obj);
+
+struct LDKPublicKey RevocationKey_get_a(const struct LDKRevocationKey *NONNULL_PTR this_ptr);
+
+void RevocationKey_set_a(struct LDKRevocationKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Constructs a new RevocationKey given each field
+ */
+MUST_USE_RES struct LDKRevocationKey RevocationKey_new(struct LDKPublicKey a_arg);
+
+/**
+ * Checks if two RevocationKeys contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RevocationKey_eq(const struct LDKRevocationKey *NONNULL_PTR a, const struct LDKRevocationKey *NONNULL_PTR b);
+
+/**
+ * Creates a copy of the RevocationKey
+ */
+struct LDKRevocationKey RevocationKey_clone(const struct LDKRevocationKey *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RevocationKey.
+ */
+uint64_t RevocationKey_hash(const struct LDKRevocationKey *NONNULL_PTR o);
+
+/**
+ * Derives a per-commitment-transaction revocation public key from one party's per-commitment
+ * point and the other party's [`RevocationBasepoint`]. This is the public equivalent of
+ * [`chan_utils::derive_private_revocation_key`] - using only public keys to derive a public
+ * key instead of private keys.
+ *
+ * Note that this is infallible iff we trust that at least one of the two input keys are randomly
+ * generated (ie our own).
+ *
+ * [`chan_utils::derive_private_revocation_key`]: crate::ln::chan_utils::derive_private_revocation_key
+ */
+MUST_USE_RES struct LDKRevocationKey RevocationKey_from_basepoint(const struct LDKRevocationBasepoint *NONNULL_PTR countersignatory_basepoint, struct LDKPublicKey per_commitment_point);
+
+/**
+ * Get inner Public Key
+ */
+MUST_USE_RES struct LDKPublicKey RevocationKey_to_public_key(const struct LDKRevocationKey *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the RevocationKey object into a byte array which can be read by RevocationKey_read
+ */
+struct LDKCVec_u8Z RevocationKey_write(const struct LDKRevocationKey *NONNULL_PTR obj);
+
+/**
+ * Read a RevocationKey from a byte array, created by RevocationKey_write
  */
-struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
+struct LDKCResult_RevocationKeyDecodeErrorZ RevocationKey_read(struct LDKu8slice ser);
 
 /**
  * Frees any resources used by the ExpandedKey, if is_owned is set and inner is non-NULL.
@@ -29470,7 +38711,7 @@ MUST_USE_RES struct LDKExpandedKey ExpandedKey_new(const uint8_t (*key_material)
  * [phantom node payments]: crate::sign::PhantomKeysManager
  * [`NodeSigner::get_inbound_payment_key_material`]: crate::sign::NodeSigner::get_inbound_payment_key_material
  */
-struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ create(const struct LDKExpandedKey *NONNULL_PTR keys, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, const struct LDKEntropySource *NONNULL_PTR entropy_source, uint64_t current_time, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+struct LDKCResult_C2Tuple_ThirtyTwoBytesThirtyTwoBytesZNoneZ create(const struct LDKExpandedKey *NONNULL_PTR keys, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, const struct LDKEntropySource *NONNULL_PTR entropy_source, uint64_t current_time, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
 
 /**
  * Equivalent to [`crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash`],
@@ -29484,7 +38725,7 @@ struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ create(const struct LDK
  *
  * [phantom node payments]: crate::sign::PhantomKeysManager
  */
-struct LDKCResult_PaymentSecretNoneZ create_from_hash(const struct LDKExpandedKey *NONNULL_PTR keys, struct LDKCOption_u64Z min_value_msat, struct LDKThirtyTwoBytes payment_hash, uint32_t invoice_expiry_delta_secs, uint64_t current_time, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
+struct LDKCResult_ThirtyTwoBytesNoneZ create_from_hash(const struct LDKExpandedKey *NONNULL_PTR keys, struct LDKCOption_u64Z min_value_msat, struct LDKThirtyTwoBytes payment_hash, uint32_t invoice_expiry_delta_secs, uint64_t current_time, struct LDKCOption_u16Z min_final_cltv_expiry_delta);
 
 /**
  * Frees any resources used by the DecodeError
@@ -29531,6 +38772,16 @@ struct LDKDecodeError DecodeError_io(enum LDKIOError a);
  */
 struct LDKDecodeError DecodeError_unsupported_compression(void);
 
+/**
+ * Utility method to constructs a new DangerousValue-variant DecodeError
+ */
+struct LDKDecodeError DecodeError_dangerous_value(void);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the DecodeError.
+ */
+uint64_t DecodeError_hash(const struct LDKDecodeError *NONNULL_PTR o);
+
 /**
  * Checks if two DecodeErrors contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -29559,14 +38810,14 @@ void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatu
  *
  * Returns a copy of the field.
  */
-struct LDKCOption_CVec_ChainHashZZ Init_get_networks(const struct LDKInit *NONNULL_PTR this_ptr);
+struct LDKCOption_CVec_ThirtyTwoBytesZZ Init_get_networks(const struct LDKInit *NONNULL_PTR this_ptr);
 
 /**
  * Indicates chains the sender is interested in.
  *
  * If there are no common chains, the connection will be closed.
  */
-void Init_set_networks(struct LDKInit *NONNULL_PTR this_ptr, struct LDKCOption_CVec_ChainHashZZ val);
+void Init_set_networks(struct LDKInit *NONNULL_PTR this_ptr, struct LDKCOption_CVec_ThirtyTwoBytesZZ val);
 
 /**
  * The receipient's network address.
@@ -29576,7 +38827,7 @@ void Init_set_networks(struct LDKInit *NONNULL_PTR this_ptr, struct LDKCOption_C
  * public IPv4 address (NAT) and use that for a [`NodeAnnouncement`] update message containing
  * the new address.
  */
-struct LDKCOption_NetAddressZ Init_get_remote_network_address(const struct LDKInit *NONNULL_PTR this_ptr);
+struct LDKCOption_SocketAddressZ Init_get_remote_network_address(const struct LDKInit *NONNULL_PTR this_ptr);
 
 /**
  * The receipient's network address.
@@ -29586,18 +38837,23 @@ struct LDKCOption_NetAddressZ Init_get_remote_network_address(const struct LDKIn
  * public IPv4 address (NAT) and use that for a [`NodeAnnouncement`] update message containing
  * the new address.
  */
-void Init_set_remote_network_address(struct LDKInit *NONNULL_PTR this_ptr, struct LDKCOption_NetAddressZ val);
+void Init_set_remote_network_address(struct LDKInit *NONNULL_PTR this_ptr, struct LDKCOption_SocketAddressZ val);
 
 /**
  * Constructs a new Init given each field
  */
-MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg, struct LDKCOption_CVec_ChainHashZZ networks_arg, struct LDKCOption_NetAddressZ remote_network_address_arg);
+MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg, struct LDKCOption_CVec_ThirtyTwoBytesZZ networks_arg, struct LDKCOption_SocketAddressZ remote_network_address_arg);
 
 /**
  * Creates a copy of the Init
  */
 struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the Init.
+ */
+uint64_t Init_hash(const struct LDKInit *NONNULL_PTR o);
+
 /**
  * Checks if two Inits contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -29616,7 +38872,7 @@ void ErrorMessage_free(struct LDKErrorMessage this_obj);
  * All-0s indicates a general error unrelated to a specific channel, after which all channels
  * with the sending peer should be closed.
  */
-const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID involved in the error.
@@ -29624,7 +38880,7 @@ const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNUL
  * All-0s indicates a general error unrelated to a specific channel, after which all channels
  * with the sending peer should be closed.
  */
-void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * A possibly human-readable error description.
@@ -29647,13 +38903,18 @@ void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct
 /**
  * Constructs a new ErrorMessage given each field
  */
-MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
+MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg);
 
 /**
  * Creates a copy of the ErrorMessage
  */
 struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ErrorMessage.
+ */
+uint64_t ErrorMessage_hash(const struct LDKErrorMessage *NONNULL_PTR o);
+
 /**
  * Checks if two ErrorMessages contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -29671,14 +38932,14 @@ void WarningMessage_free(struct LDKWarningMessage this_obj);
  *
  * All-0s indicates a warning unrelated to a specific channel.
  */
-const uint8_t (*WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId WarningMessage_get_channel_id(const struct LDKWarningMessage *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID involved in the warning.
  *
  * All-0s indicates a warning unrelated to a specific channel.
  */
-void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void WarningMessage_set_channel_id(struct LDKWarningMessage *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * A possibly human-readable warning description.
@@ -29701,13 +38962,18 @@ void WarningMessage_set_data(struct LDKWarningMessage *NONNULL_PTR this_ptr, str
 /**
  * Constructs a new WarningMessage given each field
  */
-MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
+MUST_USE_RES struct LDKWarningMessage WarningMessage_new(struct LDKChannelId channel_id_arg, struct LDKStr data_arg);
 
 /**
  * Creates a copy of the WarningMessage
  */
 struct LDKWarningMessage WarningMessage_clone(const struct LDKWarningMessage *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the WarningMessage.
+ */
+uint64_t WarningMessage_hash(const struct LDKWarningMessage *NONNULL_PTR o);
+
 /**
  * Checks if two WarningMessages contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -29754,6 +39020,11 @@ MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg
  */
 struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the Ping.
+ */
+uint64_t Ping_hash(const struct LDKPing *NONNULL_PTR o);
+
 /**
  * Checks if two Pings contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -29790,6 +39061,11 @@ MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
  */
 struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the Pong.
+ */
+uint64_t Pong_hash(const struct LDKPong *NONNULL_PTR o);
+
 /**
  * Checks if two Pongs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -29798,203 +39074,195 @@ struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
 bool Pong_eq(const struct LDKPong *NONNULL_PTR a, const struct LDKPong *NONNULL_PTR b);
 
 /**
- * Frees any resources used by the OpenChannel, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the CommonOpenChannelFields, if is_owned is set and inner is non-NULL.
  */
-void OpenChannel_free(struct LDKOpenChannel this_obj);
+void CommonOpenChannelFields_free(struct LDKCommonOpenChannelFields this_obj);
 
 /**
  * The genesis hash of the blockchain where the channel is to be opened
  */
-const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
+const uint8_t (*CommonOpenChannelFields_get_chain_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr))[32];
 
 /**
  * The genesis hash of the blockchain where the channel is to be opened
  */
-void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-
-/**
- * A temporary channel ID, until the funding outpoint is announced
- */
-const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
+void CommonOpenChannelFields_set_chain_hash(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * A temporary channel ID, until the funding outpoint is announced
+ * A temporary channel ID
+ * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint
+ * For V1 channels: a temporary channel ID, until the funding outpoint is announced
  */
-void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+struct LDKChannelId CommonOpenChannelFields_get_temporary_channel_id(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The channel value
+ * A temporary channel ID
+ * For V2 channels: derived using a zeroed out value for the channel acceptor's revocation basepoint
+ * For V1 channels: a temporary channel ID, until the funding outpoint is announced
  */
-uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-
-/**
- * The channel value
- */
-void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
-
-/**
- * The amount to push to the counterparty as part of the open, in milli-satoshi
- */
-uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
-
-/**
- * The amount to push to the counterparty as part of the open, in milli-satoshi
- */
-void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
+void CommonOpenChannelFields_set_temporary_channel_id(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
- * The threshold below which outputs on transactions broadcast by sender will be omitted
+ * For V1 channels: The channel value
+ * For V2 channels: Part of the channel value contributed by the channel initiator
  */
-uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+uint64_t CommonOpenChannelFields_get_funding_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The threshold below which outputs on transactions broadcast by sender will be omitted
+ * For V1 channels: The channel value
+ * For V2 channels: Part of the channel value contributed by the channel initiator
  */
-void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
+void CommonOpenChannelFields_set_funding_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+ * The threshold below which outputs on transactions broadcast by the channel initiator will be
+ * omitted
  */
-uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+uint64_t CommonOpenChannelFields_get_dust_limit_satoshis(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+ * The threshold below which outputs on transactions broadcast by the channel initiator will be
+ * omitted
  */
-void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
+void CommonOpenChannelFields_set_dust_limit_satoshis(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
+ * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
  */
-uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+uint64_t CommonOpenChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
+ * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
  */
-void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
+void CommonOpenChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * The minimum HTLC size incoming to sender, in milli-satoshi
+ * The minimum HTLC size incoming to channel initiator, in milli-satoshi
  */
-uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+uint64_t CommonOpenChannelFields_get_htlc_minimum_msat(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The minimum HTLC size incoming to sender, in milli-satoshi
+ * The minimum HTLC size incoming to channel initiator, in milli-satoshi
  */
-void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
+void CommonOpenChannelFields_set_htlc_minimum_msat(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * The feerate per 1000-weight of sender generated transactions, until updated by
+ * The feerate for the commitment transaction set by the channel initiator until updated by
  * [`UpdateFee`]
  */
-uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+uint32_t CommonOpenChannelFields_get_commitment_feerate_sat_per_1000_weight(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The feerate per 1000-weight of sender generated transactions, until updated by
+ * The feerate for the commitment transaction set by the channel initiator until updated by
  * [`UpdateFee`]
  */
-void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
+void CommonOpenChannelFields_set_commitment_feerate_sat_per_1000_weight(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if
- * they broadcast a commitment transaction
+ * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+ * broadcast a commitment transaction
  */
-uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+uint16_t CommonOpenChannelFields_get_to_self_delay(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if
- * they broadcast a commitment transaction
+ * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+ * broadcast a commitment transaction
  */
-void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
+void CommonOpenChannelFields_set_to_self_delay(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * The maximum number of inbound HTLCs towards sender
+ * The maximum number of inbound HTLCs towards channel initiator
  */
-uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+uint16_t CommonOpenChannelFields_get_max_accepted_htlcs(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The maximum number of inbound HTLCs towards sender
+ * The maximum number of inbound HTLCs towards channel initiator
  */
-void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
+void CommonOpenChannelFields_set_max_accepted_htlcs(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * The sender's key controlling the funding transaction
+ * The channel initiator's key controlling the funding transaction
  */
-struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+struct LDKPublicKey CommonOpenChannelFields_get_funding_pubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The sender's key controlling the funding transaction
+ * The channel initiator's key controlling the funding transaction
  */
-void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void CommonOpenChannelFields_set_funding_pubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
  * Used to derive a revocation key for transactions broadcast by counterparty
  */
-struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+struct LDKPublicKey CommonOpenChannelFields_get_revocation_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
  * Used to derive a revocation key for transactions broadcast by counterparty
  */
-void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void CommonOpenChannelFields_set_revocation_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * A payment key to sender for transactions broadcast by counterparty
+ * A payment key to channel initiator for transactions broadcast by counterparty
  */
-struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+struct LDKPublicKey CommonOpenChannelFields_get_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * A payment key to sender for transactions broadcast by counterparty
+ * A payment key to channel initiator for transactions broadcast by counterparty
  */
-void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void CommonOpenChannelFields_set_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * Used to derive a payment key to sender for transactions broadcast by sender
+ * Used to derive a payment key to channel initiator for transactions broadcast by channel
+ * initiator
  */
-struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+struct LDKPublicKey CommonOpenChannelFields_get_delayed_payment_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * Used to derive a payment key to sender for transactions broadcast by sender
+ * Used to derive a payment key to channel initiator for transactions broadcast by channel
+ * initiator
  */
-void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void CommonOpenChannelFields_set_delayed_payment_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * Used to derive an HTLC payment key to sender
+ * Used to derive an HTLC payment key to channel initiator
  */
-struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+struct LDKPublicKey CommonOpenChannelFields_get_htlc_basepoint(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * Used to derive an HTLC payment key to sender
+ * Used to derive an HTLC payment key to channel initiator
  */
-void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void CommonOpenChannelFields_set_htlc_basepoint(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The first to-be-broadcast-by-sender transaction's per commitment point
+ * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
  */
-struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+struct LDKPublicKey CommonOpenChannelFields_get_first_per_commitment_point(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The first to-be-broadcast-by-sender transaction's per commitment point
+ * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
  */
-void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void CommonOpenChannelFields_set_first_per_commitment_point(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
  * The channel flags to be used
  */
-uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+uint8_t CommonOpenChannelFields_get_channel_flags(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
  * The channel flags to be used
  */
-void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
+void CommonOpenChannelFields_set_channel_flags(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, uint8_t val);
 
 /**
- * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close
+ * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
+ * collaboratively close
  */
-struct LDKCOption_ScriptZ OpenChannel_get_shutdown_scriptpubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+struct LDKCOption_CVec_u8ZZ CommonOpenChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * A request to pre-set the to-sender output's `scriptPubkey` for when we collaboratively close
+ * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
+ * collaboratively close
  */
-void OpenChannel_set_shutdown_scriptpubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCOption_ScriptZ val);
+void CommonOpenChannelFields_set_shutdown_scriptpubkey(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
 
 /**
  * The channel type that this channel will represent
@@ -30004,7 +39272,7 @@ void OpenChannel_set_shutdown_scriptpubkey(struct LDKOpenChannel *NONNULL_PTR th
  *
  * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
+struct LDKChannelTypeFeatures CommonOpenChannelFields_get_channel_type(const struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr);
 
 /**
  * The channel type that this channel will represent
@@ -30014,133 +39282,113 @@ struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenC
  *
  * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
-
-/**
- * Constructs a new OpenChannel given each field
- */
-MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t push_msat_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t feerate_per_kw_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_ScriptZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
-
-/**
- * Creates a copy of the OpenChannel
- */
-struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
-
-/**
- * Checks if two OpenChannels contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
- */
-bool OpenChannel_eq(const struct LDKOpenChannel *NONNULL_PTR a, const struct LDKOpenChannel *NONNULL_PTR b);
-
-/**
- * Frees any resources used by the OpenChannelV2, if is_owned is set and inner is non-NULL.
- */
-void OpenChannelV2_free(struct LDKOpenChannelV2 this_obj);
+void CommonOpenChannelFields_set_channel_type(struct LDKCommonOpenChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
 
 /**
- * The genesis hash of the blockchain where the channel is to be opened
+ * Constructs a new CommonOpenChannelFields given each field
+ *
+ * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-const uint8_t (*OpenChannelV2_get_chain_hash(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32];
+MUST_USE_RES struct LDKCommonOpenChannelFields CommonOpenChannelFields_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKChannelId temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
 
 /**
- * The genesis hash of the blockchain where the channel is to be opened
+ * Creates a copy of the CommonOpenChannelFields
  */
-void OpenChannelV2_set_chain_hash(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+struct LDKCommonOpenChannelFields CommonOpenChannelFields_clone(const struct LDKCommonOpenChannelFields *NONNULL_PTR orig);
 
 /**
- * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint
+ * Generates a non-cryptographic 64-bit hash of the CommonOpenChannelFields.
  */
-const uint8_t (*OpenChannelV2_get_temporary_channel_id(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr))[32];
+uint64_t CommonOpenChannelFields_hash(const struct LDKCommonOpenChannelFields *NONNULL_PTR o);
 
 /**
- * A temporary channel ID derived using a zeroed out value for the channel acceptor's revocation basepoint
+ * Checks if two CommonOpenChannelFieldss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-void OpenChannelV2_set_temporary_channel_id(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+bool CommonOpenChannelFields_eq(const struct LDKCommonOpenChannelFields *NONNULL_PTR a, const struct LDKCommonOpenChannelFields *NONNULL_PTR b);
 
 /**
- * The feerate for the funding transaction set by the channel initiator
+ * Frees any resources used by the OpenChannel, if is_owned is set and inner is non-NULL.
  */
-uint32_t OpenChannelV2_get_funding_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+void OpenChannel_free(struct LDKOpenChannel this_obj);
 
 /**
- * The feerate for the funding transaction set by the channel initiator
+ * Common fields of `open_channel(2)`-like messages
  */
-void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
+struct LDKCommonOpenChannelFields OpenChannel_get_common_fields(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
 
 /**
- * The feerate for the commitment transaction set by the channel initiator
+ * Common fields of `open_channel(2)`-like messages
  */
-uint32_t OpenChannelV2_get_commitment_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+void OpenChannel_set_common_fields(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val);
 
 /**
- * The feerate for the commitment transaction set by the channel initiator
+ * The amount to push to the counterparty as part of the open, in milli-satoshi
  */
-void OpenChannelV2_set_commitment_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
+uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
 
 /**
- * Part of the channel value contributed by the channel initiator
+ * The amount to push to the counterparty as part of the open, in milli-satoshi
  */
-uint64_t OpenChannelV2_get_funding_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Part of the channel value contributed by the channel initiator
+ * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
  */
-void OpenChannelV2_set_funding_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
+uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
 
 /**
- * The threshold below which outputs on transactions broadcast by the channel initiator will be
- * omitted
+ * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
  */
-uint64_t OpenChannelV2_get_dust_limit_satoshis(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * The threshold below which outputs on transactions broadcast by the channel initiator will be
- * omitted
+ * Constructs a new OpenChannel given each field
  */
-void OpenChannelV2_set_dust_limit_satoshis(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
+MUST_USE_RES struct LDKOpenChannel OpenChannel_new(struct LDKCommonOpenChannelFields common_fields_arg, uint64_t push_msat_arg, uint64_t channel_reserve_satoshis_arg);
 
 /**
- * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
+ * Creates a copy of the OpenChannel
  */
-uint64_t OpenChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
 
 /**
- * The maximum inbound HTLC value in flight towards channel initiator, in milli-satoshi
+ * Generates a non-cryptographic 64-bit hash of the OpenChannel.
  */
-void OpenChannelV2_set_max_htlc_value_in_flight_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
+uint64_t OpenChannel_hash(const struct LDKOpenChannel *NONNULL_PTR o);
 
 /**
- * The minimum HTLC size incoming to channel initiator, in milli-satoshi
+ * Checks if two OpenChannels contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-uint64_t OpenChannelV2_get_htlc_minimum_msat(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+bool OpenChannel_eq(const struct LDKOpenChannel *NONNULL_PTR a, const struct LDKOpenChannel *NONNULL_PTR b);
 
 /**
- * The minimum HTLC size incoming to channel initiator, in milli-satoshi
+ * Frees any resources used by the OpenChannelV2, if is_owned is set and inner is non-NULL.
  */
-void OpenChannelV2_set_htlc_minimum_msat(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
+void OpenChannelV2_free(struct LDKOpenChannelV2 this_obj);
 
 /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
- * broadcast a commitment transaction
+ * Common fields of `open_channel(2)`-like messages
  */
-uint16_t OpenChannelV2_get_to_self_delay(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+struct LDKCommonOpenChannelFields OpenChannelV2_get_common_fields(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
 
 /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
- * broadcast a commitment transaction
+ * Common fields of `open_channel(2)`-like messages
  */
-void OpenChannelV2_set_to_self_delay(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
+void OpenChannelV2_set_common_fields(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonOpenChannelFields val);
 
 /**
- * The maximum number of inbound HTLCs towards channel initiator
+ * The feerate for the funding transaction set by the channel initiator
  */
-uint16_t OpenChannelV2_get_max_accepted_htlcs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+uint32_t OpenChannelV2_get_funding_feerate_sat_per_1000_weight(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
 
 /**
- * The maximum number of inbound HTLCs towards channel initiator
+ * The feerate for the funding transaction set by the channel initiator
  */
-void OpenChannelV2_set_max_accepted_htlcs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
+void OpenChannelV2_set_funding_feerate_sat_per_1000_weight(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
  * The locktime for the funding transaction
@@ -30153,331 +39401,288 @@ uint32_t OpenChannelV2_get_locktime(const struct LDKOpenChannelV2 *NONNULL_PTR t
 void OpenChannelV2_set_locktime(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * The channel initiator's key controlling the funding transaction
- */
-struct LDKPublicKey OpenChannelV2_get_funding_pubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-
-/**
- * The channel initiator's key controlling the funding transaction
- */
-void OpenChannelV2_set_funding_pubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-
-/**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
-struct LDKPublicKey OpenChannelV2_get_revocation_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-
-/**
- * Used to derive a revocation key for transactions broadcast by counterparty
- */
-void OpenChannelV2_set_revocation_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-
-/**
- * A payment key to channel initiator for transactions broadcast by counterparty
- */
-struct LDKPublicKey OpenChannelV2_get_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-
-/**
- * A payment key to channel initiator for transactions broadcast by counterparty
- */
-void OpenChannelV2_set_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-
-/**
- * Used to derive a payment key to channel initiator for transactions broadcast by channel
- * initiator
- */
-struct LDKPublicKey OpenChannelV2_get_delayed_payment_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-
-/**
- * Used to derive a payment key to channel initiator for transactions broadcast by channel
- * initiator
- */
-void OpenChannelV2_set_delayed_payment_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-
-/**
- * Used to derive an HTLC payment key to channel initiator
- */
-struct LDKPublicKey OpenChannelV2_get_htlc_basepoint(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
-
-/**
- * Used to derive an HTLC payment key to channel initiator
- */
-void OpenChannelV2_set_htlc_basepoint(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-
-/**
- * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
+ * The second to-be-broadcast-by-channel-initiator transaction's per commitment point
  */
-struct LDKPublicKey OpenChannelV2_get_first_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+struct LDKPublicKey OpenChannelV2_get_second_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
 
 /**
- * The first to-be-broadcast-by-channel-initiator transaction's per commitment point
+ * The second to-be-broadcast-by-channel-initiator transaction's per commitment point
  */
-void OpenChannelV2_set_first_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void OpenChannelV2_set_second_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The second to-be-broadcast-by-channel-initiator transaction's per commitment point
+ * Optionally, a requirement that only confirmed inputs can be added
  */
-struct LDKPublicKey OpenChannelV2_get_second_per_commitment_point(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+enum LDKCOption_NoneZ OpenChannelV2_get_require_confirmed_inputs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
 
 /**
- * The second to-be-broadcast-by-channel-initiator transaction's per commitment point
+ * Optionally, a requirement that only confirmed inputs can be added
  */
-void OpenChannelV2_set_second_per_commitment_point(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void OpenChannelV2_set_require_confirmed_inputs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
 
 /**
- * Channel flags
+ * Constructs a new OpenChannelV2 given each field
  */
-uint8_t OpenChannelV2_get_channel_flags(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKCommonOpenChannelFields common_fields_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t locktime_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
 
 /**
- * Channel flags
+ * Creates a copy of the OpenChannelV2
  */
-void OpenChannelV2_set_channel_flags(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, uint8_t val);
+struct LDKOpenChannelV2 OpenChannelV2_clone(const struct LDKOpenChannelV2 *NONNULL_PTR orig);
 
 /**
- * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
- * collaboratively close
+ * Generates a non-cryptographic 64-bit hash of the OpenChannelV2.
  */
-struct LDKCOption_ScriptZ OpenChannelV2_get_shutdown_scriptpubkey(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+uint64_t OpenChannelV2_hash(const struct LDKOpenChannelV2 *NONNULL_PTR o);
 
 /**
- * Optionally, a request to pre-set the to-channel-initiator output's scriptPubkey for when we
- * collaboratively close
+ * Checks if two OpenChannelV2s contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-void OpenChannelV2_set_shutdown_scriptpubkey(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_ScriptZ val);
+bool OpenChannelV2_eq(const struct LDKOpenChannelV2 *NONNULL_PTR a, const struct LDKOpenChannelV2 *NONNULL_PTR b);
 
 /**
- * The channel type that this channel will represent. If none is set, we derive the channel
- * type from the intersection of our feature bits with our counterparty's feature bits from
- * the Init message.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Frees any resources used by the CommonAcceptChannelFields, if is_owned is set and inner is non-NULL.
  */
-struct LDKChannelTypeFeatures OpenChannelV2_get_channel_type(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_free(struct LDKCommonAcceptChannelFields this_obj);
 
 /**
- * The channel type that this channel will represent. If none is set, we derive the channel
- * type from the intersection of our feature bits with our counterparty's feature bits from
- * the Init message.
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message.
  */
-void OpenChannelV2_set_channel_type(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
+struct LDKChannelId CommonAcceptChannelFields_get_temporary_channel_id(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * Optionally, a requirement that only confirmed inputs can be added
+ * The same `temporary_channel_id` received from the initiator's `open_channel2` or `open_channel` message.
  */
-enum LDKCOption_NoneZ OpenChannelV2_get_require_confirmed_inputs(const struct LDKOpenChannelV2 *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_temporary_channel_id(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
- * Optionally, a requirement that only confirmed inputs can be added
+ * The threshold below which outputs on transactions broadcast by the channel acceptor will be
+ * omitted
  */
-void OpenChannelV2_set_require_confirmed_inputs(struct LDKOpenChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
+uint64_t CommonAcceptChannelFields_get_dust_limit_satoshis(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a new OpenChannelV2 given each field
+ * The threshold below which outputs on transactions broadcast by the channel acceptor will be
+ * omitted
  */
-MUST_USE_RES struct LDKOpenChannelV2 OpenChannelV2_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKThirtyTwoBytes temporary_channel_id_arg, uint32_t funding_feerate_sat_per_1000_weight_arg, uint32_t commitment_feerate_sat_per_1000_weight_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, uint8_t channel_flags_arg, struct LDKCOption_ScriptZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
+void CommonAcceptChannelFields_set_dust_limit_satoshis(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Creates a copy of the OpenChannelV2
+ * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
  */
-struct LDKOpenChannelV2 OpenChannelV2_clone(const struct LDKOpenChannelV2 *NONNULL_PTR orig);
+uint64_t CommonAcceptChannelFields_get_max_htlc_value_in_flight_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * Checks if two OpenChannelV2s contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
  */
-bool OpenChannelV2_eq(const struct LDKOpenChannelV2 *NONNULL_PTR a, const struct LDKOpenChannelV2 *NONNULL_PTR b);
+void CommonAcceptChannelFields_set_max_htlc_value_in_flight_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Frees any resources used by the AcceptChannel, if is_owned is set and inner is non-NULL.
+ * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
  */
-void AcceptChannel_free(struct LDKAcceptChannel this_obj);
+uint64_t CommonAcceptChannelFields_get_htlc_minimum_msat(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * A temporary channel ID, until the funding outpoint is announced
+ * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
  */
-const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
+void CommonAcceptChannelFields_set_htlc_minimum_msat(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * A temporary channel ID, until the funding outpoint is announced
+ * Minimum depth of the funding transaction before the channel is considered open
  */
-void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+uint32_t CommonAcceptChannelFields_get_minimum_depth(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The threshold below which outputs on transactions broadcast by sender will be omitted
+ * Minimum depth of the funding transaction before the channel is considered open
  */
-uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_minimum_depth(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * The threshold below which outputs on transactions broadcast by sender will be omitted
+ * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+ * broadcast a commitment transaction
  */
-void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
+uint16_t CommonAcceptChannelFields_get_to_self_delay(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+ * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
+ * broadcast a commitment transaction
  */
-uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_to_self_delay(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * The maximum inbound HTLC value in flight towards sender, in milli-satoshi
+ * The maximum number of inbound HTLCs towards channel acceptor
  */
-void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
+uint16_t CommonAcceptChannelFields_get_max_accepted_htlcs(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
+ * The maximum number of inbound HTLCs towards channel acceptor
  */
-uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_max_accepted_htlcs(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
+ * The channel acceptor's key controlling the funding transaction
  */
-void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKPublicKey CommonAcceptChannelFields_get_funding_pubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The minimum HTLC size incoming to sender, in milli-satoshi
+ * The channel acceptor's key controlling the funding transaction
  */
-uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_funding_pubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The minimum HTLC size incoming to sender, in milli-satoshi
+ * Used to derive a revocation key for transactions broadcast by counterparty
  */
-void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKPublicKey CommonAcceptChannelFields_get_revocation_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * Minimum depth of the funding transaction before the channel is considered open
+ * Used to derive a revocation key for transactions broadcast by counterparty
  */
-uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_revocation_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * Minimum depth of the funding transaction before the channel is considered open
+ * A payment key to channel acceptor for transactions broadcast by counterparty
  */
-void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
+struct LDKPublicKey CommonAcceptChannelFields_get_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
+ * A payment key to channel acceptor for transactions broadcast by counterparty
  */
-uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they broadcast a commitment transaction
+ * Used to derive a payment key to channel acceptor for transactions broadcast by channel
+ * acceptor
  */
-void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
+struct LDKPublicKey CommonAcceptChannelFields_get_delayed_payment_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The maximum number of inbound HTLCs towards sender
+ * Used to derive a payment key to channel acceptor for transactions broadcast by channel
+ * acceptor
  */
-uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_delayed_payment_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The maximum number of inbound HTLCs towards sender
+ * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
  */
-void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
+struct LDKPublicKey CommonAcceptChannelFields_get_htlc_basepoint(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * The sender's key controlling the funding transaction
+ * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
  */
-struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_htlc_basepoint(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The sender's key controlling the funding transaction
+ * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
  */
-void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+struct LDKPublicKey CommonAcceptChannelFields_get_first_per_commitment_point(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * Used to derive a revocation key for transactions broadcast by counterparty
+ * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
  */
-struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_first_per_commitment_point(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * Used to derive a revocation key for transactions broadcast by counterparty
+ * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
+ * collaboratively close
  */
-void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+struct LDKCOption_CVec_u8ZZ CommonAcceptChannelFields_get_shutdown_scriptpubkey(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * A payment key to sender for transactions broadcast by counterparty
+ * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
+ * collaboratively close
  */
-struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_shutdown_scriptpubkey(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
 
 /**
- * A payment key to sender for transactions broadcast by counterparty
+ * The channel type that this channel will represent. If none is set, we derive the channel
+ * type from the intersection of our feature bits with our counterparty's feature bits from
+ * the Init message.
+ *
+ * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s
+ * [`CommonOpenChannelFields::channel_type`].
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+struct LDKChannelTypeFeatures CommonAcceptChannelFields_get_channel_type(const struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr);
 
 /**
- * Used to derive a payment key to sender for transactions broadcast by sender
+ * The channel type that this channel will represent. If none is set, we derive the channel
+ * type from the intersection of our feature bits with our counterparty's feature bits from
+ * the Init message.
+ *
+ * This is required to match the equivalent field in [`OpenChannel`] or [`OpenChannelV2`]'s
+ * [`CommonOpenChannelFields::channel_type`].
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+void CommonAcceptChannelFields_set_channel_type(struct LDKCommonAcceptChannelFields *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
 
 /**
- * Used to derive a payment key to sender for transactions broadcast by sender
+ * Constructs a new CommonAcceptChannelFields given each field
+ *
+ * Note that channel_type_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+MUST_USE_RES struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_new(struct LDKChannelId temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_CVec_u8ZZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
 
 /**
- * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
+ * Creates a copy of the CommonAcceptChannelFields
  */
-struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+struct LDKCommonAcceptChannelFields CommonAcceptChannelFields_clone(const struct LDKCommonAcceptChannelFields *NONNULL_PTR orig);
 
 /**
- * Used to derive an HTLC payment key to sender for transactions broadcast by counterparty
+ * Generates a non-cryptographic 64-bit hash of the CommonAcceptChannelFields.
  */
-void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+uint64_t CommonAcceptChannelFields_hash(const struct LDKCommonAcceptChannelFields *NONNULL_PTR o);
 
 /**
- * The first to-be-broadcast-by-sender transaction's per commitment point
+ * Checks if two CommonAcceptChannelFieldss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+bool CommonAcceptChannelFields_eq(const struct LDKCommonAcceptChannelFields *NONNULL_PTR a, const struct LDKCommonAcceptChannelFields *NONNULL_PTR b);
 
 /**
- * The first to-be-broadcast-by-sender transaction's per commitment point
+ * Frees any resources used by the AcceptChannel, if is_owned is set and inner is non-NULL.
  */
-void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void AcceptChannel_free(struct LDKAcceptChannel this_obj);
 
 /**
- * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close
+ * Common fields of `accept_channel(2)`-like messages
  */
-struct LDKCOption_ScriptZ AcceptChannel_get_shutdown_scriptpubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+struct LDKCommonAcceptChannelFields AcceptChannel_get_common_fields(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
 
 /**
- * A request to pre-set the to-sender output's scriptPubkey for when we collaboratively close
+ * Common fields of `accept_channel(2)`-like messages
  */
-void AcceptChannel_set_shutdown_scriptpubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCOption_ScriptZ val);
+void AcceptChannel_set_common_fields(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val);
 
 /**
- * The channel type that this channel will represent.
- *
- * If this is `None`, we derive the channel type from the intersection of
- * our feature bits with our counterparty's feature bits from the [`Init`] message.
- * This is required to match the equivalent field in [`OpenChannel::channel_type`].
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
  */
-struct LDKChannelTypeFeatures AcceptChannel_get_channel_type(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
+uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
 
 /**
- * The channel type that this channel will represent.
- *
- * If this is `None`, we derive the channel type from the intersection of
- * our feature bits with our counterparty's feature bits from the [`Init`] message.
- * This is required to match the equivalent field in [`OpenChannel::channel_type`].
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * The minimum value unencumbered by HTLCs for the counterparty to keep in the channel
  */
-void AcceptChannel_set_channel_type(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
+void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
  * Constructs a new AcceptChannel given each field
  */
-MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t channel_reserve_satoshis_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKCOption_ScriptZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg);
+MUST_USE_RES struct LDKAcceptChannel AcceptChannel_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t channel_reserve_satoshis_arg);
 
 /**
  * Creates a copy of the AcceptChannel
  */
 struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the AcceptChannel.
+ */
+uint64_t AcceptChannel_hash(const struct LDKAcceptChannel *NONNULL_PTR o);
+
 /**
  * Checks if two AcceptChannels contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -30491,14 +39696,14 @@ bool AcceptChannel_eq(const struct LDKAcceptChannel *NONNULL_PTR a, const struct
 void AcceptChannelV2_free(struct LDKAcceptChannelV2 this_obj);
 
 /**
- * The same `temporary_channel_id` received from the initiator's `open_channel2` message.
+ * Common fields of `accept_channel(2)`-like messages
  */
-const uint8_t (*AcceptChannelV2_get_temporary_channel_id(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr))[32];
+struct LDKCommonAcceptChannelFields AcceptChannelV2_get_common_fields(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
 
 /**
- * The same `temporary_channel_id` received from the initiator's `open_channel2` message.
+ * Common fields of `accept_channel(2)`-like messages
  */
-void AcceptChannelV2_set_temporary_channel_id(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void AcceptChannelV2_set_common_fields(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCommonAcceptChannelFields val);
 
 /**
  * Part of the channel value contributed by the channel acceptor
@@ -30511,363 +39716,445 @@ uint64_t AcceptChannelV2_get_funding_satoshis(const struct LDKAcceptChannelV2 *N
 void AcceptChannelV2_set_funding_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * The threshold below which outputs on transactions broadcast by the channel acceptor will be
- * omitted
+ * The second to-be-broadcast-by-channel-acceptor transaction's per commitment point
  */
-uint64_t AcceptChannelV2_get_dust_limit_satoshis(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+struct LDKPublicKey AcceptChannelV2_get_second_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
 
 /**
- * The threshold below which outputs on transactions broadcast by the channel acceptor will be
- * omitted
+ * The second to-be-broadcast-by-channel-acceptor transaction's per commitment point
  */
-void AcceptChannelV2_set_dust_limit_satoshis(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
+void AcceptChannelV2_set_second_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi
+ * Optionally, a requirement that only confirmed inputs can be added
  */
-uint64_t AcceptChannelV2_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+enum LDKCOption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
 
 /**
- * The maximum inbound HTLC value in flight towards channel acceptor, in milli-satoshi
+ * Optionally, a requirement that only confirmed inputs can be added
  */
-void AcceptChannelV2_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
+void AcceptChannelV2_set_require_confirmed_inputs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
 
 /**
- * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
+ * Constructs a new AcceptChannelV2 given each field
  */
-uint64_t AcceptChannelV2_get_htlc_minimum_msat(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKCommonAcceptChannelFields common_fields_arg, uint64_t funding_satoshis_arg, struct LDKPublicKey second_per_commitment_point_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
 
 /**
- * The minimum HTLC size incoming to channel acceptor, in milli-satoshi
+ * Creates a copy of the AcceptChannelV2
  */
-void AcceptChannelV2_set_htlc_minimum_msat(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKAcceptChannelV2 AcceptChannelV2_clone(const struct LDKAcceptChannelV2 *NONNULL_PTR orig);
 
 /**
- * Minimum depth of the funding transaction before the channel is considered open
+ * Generates a non-cryptographic 64-bit hash of the AcceptChannelV2.
  */
-uint32_t AcceptChannelV2_get_minimum_depth(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+uint64_t AcceptChannelV2_hash(const struct LDKAcceptChannelV2 *NONNULL_PTR o);
 
 /**
- * Minimum depth of the funding transaction before the channel is considered open
+ * Checks if two AcceptChannelV2s contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-void AcceptChannelV2_set_minimum_depth(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint32_t val);
+bool AcceptChannelV2_eq(const struct LDKAcceptChannelV2 *NONNULL_PTR a, const struct LDKAcceptChannelV2 *NONNULL_PTR b);
 
 /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
- * broadcast a commitment transaction
+ * Frees any resources used by the FundingCreated, if is_owned is set and inner is non-NULL.
  */
-uint16_t AcceptChannelV2_get_to_self_delay(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+void FundingCreated_free(struct LDKFundingCreated this_obj);
 
 /**
- * The number of blocks which the counterparty will have to wait to claim on-chain funds if they
- * broadcast a commitment transaction
+ * A temporary channel ID, until the funding is established
  */
-void AcceptChannelV2_set_to_self_delay(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
+struct LDKChannelId FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
 
 /**
- * The maximum number of inbound HTLCs towards channel acceptor
+ * A temporary channel ID, until the funding is established
  */
-uint16_t AcceptChannelV2_get_max_accepted_htlcs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
- * The maximum number of inbound HTLCs towards channel acceptor
+ * The funding transaction ID
  */
-void AcceptChannelV2_set_max_accepted_htlcs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, uint16_t val);
+const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
 
 /**
- * The channel acceptor's key controlling the funding transaction
+ * The funding transaction ID
  */
-struct LDKPublicKey AcceptChannelV2_get_funding_pubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * The channel acceptor's key controlling the funding transaction
+ * The specific output index funding this channel
  */
-void AcceptChannelV2_set_funding_pubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
 
 /**
- * Used to derive a revocation key for transactions broadcast by counterparty
+ * The specific output index funding this channel
  */
-struct LDKPublicKey AcceptChannelV2_get_revocation_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * Used to derive a revocation key for transactions broadcast by counterparty
+ * The signature of the channel initiator (funder) on the initial commitment transaction
  */
-void AcceptChannelV2_set_revocation_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+struct LDKECDSASignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
 
 /**
- * A payment key to channel acceptor for transactions broadcast by counterparty
+ * The signature of the channel initiator (funder) on the initial commitment transaction
  */
-struct LDKPublicKey AcceptChannelV2_get_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
- * A payment key to channel acceptor for transactions broadcast by counterparty
+ * Constructs a new FundingCreated given each field
  */
-void AcceptChannelV2_set_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKChannelId temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKECDSASignature signature_arg);
 
 /**
- * Used to derive a payment key to channel acceptor for transactions broadcast by channel
- * acceptor
+ * Creates a copy of the FundingCreated
  */
-struct LDKPublicKey AcceptChannelV2_get_delayed_payment_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
 
 /**
- * Used to derive a payment key to channel acceptor for transactions broadcast by channel
- * acceptor
+ * Generates a non-cryptographic 64-bit hash of the FundingCreated.
  */
-void AcceptChannelV2_set_delayed_payment_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+uint64_t FundingCreated_hash(const struct LDKFundingCreated *NONNULL_PTR o);
 
 /**
- * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
+ * Checks if two FundingCreateds contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-struct LDKPublicKey AcceptChannelV2_get_htlc_basepoint(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+bool FundingCreated_eq(const struct LDKFundingCreated *NONNULL_PTR a, const struct LDKFundingCreated *NONNULL_PTR b);
 
 /**
- * Used to derive an HTLC payment key to channel acceptor for transactions broadcast by counterparty
+ * Frees any resources used by the FundingSigned, if is_owned is set and inner is non-NULL.
  */
-void AcceptChannelV2_set_htlc_basepoint(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void FundingSigned_free(struct LDKFundingSigned this_obj);
 
 /**
- * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
+ * The channel ID
  */
-struct LDKPublicKey AcceptChannelV2_get_first_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+struct LDKChannelId FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
 
 /**
- * The first to-be-broadcast-by-channel-acceptor transaction's per commitment point
+ * The channel ID
  */
-void AcceptChannelV2_set_first_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
- * The second to-be-broadcast-by-channel-acceptor transaction's per commitment point
+ * The signature of the channel acceptor (fundee) on the initial commitment transaction
  */
-struct LDKPublicKey AcceptChannelV2_get_second_per_commitment_point(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+struct LDKECDSASignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
 
 /**
- * The second to-be-broadcast-by-channel-acceptor transaction's per commitment point
+ * The signature of the channel acceptor (fundee) on the initial commitment transaction
  */
-void AcceptChannelV2_set_second_per_commitment_point(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
- * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
- * collaboratively close
+ * Constructs a new FundingSigned given each field
  */
-struct LDKCOption_ScriptZ AcceptChannelV2_get_shutdown_scriptpubkey(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg);
 
 /**
- * Optionally, a request to pre-set the to-channel-acceptor output's scriptPubkey for when we
- * collaboratively close
+ * Creates a copy of the FundingSigned
  */
-void AcceptChannelV2_set_shutdown_scriptpubkey(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKCOption_ScriptZ val);
+struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
 
 /**
- * The channel type that this channel will represent. If none is set, we derive the channel
- * type from the intersection of our feature bits with our counterparty's feature bits from
- * the Init message.
- *
- * This is required to match the equivalent field in [`OpenChannelV2::channel_type`].
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Generates a non-cryptographic 64-bit hash of the FundingSigned.
  */
-struct LDKChannelTypeFeatures AcceptChannelV2_get_channel_type(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+uint64_t FundingSigned_hash(const struct LDKFundingSigned *NONNULL_PTR o);
 
 /**
- * The channel type that this channel will represent. If none is set, we derive the channel
- * type from the intersection of our feature bits with our counterparty's feature bits from
- * the Init message.
+ * Checks if two FundingSigneds contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool FundingSigned_eq(const struct LDKFundingSigned *NONNULL_PTR a, const struct LDKFundingSigned *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the ChannelReady, if is_owned is set and inner is non-NULL.
+ */
+void ChannelReady_free(struct LDKChannelReady this_obj);
+
+/**
+ * The channel ID
+ */
+struct LDKChannelId ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr);
+
+/**
+ * The channel ID
+ */
+void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKChannelId val);
+
+/**
+ * The per-commitment point of the second commitment transaction
+ */
+struct LDKPublicKey ChannelReady_get_next_per_commitment_point(const struct LDKChannelReady *NONNULL_PTR this_ptr);
+
+/**
+ * The per-commitment point of the second commitment transaction
+ */
+void ChannelReady_set_next_per_commitment_point(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * If set, provides a `short_channel_id` alias for this channel.
  *
- * This is required to match the equivalent field in [`OpenChannelV2::channel_type`].
+ * The sender will accept payments to be forwarded over this SCID and forward them to this
+ * messages' recipient.
+ */
+struct LDKCOption_u64Z ChannelReady_get_short_channel_id_alias(const struct LDKChannelReady *NONNULL_PTR this_ptr);
+
+/**
+ * If set, provides a `short_channel_id` alias for this channel.
  *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * The sender will accept payments to be forwarded over this SCID and forward them to this
+ * messages' recipient.
+ */
+void ChannelReady_set_short_channel_id_alias(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * Constructs a new ChannelReady given each field
  */
-void AcceptChannelV2_set_channel_type(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
+MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKChannelId channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg);
 
 /**
- * Optionally, a requirement that only confirmed inputs can be added
+ * Creates a copy of the ChannelReady
  */
-enum LDKCOption_NoneZ AcceptChannelV2_get_require_confirmed_inputs(const struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr);
+struct LDKChannelReady ChannelReady_clone(const struct LDKChannelReady *NONNULL_PTR orig);
 
 /**
- * Optionally, a requirement that only confirmed inputs can be added
+ * Generates a non-cryptographic 64-bit hash of the ChannelReady.
  */
-void AcceptChannelV2_set_require_confirmed_inputs(struct LDKAcceptChannelV2 *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
+uint64_t ChannelReady_hash(const struct LDKChannelReady *NONNULL_PTR o);
 
 /**
- * Constructs a new AcceptChannelV2 given each field
+ * Checks if two ChannelReadys contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-MUST_USE_RES struct LDKAcceptChannelV2 AcceptChannelV2_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, uint64_t funding_satoshis_arg, uint64_t dust_limit_satoshis_arg, uint64_t max_htlc_value_in_flight_msat_arg, uint64_t htlc_minimum_msat_arg, uint32_t minimum_depth_arg, uint16_t to_self_delay_arg, uint16_t max_accepted_htlcs_arg, struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_basepoint_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg, struct LDKPublicKey first_per_commitment_point_arg, struct LDKPublicKey second_per_commitment_point_arg, struct LDKCOption_ScriptZ shutdown_scriptpubkey_arg, struct LDKChannelTypeFeatures channel_type_arg, enum LDKCOption_NoneZ require_confirmed_inputs_arg);
+bool ChannelReady_eq(const struct LDKChannelReady *NONNULL_PTR a, const struct LDKChannelReady *NONNULL_PTR b);
 
 /**
- * Creates a copy of the AcceptChannelV2
+ * Frees any resources used by the Stfu, if is_owned is set and inner is non-NULL.
  */
-struct LDKAcceptChannelV2 AcceptChannelV2_clone(const struct LDKAcceptChannelV2 *NONNULL_PTR orig);
+void Stfu_free(struct LDKStfu this_obj);
 
 /**
- * Checks if two AcceptChannelV2s contain equal inner contents.
+ * The channel ID where quiescence is intended
+ */
+struct LDKChannelId Stfu_get_channel_id(const struct LDKStfu *NONNULL_PTR this_ptr);
+
+/**
+ * The channel ID where quiescence is intended
+ */
+void Stfu_set_channel_id(struct LDKStfu *NONNULL_PTR this_ptr, struct LDKChannelId val);
+
+/**
+ * Initiator flag, 1 if initiating, 0 if replying to an stfu.
+ */
+uint8_t Stfu_get_initiator(const struct LDKStfu *NONNULL_PTR this_ptr);
+
+/**
+ * Initiator flag, 1 if initiating, 0 if replying to an stfu.
+ */
+void Stfu_set_initiator(struct LDKStfu *NONNULL_PTR this_ptr, uint8_t val);
+
+/**
+ * Constructs a new Stfu given each field
+ */
+MUST_USE_RES struct LDKStfu Stfu_new(struct LDKChannelId channel_id_arg, uint8_t initiator_arg);
+
+/**
+ * Creates a copy of the Stfu
+ */
+struct LDKStfu Stfu_clone(const struct LDKStfu *NONNULL_PTR orig);
+
+/**
+ * Checks if two Stfus contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
  * Two objects with NULL inner values will be considered "equal" here.
  */
-bool AcceptChannelV2_eq(const struct LDKAcceptChannelV2 *NONNULL_PTR a, const struct LDKAcceptChannelV2 *NONNULL_PTR b);
+bool Stfu_eq(const struct LDKStfu *NONNULL_PTR a, const struct LDKStfu *NONNULL_PTR b);
 
 /**
- * Frees any resources used by the FundingCreated, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the Splice, if is_owned is set and inner is non-NULL.
  */
-void FundingCreated_free(struct LDKFundingCreated this_obj);
+void Splice_free(struct LDKSplice this_obj);
 
 /**
- * A temporary channel ID, until the funding is established
+ * The channel ID where splicing is intended
  */
-const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId Splice_get_channel_id(const struct LDKSplice *NONNULL_PTR this_ptr);
 
 /**
- * A temporary channel ID, until the funding is established
+ * The channel ID where splicing is intended
  */
-void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void Splice_set_channel_id(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
- * The funding transaction ID
+ * The genesis hash of the blockchain where the channel is intended to be spliced
  */
-const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
+const uint8_t (*Splice_get_chain_hash(const struct LDKSplice *NONNULL_PTR this_ptr))[32];
 
 /**
- * The funding transaction ID
+ * The genesis hash of the blockchain where the channel is intended to be spliced
  */
-void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void Splice_set_chain_hash(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * The specific output index funding this channel
+ * The intended change in channel capacity: the amount to be added (positive value)
+ * or removed (negative value) by the sender (splice initiator) by splicing into/from the channel.
  */
-uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
+int64_t Splice_get_relative_satoshis(const struct LDKSplice *NONNULL_PTR this_ptr);
 
 /**
- * The specific output index funding this channel
+ * The intended change in channel capacity: the amount to be added (positive value)
+ * or removed (negative value) by the sender (splice initiator) by splicing into/from the channel.
  */
-void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
+void Splice_set_relative_satoshis(struct LDKSplice *NONNULL_PTR this_ptr, int64_t val);
 
 /**
- * The signature of the channel initiator (funder) on the initial commitment transaction
+ * The feerate for the new funding transaction, set by the splice initiator
  */
-struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
+uint32_t Splice_get_funding_feerate_perkw(const struct LDKSplice *NONNULL_PTR this_ptr);
 
 /**
- * The signature of the channel initiator (funder) on the initial commitment transaction
+ * The feerate for the new funding transaction, set by the splice initiator
  */
-void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
+void Splice_set_funding_feerate_perkw(struct LDKSplice *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * Constructs a new FundingCreated given each field
+ * The locktime for the new funding transaction
  */
-MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKSignature signature_arg);
+uint32_t Splice_get_locktime(const struct LDKSplice *NONNULL_PTR this_ptr);
 
 /**
- * Creates a copy of the FundingCreated
+ * The locktime for the new funding transaction
  */
-struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
+void Splice_set_locktime(struct LDKSplice *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * Checks if two FundingCreateds contain equal inner contents.
+ * The key of the sender (splice initiator) controlling the new funding transaction
+ */
+struct LDKPublicKey Splice_get_funding_pubkey(const struct LDKSplice *NONNULL_PTR this_ptr);
+
+/**
+ * The key of the sender (splice initiator) controlling the new funding transaction
+ */
+void Splice_set_funding_pubkey(struct LDKSplice *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Constructs a new Splice given each field
+ */
+MUST_USE_RES struct LDKSplice Splice_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, uint32_t funding_feerate_perkw_arg, uint32_t locktime_arg, struct LDKPublicKey funding_pubkey_arg);
+
+/**
+ * Creates a copy of the Splice
+ */
+struct LDKSplice Splice_clone(const struct LDKSplice *NONNULL_PTR orig);
+
+/**
+ * Checks if two Splices contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
  * Two objects with NULL inner values will be considered "equal" here.
  */
-bool FundingCreated_eq(const struct LDKFundingCreated *NONNULL_PTR a, const struct LDKFundingCreated *NONNULL_PTR b);
+bool Splice_eq(const struct LDKSplice *NONNULL_PTR a, const struct LDKSplice *NONNULL_PTR b);
 
 /**
- * Frees any resources used by the FundingSigned, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the SpliceAck, if is_owned is set and inner is non-NULL.
  */
-void FundingSigned_free(struct LDKFundingSigned this_obj);
+void SpliceAck_free(struct LDKSpliceAck this_obj);
 
 /**
- * The channel ID
+ * The channel ID where splicing is intended
  */
-const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId SpliceAck_get_channel_id(const struct LDKSpliceAck *NONNULL_PTR this_ptr);
 
 /**
- * The channel ID
+ * The channel ID where splicing is intended
  */
-void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void SpliceAck_set_channel_id(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
- * The signature of the channel acceptor (fundee) on the initial commitment transaction
+ * The genesis hash of the blockchain where the channel is intended to be spliced
  */
-struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
+const uint8_t (*SpliceAck_get_chain_hash(const struct LDKSpliceAck *NONNULL_PTR this_ptr))[32];
 
 /**
- * The signature of the channel acceptor (fundee) on the initial commitment transaction
+ * The genesis hash of the blockchain where the channel is intended to be spliced
  */
-void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
+void SpliceAck_set_chain_hash(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * Constructs a new FundingSigned given each field
+ * The intended change in channel capacity: the amount to be added (positive value)
+ * or removed (negative value) by the sender (splice acceptor) by splicing into/from the channel.
  */
-MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
+int64_t SpliceAck_get_relative_satoshis(const struct LDKSpliceAck *NONNULL_PTR this_ptr);
 
 /**
- * Creates a copy of the FundingSigned
+ * The intended change in channel capacity: the amount to be added (positive value)
+ * or removed (negative value) by the sender (splice acceptor) by splicing into/from the channel.
  */
-struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
+void SpliceAck_set_relative_satoshis(struct LDKSpliceAck *NONNULL_PTR this_ptr, int64_t val);
 
 /**
- * Checks if two FundingSigneds contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * The key of the sender (splice acceptor) controlling the new funding transaction
  */
-bool FundingSigned_eq(const struct LDKFundingSigned *NONNULL_PTR a, const struct LDKFundingSigned *NONNULL_PTR b);
+struct LDKPublicKey SpliceAck_get_funding_pubkey(const struct LDKSpliceAck *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the ChannelReady, if is_owned is set and inner is non-NULL.
+ * The key of the sender (splice acceptor) controlling the new funding transaction
  */
-void ChannelReady_free(struct LDKChannelReady this_obj);
+void SpliceAck_set_funding_pubkey(struct LDKSpliceAck *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The channel ID
+ * Constructs a new SpliceAck given each field
  */
-const uint8_t (*ChannelReady_get_channel_id(const struct LDKChannelReady *NONNULL_PTR this_ptr))[32];
+MUST_USE_RES struct LDKSpliceAck SpliceAck_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes chain_hash_arg, int64_t relative_satoshis_arg, struct LDKPublicKey funding_pubkey_arg);
 
 /**
- * The channel ID
+ * Creates a copy of the SpliceAck
  */
-void ChannelReady_set_channel_id(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+struct LDKSpliceAck SpliceAck_clone(const struct LDKSpliceAck *NONNULL_PTR orig);
 
 /**
- * The per-commitment point of the second commitment transaction
+ * Checks if two SpliceAcks contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-struct LDKPublicKey ChannelReady_get_next_per_commitment_point(const struct LDKChannelReady *NONNULL_PTR this_ptr);
+bool SpliceAck_eq(const struct LDKSpliceAck *NONNULL_PTR a, const struct LDKSpliceAck *NONNULL_PTR b);
 
 /**
- * The per-commitment point of the second commitment transaction
+ * Frees any resources used by the SpliceLocked, if is_owned is set and inner is non-NULL.
  */
-void ChannelReady_set_next_per_commitment_point(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void SpliceLocked_free(struct LDKSpliceLocked this_obj);
 
 /**
- * If set, provides a `short_channel_id` alias for this channel.
- *
- * The sender will accept payments to be forwarded over this SCID and forward them to this
- * messages' recipient.
+ * The channel ID
  */
-struct LDKCOption_u64Z ChannelReady_get_short_channel_id_alias(const struct LDKChannelReady *NONNULL_PTR this_ptr);
+struct LDKChannelId SpliceLocked_get_channel_id(const struct LDKSpliceLocked *NONNULL_PTR this_ptr);
 
 /**
- * If set, provides a `short_channel_id` alias for this channel.
- *
- * The sender will accept payments to be forwarded over this SCID and forward them to this
- * messages' recipient.
+ * The channel ID
  */
-void ChannelReady_set_short_channel_id_alias(struct LDKChannelReady *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+void SpliceLocked_set_channel_id(struct LDKSpliceLocked *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
- * Constructs a new ChannelReady given each field
+ * Constructs a new SpliceLocked given each field
  */
-MUST_USE_RES struct LDKChannelReady ChannelReady_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg, struct LDKCOption_u64Z short_channel_id_alias_arg);
+MUST_USE_RES struct LDKSpliceLocked SpliceLocked_new(struct LDKChannelId channel_id_arg);
 
 /**
- * Creates a copy of the ChannelReady
+ * Creates a copy of the SpliceLocked
  */
-struct LDKChannelReady ChannelReady_clone(const struct LDKChannelReady *NONNULL_PTR orig);
+struct LDKSpliceLocked SpliceLocked_clone(const struct LDKSpliceLocked *NONNULL_PTR orig);
 
 /**
- * Checks if two ChannelReadys contain equal inner contents.
+ * Checks if two SpliceLockeds contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
  * Two objects with NULL inner values will be considered "equal" here.
  */
-bool ChannelReady_eq(const struct LDKChannelReady *NONNULL_PTR a, const struct LDKChannelReady *NONNULL_PTR b);
+bool SpliceLocked_eq(const struct LDKSpliceLocked *NONNULL_PTR a, const struct LDKSpliceLocked *NONNULL_PTR b);
 
 /**
  * Frees any resources used by the TxAddInput, if is_owned is set and inner is non-NULL.
@@ -30877,12 +40164,12 @@ void TxAddInput_free(struct LDKTxAddInput this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxAddInput_get_channel_id(const struct LDKTxAddInput *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxAddInput_set_channel_id(struct LDKTxAddInput *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * A randomly chosen unique identifier for this input, which is even for initiators and odd for
@@ -30931,13 +40218,18 @@ void TxAddInput_set_sequence(struct LDKTxAddInput *NONNULL_PTR this_ptr, uint32_
 /**
  * Constructs a new TxAddInput given each field
  */
-MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg);
+MUST_USE_RES struct LDKTxAddInput TxAddInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, struct LDKTransactionU16LenLimited prevtx_arg, uint32_t prevtx_out_arg, uint32_t sequence_arg);
 
 /**
  * Creates a copy of the TxAddInput
  */
 struct LDKTxAddInput TxAddInput_clone(const struct LDKTxAddInput *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxAddInput.
+ */
+uint64_t TxAddInput_hash(const struct LDKTxAddInput *NONNULL_PTR o);
+
 /**
  * Checks if two TxAddInputs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -30953,12 +40245,12 @@ void TxAddOutput_free(struct LDKTxAddOutput this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxAddOutput_get_channel_id(const struct LDKTxAddOutput *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxAddOutput_set_channel_id(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * A randomly chosen unique identifier for this output, which is even for initiators and odd for
@@ -30985,7 +40277,7 @@ void TxAddOutput_set_sats(struct LDKTxAddOutput *NONNULL_PTR this_ptr, uint64_t
 /**
  * The scriptPubKey for the output
  */
-struct LDKu8slice TxAddOutput_get_script(const struct LDKTxAddOutput *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z TxAddOutput_get_script(const struct LDKTxAddOutput *NONNULL_PTR this_ptr);
 
 /**
  * The scriptPubKey for the output
@@ -30995,13 +40287,18 @@ void TxAddOutput_set_script(struct LDKTxAddOutput *NONNULL_PTR this_ptr, struct
 /**
  * Constructs a new TxAddOutput given each field
  */
-MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg);
+MUST_USE_RES struct LDKTxAddOutput TxAddOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg, uint64_t sats_arg, struct LDKCVec_u8Z script_arg);
 
 /**
  * Creates a copy of the TxAddOutput
  */
 struct LDKTxAddOutput TxAddOutput_clone(const struct LDKTxAddOutput *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxAddOutput.
+ */
+uint64_t TxAddOutput_hash(const struct LDKTxAddOutput *NONNULL_PTR o);
+
 /**
  * Checks if two TxAddOutputs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31017,12 +40314,12 @@ void TxRemoveInput_free(struct LDKTxRemoveInput this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxRemoveInput_get_channel_id(const struct LDKTxRemoveInput *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxRemoveInput_set_channel_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The serial ID of the input to be removed
@@ -31037,13 +40334,18 @@ void TxRemoveInput_set_serial_id(struct LDKTxRemoveInput *NONNULL_PTR this_ptr,
 /**
  * Constructs a new TxRemoveInput given each field
  */
-MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg);
+MUST_USE_RES struct LDKTxRemoveInput TxRemoveInput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg);
 
 /**
  * Creates a copy of the TxRemoveInput
  */
 struct LDKTxRemoveInput TxRemoveInput_clone(const struct LDKTxRemoveInput *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxRemoveInput.
+ */
+uint64_t TxRemoveInput_hash(const struct LDKTxRemoveInput *NONNULL_PTR o);
+
 /**
  * Checks if two TxRemoveInputs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31059,12 +40361,12 @@ void TxRemoveOutput_free(struct LDKTxRemoveOutput this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxRemoveOutput_get_channel_id(const struct LDKTxRemoveOutput *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxRemoveOutput_set_channel_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The serial ID of the output to be removed
@@ -31079,13 +40381,18 @@ void TxRemoveOutput_set_serial_id(struct LDKTxRemoveOutput *NONNULL_PTR this_ptr
 /**
  * Constructs a new TxRemoveOutput given each field
  */
-MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t serial_id_arg);
+MUST_USE_RES struct LDKTxRemoveOutput TxRemoveOutput_new(struct LDKChannelId channel_id_arg, uint64_t serial_id_arg);
 
 /**
  * Creates a copy of the TxRemoveOutput
  */
 struct LDKTxRemoveOutput TxRemoveOutput_clone(const struct LDKTxRemoveOutput *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxRemoveOutput.
+ */
+uint64_t TxRemoveOutput_hash(const struct LDKTxRemoveOutput *NONNULL_PTR o);
+
 /**
  * Checks if two TxRemoveOutputs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31101,23 +40408,28 @@ void TxComplete_free(struct LDKTxComplete this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxComplete_get_channel_id(const struct LDKTxComplete *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxComplete_set_channel_id(struct LDKTxComplete *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * Constructs a new TxComplete given each field
  */
-MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKThirtyTwoBytes channel_id_arg);
+MUST_USE_RES struct LDKTxComplete TxComplete_new(struct LDKChannelId channel_id_arg);
 
 /**
  * Creates a copy of the TxComplete
  */
 struct LDKTxComplete TxComplete_clone(const struct LDKTxComplete *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxComplete.
+ */
+uint64_t TxComplete_hash(const struct LDKTxComplete *NONNULL_PTR o);
+
 /**
  * Checks if two TxCompletes contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31133,12 +40445,12 @@ void TxSignatures_free(struct LDKTxSignatures this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxSignatures_get_channel_id(const struct LDKTxSignatures *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxSignatures_set_channel_id(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The TXID
@@ -31162,16 +40474,31 @@ struct LDKCVec_WitnessZ TxSignatures_get_witnesses(const struct LDKTxSignatures
  */
 void TxSignatures_set_witnesses(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCVec_WitnessZ val);
 
+/**
+ * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers
+ */
+struct LDKCOption_ECDSASignatureZ TxSignatures_get_funding_outpoint_sig(const struct LDKTxSignatures *NONNULL_PTR this_ptr);
+
+/**
+ * Optional signature for the shared input -- the previous funding outpoint -- signed by both peers
+ */
+void TxSignatures_set_funding_outpoint_sig(struct LDKTxSignatures *NONNULL_PTR this_ptr, struct LDKCOption_ECDSASignatureZ val);
+
 /**
  * Constructs a new TxSignatures given each field
  */
-MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg);
+MUST_USE_RES struct LDKTxSignatures TxSignatures_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes tx_hash_arg, struct LDKCVec_WitnessZ witnesses_arg, struct LDKCOption_ECDSASignatureZ funding_outpoint_sig_arg);
 
 /**
  * Creates a copy of the TxSignatures
  */
 struct LDKTxSignatures TxSignatures_clone(const struct LDKTxSignatures *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxSignatures.
+ */
+uint64_t TxSignatures_hash(const struct LDKTxSignatures *NONNULL_PTR o);
+
 /**
  * Checks if two TxSignaturess contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31187,12 +40514,12 @@ void TxInitRbf_free(struct LDKTxInitRbf this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxInitRbf_get_channel_id(const struct LDKTxInitRbf *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxInitRbf_set_channel_id(struct LDKTxInitRbf *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The locktime of the transaction
@@ -31229,13 +40556,18 @@ void TxInitRbf_set_funding_output_contribution(struct LDKTxInitRbf *NONNULL_PTR
 /**
  * Constructs a new TxInitRbf given each field
  */
-MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
+MUST_USE_RES struct LDKTxInitRbf TxInitRbf_new(struct LDKChannelId channel_id_arg, uint32_t locktime_arg, uint32_t feerate_sat_per_1000_weight_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
 
 /**
  * Creates a copy of the TxInitRbf
  */
 struct LDKTxInitRbf TxInitRbf_clone(const struct LDKTxInitRbf *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxInitRbf.
+ */
+uint64_t TxInitRbf_hash(const struct LDKTxInitRbf *NONNULL_PTR o);
+
 /**
  * Checks if two TxInitRbfs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31251,12 +40583,12 @@ void TxAckRbf_free(struct LDKTxAckRbf this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxAckRbf_get_channel_id(const struct LDKTxAckRbf *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxAckRbf_set_channel_id(struct LDKTxAckRbf *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The number of satoshis the sender will contribute to or, if negative, remove from
@@ -31273,13 +40605,18 @@ void TxAckRbf_set_funding_output_contribution(struct LDKTxAckRbf *NONNULL_PTR th
 /**
  * Constructs a new TxAckRbf given each field
  */
-MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
+MUST_USE_RES struct LDKTxAckRbf TxAckRbf_new(struct LDKChannelId channel_id_arg, struct LDKCOption_i64Z funding_output_contribution_arg);
 
 /**
  * Creates a copy of the TxAckRbf
  */
 struct LDKTxAckRbf TxAckRbf_clone(const struct LDKTxAckRbf *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxAckRbf.
+ */
+uint64_t TxAckRbf_hash(const struct LDKTxAckRbf *NONNULL_PTR o);
+
 /**
  * Checks if two TxAckRbfs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31295,12 +40632,12 @@ void TxAbort_free(struct LDKTxAbort this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId TxAbort_get_channel_id(const struct LDKTxAbort *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void TxAbort_set_channel_id(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * Message data
@@ -31317,13 +40654,18 @@ void TxAbort_set_data(struct LDKTxAbort *NONNULL_PTR this_ptr, struct LDKCVec_u8
 /**
  * Constructs a new TxAbort given each field
  */
-MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
+MUST_USE_RES struct LDKTxAbort TxAbort_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z data_arg);
 
 /**
  * Creates a copy of the TxAbort
  */
 struct LDKTxAbort TxAbort_clone(const struct LDKTxAbort *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the TxAbort.
+ */
+uint64_t TxAbort_hash(const struct LDKTxAbort *NONNULL_PTR o);
+
 /**
  * Checks if two TxAborts contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31339,19 +40681,19 @@ void Shutdown_free(struct LDKShutdown this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The destination of this peer's funds on closing.
  *
  * Must be in one of these forms: P2PKH, P2SH, P2WPKH, P2WSH, P2TR.
  */
-struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
 
 /**
  * The destination of this peer's funds on closing.
@@ -31363,13 +40705,18 @@ void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct
 /**
  * Constructs a new Shutdown given each field
  */
-MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
+MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKChannelId channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
 
 /**
  * Creates a copy of the Shutdown
  */
 struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the Shutdown.
+ */
+uint64_t Shutdown_hash(const struct LDKShutdown *NONNULL_PTR o);
+
 /**
  * Checks if two Shutdowns contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31416,6 +40763,11 @@ MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t
  */
 struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ClosingSignedFeeRange.
+ */
+uint64_t ClosingSignedFeeRange_hash(const struct LDKClosingSignedFeeRange *NONNULL_PTR o);
+
 /**
  * Checks if two ClosingSignedFeeRanges contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31431,12 +40783,12 @@ void ClosingSigned_free(struct LDKClosingSigned this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The proposed total fee for the closing transaction
@@ -31451,12 +40803,12 @@ void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_pt
 /**
  * A signature on the closing transaction
  */
-struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
+struct LDKECDSASignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
 
 /**
  * A signature on the closing transaction
  */
-void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
+void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * The minimum and maximum fees which the sender is willing to accept, provided only by new
@@ -31476,14 +40828,21 @@ void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr,
 
 /**
  * Constructs a new ClosingSigned given each field
+ *
+ * Note that fee_range_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
+MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKChannelId channel_id_arg, uint64_t fee_satoshis_arg, struct LDKECDSASignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
 
 /**
  * Creates a copy of the ClosingSigned
  */
 struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ClosingSigned.
+ */
+uint64_t ClosingSigned_hash(const struct LDKClosingSigned *NONNULL_PTR o);
+
 /**
  * Checks if two ClosingSigneds contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31499,12 +40858,12 @@ void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The HTLC ID
@@ -31562,11 +40921,49 @@ struct LDKCOption_u64Z UpdateAddHTLC_get_skimmed_fee_msat(const struct LDKUpdate
  */
 void UpdateAddHTLC_set_skimmed_fee_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
 
+/**
+ * The onion routing packet with encrypted data for the next hop.
+ */
+struct LDKOnionPacket UpdateAddHTLC_get_onion_routing_packet(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
+
+/**
+ * The onion routing packet with encrypted data for the next hop.
+ */
+void UpdateAddHTLC_set_onion_routing_packet(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKOnionPacket val);
+
+/**
+ * Provided if we are relaying or receiving a payment within a blinded path, to decrypt the onion
+ * routing packet and the recipient-provided encrypted payload within.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKPublicKey UpdateAddHTLC_get_blinding_point(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
+
+/**
+ * Provided if we are relaying or receiving a payment within a blinded path, to decrypt the onion
+ * routing packet and the recipient-provided encrypted payload within.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void UpdateAddHTLC_set_blinding_point(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Constructs a new UpdateAddHTLC given each field
+ *
+ * Note that blinding_point_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKUpdateAddHTLC UpdateAddHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, uint64_t amount_msat_arg, struct LDKThirtyTwoBytes payment_hash_arg, uint32_t cltv_expiry_arg, struct LDKCOption_u64Z skimmed_fee_msat_arg, struct LDKOnionPacket onion_routing_packet_arg, struct LDKPublicKey blinding_point_arg);
+
 /**
  * Creates a copy of the UpdateAddHTLC
  */
 struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UpdateAddHTLC.
+ */
+uint64_t UpdateAddHTLC_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR o);
+
 /**
  * Checks if two UpdateAddHTLCs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31589,11 +40986,31 @@ struct LDKPublicKey OnionMessage_get_blinding_point(const struct LDKOnionMessage
  */
 void OnionMessage_set_blinding_point(struct LDKOnionMessage *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
+/**
+ * The full onion packet including hop data, pubkey, and hmac
+ */
+struct LDKPacket OnionMessage_get_onion_routing_packet(const struct LDKOnionMessage *NONNULL_PTR this_ptr);
+
+/**
+ * The full onion packet including hop data, pubkey, and hmac
+ */
+void OnionMessage_set_onion_routing_packet(struct LDKOnionMessage *NONNULL_PTR this_ptr, struct LDKPacket val);
+
+/**
+ * Constructs a new OnionMessage given each field
+ */
+MUST_USE_RES struct LDKOnionMessage OnionMessage_new(struct LDKPublicKey blinding_point_arg, struct LDKPacket onion_routing_packet_arg);
+
 /**
  * Creates a copy of the OnionMessage
  */
 struct LDKOnionMessage OnionMessage_clone(const struct LDKOnionMessage *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the OnionMessage.
+ */
+uint64_t OnionMessage_hash(const struct LDKOnionMessage *NONNULL_PTR o);
+
 /**
  * Checks if two OnionMessages contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31609,12 +41026,12 @@ void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The HTLC ID
@@ -31639,13 +41056,18 @@ void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL
 /**
  * Constructs a new UpdateFulfillHTLC given each field
  */
-MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
+MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKChannelId channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
 
 /**
  * Creates a copy of the UpdateFulfillHTLC
  */
 struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UpdateFulfillHTLC.
+ */
+uint64_t UpdateFulfillHTLC_hash(const struct LDKUpdateFulfillHTLC *NONNULL_PTR o);
+
 /**
  * Checks if two UpdateFulfillHTLCs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31661,12 +41083,12 @@ void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The HTLC ID
@@ -31683,6 +41105,11 @@ void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr,
  */
 struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UpdateFailHTLC.
+ */
+uint64_t UpdateFailHTLC_hash(const struct LDKUpdateFailHTLC *NONNULL_PTR o);
+
 /**
  * Checks if two UpdateFailHTLCs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31698,12 +41125,12 @@ void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The HTLC ID
@@ -31730,6 +41157,11 @@ void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC
  */
 struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UpdateFailMalformedHTLC.
+ */
+uint64_t UpdateFailMalformedHTLC_hash(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR o);
+
 /**
  * Checks if two UpdateFailMalformedHTLCs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31745,45 +41177,50 @@ void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * A signature on the commitment transaction
  */
-struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
+struct LDKECDSASignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
 
 /**
  * A signature on the commitment transaction
  */
-void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
+void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * Signatures on the HTLC transactions
  *
  * Returns a copy of the field.
  */
-struct LDKCVec_SignatureZ CommitmentSigned_get_htlc_signatures(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
+struct LDKCVec_ECDSASignatureZ CommitmentSigned_get_htlc_signatures(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
 
 /**
  * Signatures on the HTLC transactions
  */
-void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
+void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_ECDSASignatureZ val);
 
 /**
  * Constructs a new CommitmentSigned given each field
  */
-MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
+MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKChannelId channel_id_arg, struct LDKECDSASignature signature_arg, struct LDKCVec_ECDSASignatureZ htlc_signatures_arg);
 
 /**
  * Creates a copy of the CommitmentSigned
  */
 struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the CommitmentSigned.
+ */
+uint64_t CommitmentSigned_hash(const struct LDKCommitmentSigned *NONNULL_PTR o);
+
 /**
  * Checks if two CommitmentSigneds contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31799,12 +41236,12 @@ void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The secret corresponding to the per-commitment point
@@ -31829,13 +41266,18 @@ void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_
 /**
  * Constructs a new RevokeAndACK given each field
  */
-MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg);
+MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKChannelId channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg);
 
 /**
  * Creates a copy of the RevokeAndACK
  */
 struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the RevokeAndACK.
+ */
+uint64_t RevokeAndACK_hash(const struct LDKRevokeAndACK *NONNULL_PTR o);
+
 /**
  * Checks if two RevokeAndACKs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31851,12 +41293,12 @@ void UpdateFee_free(struct LDKUpdateFee this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * Fee rate per 1000-weight of the transaction
@@ -31871,13 +41313,18 @@ void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uin
 /**
  * Constructs a new UpdateFee given each field
  */
-MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
+MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKChannelId channel_id_arg, uint32_t feerate_per_kw_arg);
 
 /**
  * Creates a copy of the UpdateFee
  */
 struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UpdateFee.
+ */
+uint64_t UpdateFee_hash(const struct LDKUpdateFee *NONNULL_PTR o);
+
 /**
  * Checks if two UpdateFees contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31893,12 +41340,12 @@ void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The next commitment number for the sender
@@ -31945,23 +41392,28 @@ void ChannelReestablish_set_my_current_per_commitment_point(struct LDKChannelRee
 /**
  * The next funding transaction ID
  */
-struct LDKCOption_TxidZ ChannelReestablish_get_next_funding_txid(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
+struct LDKCOption_ThirtyTwoBytesZ ChannelReestablish_get_next_funding_txid(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
 
 /**
  * The next funding transaction ID
  */
-void ChannelReestablish_set_next_funding_txid(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKCOption_TxidZ val);
+void ChannelReestablish_set_next_funding_txid(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
 
 /**
  * Constructs a new ChannelReestablish given each field
  */
-MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_TxidZ next_funding_txid_arg);
+MUST_USE_RES struct LDKChannelReestablish ChannelReestablish_new(struct LDKChannelId channel_id_arg, uint64_t next_local_commitment_number_arg, uint64_t next_remote_commitment_number_arg, struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg, struct LDKCOption_ThirtyTwoBytesZ next_funding_txid_arg);
 
 /**
  * Creates a copy of the ChannelReestablish
  */
 struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelReestablish.
+ */
+uint64_t ChannelReestablish_hash(const struct LDKChannelReestablish *NONNULL_PTR o);
+
 /**
  * Checks if two ChannelReestablishs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -31977,12 +41429,12 @@ void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
 /**
  * The channel ID
  */
-const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
+struct LDKChannelId AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
 
 /**
  * The channel ID
  */
-void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
  * The short channel ID
@@ -31997,33 +41449,38 @@ void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignature
 /**
  * A signature by the node key
  */
-struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
+struct LDKECDSASignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
 
 /**
  * A signature by the node key
  */
-void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
+void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * A signature by the funding key
  */
-struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
+struct LDKECDSASignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
 
 /**
  * A signature by the funding key
  */
-void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
+void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * Constructs a new AnnouncementSignatures given each field
  */
-MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, struct LDKSignature node_signature_arg, struct LDKSignature bitcoin_signature_arg);
+MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKChannelId channel_id_arg, uint64_t short_channel_id_arg, struct LDKECDSASignature node_signature_arg, struct LDKECDSASignature bitcoin_signature_arg);
 
 /**
  * Creates a copy of the AnnouncementSignatures
  */
 struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the AnnouncementSignatures.
+ */
+uint64_t AnnouncementSignatures_hash(const struct LDKAnnouncementSignatures *NONNULL_PTR o);
+
 /**
  * Checks if two AnnouncementSignaturess contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32032,55 +41489,113 @@ struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAn
 bool AnnouncementSignatures_eq(const struct LDKAnnouncementSignatures *NONNULL_PTR a, const struct LDKAnnouncementSignatures *NONNULL_PTR b);
 
 /**
- * Frees any resources used by the NetAddress
+ * Frees any resources used by the SocketAddress
  */
-void NetAddress_free(struct LDKNetAddress this_ptr);
+void SocketAddress_free(struct LDKSocketAddress this_ptr);
 
 /**
- * Creates a copy of the NetAddress
+ * Creates a copy of the SocketAddress
  */
-struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
+struct LDKSocketAddress SocketAddress_clone(const struct LDKSocketAddress *NONNULL_PTR orig);
 
 /**
- * Utility method to constructs a new IPv4-variant NetAddress
+ * Utility method to constructs a new TcpIpV4-variant SocketAddress
  */
-struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
+struct LDKSocketAddress SocketAddress_tcp_ip_v4(struct LDKFourBytes addr, uint16_t port);
 
 /**
- * Utility method to constructs a new IPv6-variant NetAddress
+ * Utility method to constructs a new TcpIpV6-variant SocketAddress
  */
-struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
+struct LDKSocketAddress SocketAddress_tcp_ip_v6(struct LDKSixteenBytes addr, uint16_t port);
 
 /**
- * Utility method to constructs a new OnionV2-variant NetAddress
+ * Utility method to constructs a new OnionV2-variant SocketAddress
  */
-struct LDKNetAddress NetAddress_onion_v2(struct LDKTwelveBytes a);
+struct LDKSocketAddress SocketAddress_onion_v2(struct LDKTwelveBytes a);
 
 /**
- * Utility method to constructs a new OnionV3-variant NetAddress
+ * Utility method to constructs a new OnionV3-variant SocketAddress
  */
-struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
+struct LDKSocketAddress SocketAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
 
 /**
- * Utility method to constructs a new Hostname-variant NetAddress
+ * Utility method to constructs a new Hostname-variant SocketAddress
  */
-struct LDKNetAddress NetAddress_hostname(struct LDKHostname hostname, uint16_t port);
+struct LDKSocketAddress SocketAddress_hostname(struct LDKHostname hostname, uint16_t port);
 
 /**
- * Checks if two NetAddresss contain equal inner contents.
+ * Generates a non-cryptographic 64-bit hash of the SocketAddress.
+ */
+uint64_t SocketAddress_hash(const struct LDKSocketAddress *NONNULL_PTR o);
+
+/**
+ * Checks if two SocketAddresss contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-bool NetAddress_eq(const struct LDKNetAddress *NONNULL_PTR a, const struct LDKNetAddress *NONNULL_PTR b);
+bool SocketAddress_eq(const struct LDKSocketAddress *NONNULL_PTR a, const struct LDKSocketAddress *NONNULL_PTR b);
 
 /**
- * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
+ * Serialize the SocketAddress object into a byte array which can be read by SocketAddress_read
  */
-struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
+struct LDKCVec_u8Z SocketAddress_write(const struct LDKSocketAddress *NONNULL_PTR obj);
 
 /**
- * Read a NetAddress from a byte array, created by NetAddress_write
+ * Read a SocketAddress from a byte array, created by SocketAddress_write
  */
-struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
+struct LDKCResult_SocketAddressDecodeErrorZ SocketAddress_read(struct LDKu8slice ser);
+
+/**
+ * Creates a copy of the SocketAddressParseError
+ */
+enum LDKSocketAddressParseError SocketAddressParseError_clone(const enum LDKSocketAddressParseError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new SocketAddrParse-variant SocketAddressParseError
+ */
+enum LDKSocketAddressParseError SocketAddressParseError_socket_addr_parse(void);
+
+/**
+ * Utility method to constructs a new InvalidInput-variant SocketAddressParseError
+ */
+enum LDKSocketAddressParseError SocketAddressParseError_invalid_input(void);
+
+/**
+ * Utility method to constructs a new InvalidPort-variant SocketAddressParseError
+ */
+enum LDKSocketAddressParseError SocketAddressParseError_invalid_port(void);
+
+/**
+ * Utility method to constructs a new InvalidOnionV3-variant SocketAddressParseError
+ */
+enum LDKSocketAddressParseError SocketAddressParseError_invalid_onion_v3(void);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the SocketAddressParseError.
+ */
+uint64_t SocketAddressParseError_hash(const enum LDKSocketAddressParseError *NONNULL_PTR o);
+
+/**
+ * Checks if two SocketAddressParseErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool SocketAddressParseError_eq(const enum LDKSocketAddressParseError *NONNULL_PTR a, const enum LDKSocketAddressParseError *NONNULL_PTR b);
+
+/**
+ * Parses an OnionV3 host and port into a [`SocketAddress::OnionV3`].
+ *
+ * The host part must end with \".onion\".
+ */
+struct LDKCResult_SocketAddressSocketAddressParseErrorZ parse_onion_address(struct LDKStr host, uint16_t port);
+
+/**
+ * Get the string representation of a SocketAddress object
+ */
+struct LDKStr SocketAddress_to_str(const struct LDKSocketAddress *NONNULL_PTR o);
+
+/**
+ * Read a SocketAddress object from a string
+ */
+struct LDKCResult_SocketAddressSocketAddressParseErrorZ SocketAddress_from_str(struct LDKStr s);
 
 /**
  * Frees any resources used by the UnsignedGossipMessage
@@ -32178,18 +41693,64 @@ void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONN
  *
  * Returns a copy of the field.
  */
-struct LDKCVec_NetAddressZ UnsignedNodeAnnouncement_get_addresses(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+struct LDKCVec_SocketAddressZ UnsignedNodeAnnouncement_get_addresses(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
 
 /**
  * List of addresses on which this node is reachable
  */
-void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
+void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_SocketAddressZ val);
+
+/**
+ * Excess address data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_address_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+
+/**
+ * Excess address data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new address types are added to the lightning gossip protocol.
+ */
+void UnsignedNodeAnnouncement_set_excess_address_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+
+/**
+ * Excess data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u8Z UnsignedNodeAnnouncement_get_excess_data(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+
+/**
+ * Excess data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol.
+ */
+void UnsignedNodeAnnouncement_set_excess_data(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+
+/**
+ * Constructs a new UnsignedNodeAnnouncement given each field
+ */
+MUST_USE_RES struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_new(struct LDKNodeFeatures features_arg, uint32_t timestamp_arg, struct LDKNodeId node_id_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKCVec_SocketAddressZ addresses_arg, struct LDKCVec_u8Z excess_address_data_arg, struct LDKCVec_u8Z excess_data_arg);
 
 /**
  * Creates a copy of the UnsignedNodeAnnouncement
  */
 struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UnsignedNodeAnnouncement.
+ */
+uint64_t UnsignedNodeAnnouncement_hash(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR o);
+
 /**
  * Checks if two UnsignedNodeAnnouncements contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32205,12 +41766,12 @@ void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
 /**
  * The signature by the node key
  */
-struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
+struct LDKECDSASignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
 
 /**
  * The signature by the node key
  */
-void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
+void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * The actual content of the announcement
@@ -32225,13 +41786,18 @@ void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_
 /**
  * Constructs a new NodeAnnouncement given each field
  */
-MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
+MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKECDSASignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
 
 /**
  * Creates a copy of the NodeAnnouncement
  */
 struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the NodeAnnouncement.
+ */
+uint64_t NodeAnnouncement_hash(const struct LDKNodeAnnouncement *NONNULL_PTR o);
+
 /**
  * Checks if two NodeAnnouncements contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32314,11 +41880,39 @@ struct LDKNodeId UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKU
  */
 void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeId val);
 
+/**
+ * Excess data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u8Z UnsignedChannelAnnouncement_get_excess_data(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
+
+/**
+ * Excess data which was signed as a part of the message which we do not (yet) understand how
+ * to decode.
+ *
+ * This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol.
+ */
+void UnsignedChannelAnnouncement_set_excess_data(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+
+/**
+ * Constructs a new UnsignedChannelAnnouncement given each field
+ */
+MUST_USE_RES struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_new(struct LDKChannelFeatures features_arg, struct LDKThirtyTwoBytes chain_hash_arg, uint64_t short_channel_id_arg, struct LDKNodeId node_id_1_arg, struct LDKNodeId node_id_2_arg, struct LDKNodeId bitcoin_key_1_arg, struct LDKNodeId bitcoin_key_2_arg, struct LDKCVec_u8Z excess_data_arg);
+
 /**
  * Creates a copy of the UnsignedChannelAnnouncement
  */
 struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UnsignedChannelAnnouncement.
+ */
+uint64_t UnsignedChannelAnnouncement_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR o);
+
 /**
  * Checks if two UnsignedChannelAnnouncements contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32334,42 +41928,42 @@ void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
 /**
  * Authentication of the announcement by the first public node
  */
-struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
+struct LDKECDSASignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
 
 /**
  * Authentication of the announcement by the first public node
  */
-void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
+void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * Authentication of the announcement by the second public node
  */
-struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
+struct LDKECDSASignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
 
 /**
  * Authentication of the announcement by the second public node
  */
-void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
+void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * Proof of funding UTXO ownership by the first public node
  */
-struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
+struct LDKECDSASignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
 
 /**
  * Proof of funding UTXO ownership by the first public node
  */
-void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
+void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * Proof of funding UTXO ownership by the second public node
  */
-struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
+struct LDKECDSASignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
 
 /**
  * Proof of funding UTXO ownership by the second public node
  */
-void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
+void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * The actual announcement
@@ -32384,13 +41978,18 @@ void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR
 /**
  * Constructs a new ChannelAnnouncement given each field
  */
-MUST_USE_RES struct LDKChannelAnnouncement ChannelAnnouncement_new(struct LDKSignature node_signature_1_arg, struct LDKSignature node_signature_2_arg, struct LDKSignature bitcoin_signature_1_arg, struct LDKSignature bitcoin_signature_2_arg, struct LDKUnsignedChannelAnnouncement contents_arg);
+MUST_USE_RES struct LDKChannelAnnouncement ChannelAnnouncement_new(struct LDKECDSASignature node_signature_1_arg, struct LDKECDSASignature node_signature_2_arg, struct LDKECDSASignature bitcoin_signature_1_arg, struct LDKECDSASignature bitcoin_signature_2_arg, struct LDKUnsignedChannelAnnouncement contents_arg);
 
 /**
  * Creates a copy of the ChannelAnnouncement
  */
 struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelAnnouncement.
+ */
+uint64_t ChannelAnnouncement_hash(const struct LDKChannelAnnouncement *NONNULL_PTR o);
+
 /**
  * Checks if two ChannelAnnouncements contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32539,6 +42138,11 @@ MUST_USE_RES struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_new(struct LD
  */
 struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the UnsignedChannelUpdate.
+ */
+uint64_t UnsignedChannelUpdate_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR o);
+
 /**
  * Checks if two UnsignedChannelUpdates contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32554,12 +42158,12 @@ void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
 /**
  * A signature of the channel update
  */
-struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
+struct LDKECDSASignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
 
 /**
  * A signature of the channel update
  */
-void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
+void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * The actual channel update
@@ -32574,13 +42178,18 @@ void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, s
 /**
  * Constructs a new ChannelUpdate given each field
  */
-MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
+MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKECDSASignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
 
 /**
  * Creates a copy of the ChannelUpdate
  */
 struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelUpdate.
+ */
+uint64_t ChannelUpdate_hash(const struct LDKChannelUpdate *NONNULL_PTR o);
+
 /**
  * Checks if two ChannelUpdates contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32633,6 +42242,11 @@ MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyT
  */
 struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the QueryChannelRange.
+ */
+uint64_t QueryChannelRange_hash(const struct LDKQueryChannelRange *NONNULL_PTR o);
+
 /**
  * Checks if two QueryChannelRanges contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32707,6 +42321,11 @@ MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyT
  */
 struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ReplyChannelRange.
+ */
+uint64_t ReplyChannelRange_hash(const struct LDKReplyChannelRange *NONNULL_PTR o);
+
 /**
  * Checks if two ReplyChannelRanges contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32751,6 +42370,11 @@ MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKT
  */
 struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the QueryShortChannelIds.
+ */
+uint64_t QueryShortChannelIds_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR o);
+
 /**
  * Checks if two QueryShortChannelIdss contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32795,6 +42419,11 @@ MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struc
  */
 struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ReplyShortChannelIdsEnd.
+ */
+uint64_t ReplyShortChannelIdsEnd_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR o);
+
 /**
  * Checks if two ReplyShortChannelIdsEnds contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32847,6 +42476,11 @@ MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LD
  */
 struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the GossipTimestampFilter.
+ */
+uint64_t GossipTimestampFilter_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR o);
+
 /**
  * Checks if two GossipTimestampFilters contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -32899,6 +42533,11 @@ struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg)
  */
 struct LDKErrorAction ErrorAction_send_warning_message(struct LDKWarningMessage msg, enum LDKLevel log_level);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ErrorAction.
+ */
+uint64_t ErrorAction_hash(const struct LDKErrorAction *NONNULL_PTR o);
+
 /**
  * Frees any resources used by the LightningError, if is_owned is set and inner is non-NULL.
  */
@@ -33005,6 +42644,8 @@ void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_
 
 /**
  * Constructs a new CommitmentUpdate given each field
+ *
+ * Note that update_fee_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
 MUST_USE_RES struct LDKCommitmentUpdate CommitmentUpdate_new(struct LDKCVec_UpdateAddHTLCZ update_add_htlcs_arg, struct LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg, struct LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg, struct LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg, struct LDKUpdateFee update_fee_arg, struct LDKCommitmentSigned commitment_signed_arg);
 
@@ -33013,6 +42654,11 @@ MUST_USE_RES struct LDKCommitmentUpdate CommitmentUpdate_new(struct LDKCVec_Upda
  */
 struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the CommitmentUpdate.
+ */
+uint64_t CommitmentUpdate_hash(const struct LDKCommitmentUpdate *NONNULL_PTR o);
+
 /**
  * Checks if two CommitmentUpdates contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -33035,6 +42681,185 @@ void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
  */
 void OnionMessageHandler_free(struct LDKOnionMessageHandler this_ptr);
 
+/**
+ * Frees any resources used by the FinalOnionHopData, if is_owned is set and inner is non-NULL.
+ */
+void FinalOnionHopData_free(struct LDKFinalOnionHopData this_obj);
+
+/**
+ * When sending a multi-part payment, this secret is used to identify a payment across HTLCs.
+ * Because it is generated by the recipient and included in the invoice, it also provides
+ * proof to the recipient that the payment was sent by someone with the generated invoice.
+ */
+const uint8_t (*FinalOnionHopData_get_payment_secret(const struct LDKFinalOnionHopData *NONNULL_PTR this_ptr))[32];
+
+/**
+ * When sending a multi-part payment, this secret is used to identify a payment across HTLCs.
+ * Because it is generated by the recipient and included in the invoice, it also provides
+ * proof to the recipient that the payment was sent by someone with the generated invoice.
+ */
+void FinalOnionHopData_set_payment_secret(struct LDKFinalOnionHopData *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * The intended total amount that this payment is for.
+ *
+ * Message serialization may panic if this value is more than 21 million Bitcoin.
+ */
+uint64_t FinalOnionHopData_get_total_msat(const struct LDKFinalOnionHopData *NONNULL_PTR this_ptr);
+
+/**
+ * The intended total amount that this payment is for.
+ *
+ * Message serialization may panic if this value is more than 21 million Bitcoin.
+ */
+void FinalOnionHopData_set_total_msat(struct LDKFinalOnionHopData *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Constructs a new FinalOnionHopData given each field
+ */
+MUST_USE_RES struct LDKFinalOnionHopData FinalOnionHopData_new(struct LDKThirtyTwoBytes payment_secret_arg, uint64_t total_msat_arg);
+
+/**
+ * Creates a copy of the FinalOnionHopData
+ */
+struct LDKFinalOnionHopData FinalOnionHopData_clone(const struct LDKFinalOnionHopData *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the OnionPacket, if is_owned is set and inner is non-NULL.
+ */
+void OnionPacket_free(struct LDKOnionPacket this_obj);
+
+/**
+ * BOLT 4 version number.
+ */
+uint8_t OnionPacket_get_version(const struct LDKOnionPacket *NONNULL_PTR this_ptr);
+
+/**
+ * BOLT 4 version number.
+ */
+void OnionPacket_set_version(struct LDKOnionPacket *NONNULL_PTR this_ptr, uint8_t val);
+
+/**
+ * In order to ensure we always return an error on onion decode in compliance with [BOLT
+ * #4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md), we have to
+ * deserialize `OnionPacket`s contained in [`UpdateAddHTLC`] messages even if the ephemeral
+ * public key (here) is bogus, so we hold a [`Result`] instead of a [`PublicKey`] as we'd
+ * like.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCResult_PublicKeySecp256k1ErrorZ OnionPacket_get_public_key(const struct LDKOnionPacket *NONNULL_PTR this_ptr);
+
+/**
+ * In order to ensure we always return an error on onion decode in compliance with [BOLT
+ * #4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md), we have to
+ * deserialize `OnionPacket`s contained in [`UpdateAddHTLC`] messages even if the ephemeral
+ * public key (here) is bogus, so we hold a [`Result`] instead of a [`PublicKey`] as we'd
+ * like.
+ */
+void OnionPacket_set_public_key(struct LDKOnionPacket *NONNULL_PTR this_ptr, struct LDKCResult_PublicKeySecp256k1ErrorZ val);
+
+/**
+ * HMAC to verify the integrity of hop_data.
+ */
+const uint8_t (*OnionPacket_get_hmac(const struct LDKOnionPacket *NONNULL_PTR this_ptr))[32];
+
+/**
+ * HMAC to verify the integrity of hop_data.
+ */
+void OnionPacket_set_hmac(struct LDKOnionPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Creates a copy of the OnionPacket
+ */
+struct LDKOnionPacket OnionPacket_clone(const struct LDKOnionPacket *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the OnionPacket.
+ */
+uint64_t OnionPacket_hash(const struct LDKOnionPacket *NONNULL_PTR o);
+
+/**
+ * Checks if two OnionPackets contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool OnionPacket_eq(const struct LDKOnionPacket *NONNULL_PTR a, const struct LDKOnionPacket *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the TrampolineOnionPacket, if is_owned is set and inner is non-NULL.
+ */
+void TrampolineOnionPacket_free(struct LDKTrampolineOnionPacket this_obj);
+
+/**
+ * Bolt 04 version number
+ */
+uint8_t TrampolineOnionPacket_get_version(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+
+/**
+ * Bolt 04 version number
+ */
+void TrampolineOnionPacket_set_version(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, uint8_t val);
+
+/**
+ * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data
+ */
+struct LDKPublicKey TrampolineOnionPacket_get_public_key(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+
+/**
+ * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data
+ */
+void TrampolineOnionPacket_set_public_key(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Encrypted payload for the next hop
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u8Z TrampolineOnionPacket_get_hop_data(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr);
+
+/**
+ * Encrypted payload for the next hop
+ */
+void TrampolineOnionPacket_set_hop_data(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
+
+/**
+ * HMAC to verify the integrity of hop_data
+ */
+const uint8_t (*TrampolineOnionPacket_get_hmac(const struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr))[32];
+
+/**
+ * HMAC to verify the integrity of hop_data
+ */
+void TrampolineOnionPacket_set_hmac(struct LDKTrampolineOnionPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Constructs a new TrampolineOnionPacket given each field
+ */
+MUST_USE_RES struct LDKTrampolineOnionPacket TrampolineOnionPacket_new(uint8_t version_arg, struct LDKPublicKey public_key_arg, struct LDKCVec_u8Z hop_data_arg, struct LDKThirtyTwoBytes hmac_arg);
+
+/**
+ * Creates a copy of the TrampolineOnionPacket
+ */
+struct LDKTrampolineOnionPacket TrampolineOnionPacket_clone(const struct LDKTrampolineOnionPacket *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the TrampolineOnionPacket.
+ */
+uint64_t TrampolineOnionPacket_hash(const struct LDKTrampolineOnionPacket *NONNULL_PTR o);
+
+/**
+ * Checks if two TrampolineOnionPackets contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool TrampolineOnionPacket_eq(const struct LDKTrampolineOnionPacket *NONNULL_PTR a, const struct LDKTrampolineOnionPacket *NONNULL_PTR b);
+
+/**
+ * Serialize the TrampolineOnionPacket object into a byte array which can be read by TrampolineOnionPacket_read
+ */
+struct LDKCVec_u8Z TrampolineOnionPacket_write(const struct LDKTrampolineOnionPacket *NONNULL_PTR obj);
+
 /**
  * Serialize the AcceptChannel object into a byte array which can be read by AcceptChannel_read
  */
@@ -33055,6 +42880,46 @@ struct LDKCVec_u8Z AcceptChannelV2_write(const struct LDKAcceptChannelV2 *NONNUL
  */
 struct LDKCResult_AcceptChannelV2DecodeErrorZ AcceptChannelV2_read(struct LDKu8slice ser);
 
+/**
+ * Serialize the Stfu object into a byte array which can be read by Stfu_read
+ */
+struct LDKCVec_u8Z Stfu_write(const struct LDKStfu *NONNULL_PTR obj);
+
+/**
+ * Read a Stfu from a byte array, created by Stfu_write
+ */
+struct LDKCResult_StfuDecodeErrorZ Stfu_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the Splice object into a byte array which can be read by Splice_read
+ */
+struct LDKCVec_u8Z Splice_write(const struct LDKSplice *NONNULL_PTR obj);
+
+/**
+ * Read a Splice from a byte array, created by Splice_write
+ */
+struct LDKCResult_SpliceDecodeErrorZ Splice_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the SpliceAck object into a byte array which can be read by SpliceAck_read
+ */
+struct LDKCVec_u8Z SpliceAck_write(const struct LDKSpliceAck *NONNULL_PTR obj);
+
+/**
+ * Read a SpliceAck from a byte array, created by SpliceAck_write
+ */
+struct LDKCResult_SpliceAckDecodeErrorZ SpliceAck_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the SpliceLocked object into a byte array which can be read by SpliceLocked_read
+ */
+struct LDKCVec_u8Z SpliceLocked_write(const struct LDKSpliceLocked *NONNULL_PTR obj);
+
+/**
+ * Read a SpliceLocked from a byte array, created by SpliceLocked_write
+ */
+struct LDKCResult_SpliceLockedDecodeErrorZ SpliceLocked_read(struct LDKu8slice ser);
+
 /**
  * Serialize the TxAddInput object into a byte array which can be read by TxAddInput_read
  */
@@ -33315,6 +43180,16 @@ struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NO
  */
 struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
 
+/**
+ * Serialize the OnionPacket object into a byte array which can be read by OnionPacket_read
+ */
+struct LDKCVec_u8Z OnionPacket_write(const struct LDKOnionPacket *NONNULL_PTR obj);
+
+/**
+ * Read a OnionPacket from a byte array, created by OnionPacket_write
+ */
+struct LDKCResult_OnionPacketDecodeErrorZ OnionPacket_read(struct LDKu8slice ser);
+
 /**
  * Serialize the UpdateAddHTLC object into a byte array which can be read by UpdateAddHTLC_read
  */
@@ -33335,6 +43210,16 @@ struct LDKCResult_OnionMessageDecodeErrorZ OnionMessage_read(struct LDKu8slice s
  */
 struct LDKCVec_u8Z OnionMessage_write(const struct LDKOnionMessage *NONNULL_PTR obj);
 
+/**
+ * Serialize the FinalOnionHopData object into a byte array which can be read by FinalOnionHopData_read
+ */
+struct LDKCVec_u8Z FinalOnionHopData_write(const struct LDKFinalOnionHopData *NONNULL_PTR obj);
+
+/**
+ * Read a FinalOnionHopData from a byte array, created by FinalOnionHopData_write
+ */
+struct LDKCResult_FinalOnionHopDataDecodeErrorZ FinalOnionHopData_read(struct LDKu8slice ser);
+
 /**
  * Serialize the Ping object into a byte array which can be read by Ping_read
  */
@@ -33507,6 +43392,12 @@ void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
  */
 MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
 
+/**
+ * Constructs a new EventsProvider which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned EventsProvider must be freed before this_arg is
+ */
+struct LDKEventsProvider IgnoringMessageHandler_as_EventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+
 /**
  * Constructs a new MessageSendEventsProvider which calls the relevant methods on this_arg.
  * This copies the `inner` pointer in this_arg and thus the returned MessageSendEventsProvider must be freed before this_arg is
@@ -33519,12 +43410,6 @@ struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsP
  */
 struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
 
-/**
- * Constructs a new OnionMessageProvider which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned OnionMessageProvider must be freed before this_arg is
- */
-struct LDKOnionMessageProvider IgnoringMessageHandler_as_OnionMessageProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
-
 /**
  * Constructs a new OnionMessageHandler which calls the relevant methods on this_arg.
  * This copies the `inner` pointer in this_arg and thus the returned OnionMessageHandler must be freed before this_arg is
@@ -33618,7 +43503,7 @@ void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this
  * A message handler which handles onion messages. This should generally be an
  * [`OnionMessenger`], but can also be an [`IgnoringMessageHandler`].
  *
- * [`OnionMessenger`]: crate::onion_message::OnionMessenger
+ * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
  */
 const struct LDKOnionMessageHandler *MessageHandler_get_onion_message_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
 
@@ -33626,7 +43511,7 @@ const struct LDKOnionMessageHandler *MessageHandler_get_onion_message_handler(co
  * A message handler which handles onion messages. This should generally be an
  * [`OnionMessenger`], but can also be an [`IgnoringMessageHandler`].
  *
- * [`OnionMessenger`]: crate::onion_message::OnionMessenger
+ * [`OnionMessenger`]: crate::onion_message::messenger::OnionMessenger
  */
 void MessageHandler_set_onion_message_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKOnionMessageHandler val);
 
@@ -33657,6 +43542,74 @@ struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescript
  */
 void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
 
+/**
+ * Frees any resources used by the PeerDetails, if is_owned is set and inner is non-NULL.
+ */
+void PeerDetails_free(struct LDKPeerDetails this_obj);
+
+/**
+ * The node id of the peer.
+ *
+ * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter
+ * passed in to [`PeerManager::new_outbound_connection`].
+ */
+struct LDKPublicKey PeerDetails_get_counterparty_node_id(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+
+/**
+ * The node id of the peer.
+ *
+ * For outbound connections, this [`PublicKey`] will be the same as the `their_node_id` parameter
+ * passed in to [`PeerManager::new_outbound_connection`].
+ */
+void PeerDetails_set_counterparty_node_id(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The socket address the peer provided in the initial handshake.
+ *
+ * Will only be `Some` if an address had been previously provided to
+ * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`].
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCOption_SocketAddressZ PeerDetails_get_socket_address(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+
+/**
+ * The socket address the peer provided in the initial handshake.
+ *
+ * Will only be `Some` if an address had been previously provided to
+ * [`PeerManager::new_outbound_connection`] or [`PeerManager::new_inbound_connection`].
+ */
+void PeerDetails_set_socket_address(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKCOption_SocketAddressZ val);
+
+/**
+ * The features the peer provided in the initial handshake.
+ */
+struct LDKInitFeatures PeerDetails_get_init_features(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+
+/**
+ * The features the peer provided in the initial handshake.
+ */
+void PeerDetails_set_init_features(struct LDKPeerDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
+
+/**
+ * Indicates the direction of the peer connection.
+ *
+ * Will be `true` for inbound connections, and `false` for outbound connections.
+ */
+bool PeerDetails_get_is_inbound_connection(const struct LDKPeerDetails *NONNULL_PTR this_ptr);
+
+/**
+ * Indicates the direction of the peer connection.
+ *
+ * Will be `true` for inbound connections, and `false` for outbound connections.
+ */
+void PeerDetails_set_is_inbound_connection(struct LDKPeerDetails *NONNULL_PTR this_ptr, bool val);
+
+/**
+ * Constructs a new PeerDetails given each field
+ */
+MUST_USE_RES struct LDKPeerDetails PeerDetails_new(struct LDKPublicKey counterparty_node_id_arg, struct LDKCOption_SocketAddressZ socket_address_arg, struct LDKInitFeatures init_features_arg, bool is_inbound_connection_arg);
+
 /**
  * Frees any resources used by the PeerHandleError, if is_owned is set and inner is non-NULL.
  */
@@ -33691,18 +43644,19 @@ void PeerManager_free(struct LDKPeerManager this_obj);
 MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, uint32_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKNodeSigner node_signer);
 
 /**
- * Get a list of tuples mapping from node id to network addresses for peers which have
- * completed the initial handshake.
+ * Returns a list of [`PeerDetails`] for connected peers that have completed the initial
+ * handshake.
+ */
+MUST_USE_RES struct LDKCVec_PeerDetailsZ PeerManager_list_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
+
+/**
+ * Returns the [`PeerDetails`] of a connected peer that has completed the initial handshake.
  *
- * For outbound connections, the [`PublicKey`] will be the same as the `their_node_id` parameter
- * passed in to [`Self::new_outbound_connection`], however entries will only appear once the initial
- * handshake has completed and we are sure the remote peer has the private key for the given
- * [`PublicKey`].
+ * Will return `None` if the peer is unknown or it hasn't completed the initial handshake.
  *
- * The returned `Option`s will only be `Some` if an address had been previously given via
- * [`Self::new_outbound_connection`] or [`Self::new_inbound_connection`].
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKCVec_C2Tuple_PublicKeyCOption_NetAddressZZZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKPeerDetails PeerManager_peer_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id);
 
 /**
  * Indicates a new outbound connection has been established to a node with the given `node_id`
@@ -33721,7 +43675,7 @@ MUST_USE_RES struct LDKCVec_C2Tuple_PublicKeyCOption_NetAddressZZZ PeerManager_g
  *
  * [`socket_disconnected`]: PeerManager::socket_disconnected
  */
-MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor, struct LDKCOption_NetAddressZ remote_network_address);
+MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address);
 
 /**
  * Indicates a new inbound connection has been established to a node with an optional remote
@@ -33740,7 +43694,7 @@ MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound
  *
  * [`socket_disconnected`]: PeerManager::socket_disconnected
  */
-MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor, struct LDKCOption_NetAddressZ remote_network_address);
+MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor, struct LDKCOption_SocketAddressZ remote_network_address);
 
 /**
  * Indicates that there is room to write data to the given socket descriptor.
@@ -33854,7 +43808,7 @@ void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR th
  *
  * [`get_and_clear_pending_msg_events`]: MessageSendEventsProvider::get_and_clear_pending_msg_events
  */
-void PeerManager_broadcast_node_announcement(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
+void PeerManager_broadcast_node_announcement(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_SocketAddressZ addresses);
 
 /**
  * Gets the weight for an HTLC-Success transaction.
@@ -33968,13 +43922,6 @@ struct LDKCResult_CounterpartyCommitmentSecretsDecodeErrorZ CounterpartyCommitme
  */
 struct LDKSecretKey derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
 
-/**
- * Derives a per-commitment-transaction public key (eg an htlc key or a delayed_payment key)
- * from the base point and the per_commitment_key. This is the public equivalent of
- * derive_private_key - using only public keys to derive a public key instead of private keys.
- */
-struct LDKPublicKey derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
-
 /**
  * Derives a per-commitment-transaction revocation key from its constituent parts.
  *
@@ -33985,21 +43932,6 @@ struct LDKPublicKey derive_public_key(struct LDKPublicKey per_commitment_point,
  */
 struct LDKSecretKey derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
 
-/**
- * Derives a per-commitment-transaction revocation public key from its constituent parts. This is
- * the public equivalend of derive_private_revocation_key - using only public keys to derive a
- * public key instead of private keys.
- *
- * Only the cheating participant owns a valid witness to propagate a revoked
- * commitment transaction, thus per_commitment_point always come from cheater
- * and revocation_base_point always come from punisher, which is the broadcaster
- * of the transaction spending with this key knowledge.
- *
- * Note that this is infallible iff we trust that at least one of the two input keys are randomly
- * generated (ie our own).
- */
-struct LDKPublicKey derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
-
 /**
  * Frees any resources used by the TxCreationKeys, if is_owned is set and inner is non-NULL.
  */
@@ -34020,49 +43952,49 @@ void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_P
  * transaction to provide their counterparty the ability to punish them if they broadcast
  * an old state.
  */
-struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
+struct LDKRevocationKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
 
 /**
  * The revocation key which is used to allow the broadcaster of the commitment
  * transaction to provide their counterparty the ability to punish them if they broadcast
  * an old state.
  */
-void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKRevocationKey val);
 
 /**
  * Broadcaster's HTLC Key
  */
-struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
+struct LDKHtlcKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
 
 /**
  * Broadcaster's HTLC Key
  */
-void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKHtlcKey val);
 
 /**
  * Countersignatory's HTLC Key
  */
-struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
+struct LDKHtlcKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
 
 /**
  * Countersignatory's HTLC Key
  */
-void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKHtlcKey val);
 
 /**
  * Broadcaster's Payment Key (which isn't allowed to be spent from for some delay)
  */
-struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
+struct LDKDelayedPaymentKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
 
 /**
  * Broadcaster's Payment Key (which isn't allowed to be spent from for some delay)
  */
-void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKDelayedPaymentKey val);
 
 /**
  * Constructs a new TxCreationKeys given each field
  */
-MUST_USE_RES struct LDKTxCreationKeys TxCreationKeys_new(struct LDKPublicKey per_commitment_point_arg, struct LDKPublicKey revocation_key_arg, struct LDKPublicKey broadcaster_htlc_key_arg, struct LDKPublicKey countersignatory_htlc_key_arg, struct LDKPublicKey broadcaster_delayed_payment_key_arg);
+MUST_USE_RES struct LDKTxCreationKeys TxCreationKeys_new(struct LDKPublicKey per_commitment_point_arg, struct LDKRevocationKey revocation_key_arg, struct LDKHtlcKey broadcaster_htlc_key_arg, struct LDKHtlcKey countersignatory_htlc_key_arg, struct LDKDelayedPaymentKey broadcaster_delayed_payment_key_arg);
 
 /**
  * Checks if two TxCreationKeyss contain equal inner contents.
@@ -34109,7 +44041,7 @@ void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_P
  * counterparty to create a secret which the counterparty can reveal to revoke previous
  * states.
  */
-struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
+struct LDKRevocationBasepoint ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
 
 /**
  * The base point which is used (with derive_public_revocation_key) to derive per-commitment
@@ -34117,7 +44049,7 @@ struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKC
  * counterparty to create a secret which the counterparty can reveal to revoke previous
  * states.
  */
-void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKRevocationBasepoint val);
 
 /**
  * The public key on which the non-broadcaster (ie the countersignatory) receives an immediately
@@ -34138,37 +44070,42 @@ void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PT
  * public key which receives non-HTLC-encumbered funds which are only available for spending
  * after some delay (or can be claimed via the revocation path).
  */
-struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
+struct LDKDelayedPaymentBasepoint ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
 
 /**
  * The base point which is used (with derive_public_key) to derive a per-commitment payment
  * public key which receives non-HTLC-encumbered funds which are only available for spending
  * after some delay (or can be claimed via the revocation path).
  */
-void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKDelayedPaymentBasepoint val);
 
 /**
  * The base point which is used (with derive_public_key) to derive a per-commitment public key
  * which is used to encumber HTLC-in-flight outputs.
  */
-struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
+struct LDKHtlcBasepoint ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
 
 /**
  * The base point which is used (with derive_public_key) to derive a per-commitment public key
  * which is used to encumber HTLC-in-flight outputs.
  */
-void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKHtlcBasepoint val);
 
 /**
  * Constructs a new ChannelPublicKeys given each field
  */
-MUST_USE_RES struct LDKChannelPublicKeys ChannelPublicKeys_new(struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg);
+MUST_USE_RES struct LDKChannelPublicKeys ChannelPublicKeys_new(struct LDKPublicKey funding_pubkey_arg, struct LDKRevocationBasepoint revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKDelayedPaymentBasepoint delayed_payment_basepoint_arg, struct LDKHtlcBasepoint htlc_basepoint_arg);
 
 /**
  * Creates a copy of the ChannelPublicKeys
  */
 struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelPublicKeys.
+ */
+uint64_t ChannelPublicKeys_hash(const struct LDKChannelPublicKeys *NONNULL_PTR o);
+
 /**
  * Checks if two ChannelPublicKeyss contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -34190,7 +44127,7 @@ struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LD
  * Create per-state keys from channel base points and the per-commitment point.
  * Key set is asymmetric and can't be used as part of counter-signatory set of transactions.
  */
-MUST_USE_RES struct LDKTxCreationKeys TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
+MUST_USE_RES struct LDKTxCreationKeys TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, const struct LDKDelayedPaymentBasepoint *NONNULL_PTR broadcaster_delayed_payment_base, const struct LDKHtlcBasepoint *NONNULL_PTR broadcaster_htlc_base, const struct LDKRevocationBasepoint *NONNULL_PTR countersignatory_revocation_base, const struct LDKHtlcBasepoint *NONNULL_PTR countersignatory_htlc_base);
 
 /**
  * Generate per-state keys from channel static keys.
@@ -34203,7 +44140,13 @@ MUST_USE_RES struct LDKTxCreationKeys TxCreationKeys_from_channel_static_keys(st
  * key or the broadcaster_delayed_payment_key and satisfying the relative-locktime OP_CSV constrain.
  * Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions.
  */
-struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
+struct LDKCVec_u8Z get_revokeable_redeemscript(const struct LDKRevocationKey *NONNULL_PTR revocation_key, uint16_t contest_delay, const struct LDKDelayedPaymentKey *NONNULL_PTR broadcaster_delayed_payment_key);
+
+/**
+ * Returns the script for the counterparty's output on a holder's commitment transaction based on
+ * the channel type.
+ */
+struct LDKCVec_u8Z get_counterparty_payment_script(const struct LDKChannelTypeFeatures *NONNULL_PTR channel_type_features, struct LDKPublicKey payment_key);
 
 /**
  * Frees any resources used by the HTLCOutputInCommitment, if is_owned is set and inner is non-NULL.
@@ -34320,12 +44263,12 @@ struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, st
  * Panics if htlc.transaction_output_index.is_none() (as such HTLCs do not appear in the
  * commitment transaction).
  */
-struct LDKTransaction build_htlc_transaction(const uint8_t (*commitment_txid)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKChannelTypeFeatures *NONNULL_PTR channel_type_features, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
+struct LDKTransaction build_htlc_transaction(const uint8_t (*commitment_txid)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKChannelTypeFeatures *NONNULL_PTR channel_type_features, const struct LDKDelayedPaymentKey *NONNULL_PTR broadcaster_delayed_payment_key, const struct LDKRevocationKey *NONNULL_PTR revocation_key);
 
 /**
  * Returns the witness required to satisfy and spend a HTLC input.
  */
-struct LDKWitness build_htlc_input_witness(struct LDKSignature local_sig, struct LDKSignature remote_sig, struct LDKCOption_PaymentPreimageZ preimage, struct LDKu8slice redeem_script, const struct LDKChannelTypeFeatures *NONNULL_PTR channel_type_features);
+struct LDKWitness build_htlc_input_witness(struct LDKECDSASignature local_sig, struct LDKECDSASignature remote_sig, struct LDKCOption_ThirtyTwoBytesZ preimage, struct LDKu8slice redeem_script, const struct LDKChannelTypeFeatures *NONNULL_PTR channel_type_features);
 
 /**
  * Gets the witnessScript for the to_remote output when anchors are enabled.
@@ -34345,7 +44288,7 @@ struct LDKCVec_u8Z get_anchor_redeemscript(struct LDKPublicKey funding_pubkey);
 /**
  * Returns the witness required to satisfy and spend an anchor input.
  */
-struct LDKWitness build_anchor_input_witness(struct LDKPublicKey funding_key, struct LDKSignature funding_sig);
+struct LDKWitness build_anchor_input_witness(struct LDKPublicKey funding_key, struct LDKECDSASignature funding_sig);
 
 /**
  * Frees any resources used by the ChannelTransactionParameters, if is_owned is set and inner is non-NULL.
@@ -34428,6 +44371,9 @@ void ChannelTransactionParameters_set_channel_type_features(struct LDKChannelTra
 
 /**
  * Constructs a new ChannelTransactionParameters given each field
+ *
+ * Note that counterparty_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Note that funding_outpoint_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
 MUST_USE_RES struct LDKChannelTransactionParameters ChannelTransactionParameters_new(struct LDKChannelPublicKeys holder_pubkeys_arg, uint16_t holder_selected_contest_delay_arg, bool is_outbound_from_holder_arg, struct LDKCounterpartyChannelTransactionParameters counterparty_parameters_arg, struct LDKOutPoint funding_outpoint_arg, struct LDKChannelTypeFeatures channel_type_features_arg);
 
@@ -34436,6 +44382,11 @@ MUST_USE_RES struct LDKChannelTransactionParameters ChannelTransactionParameters
  */
 struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelTransactionParameters.
+ */
+uint64_t ChannelTransactionParameters_hash(const struct LDKChannelTransactionParameters *NONNULL_PTR o);
+
 /**
  * Checks if two ChannelTransactionParameterss contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -34478,6 +44429,11 @@ MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChan
  */
 struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the CounterpartyChannelTransactionParameters.
+ */
+uint64_t CounterpartyChannelTransactionParameters_hash(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR o);
+
 /**
  * Checks if two CounterpartyChannelTransactionParameterss contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -34573,24 +44529,24 @@ void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this
 /**
  * Our counterparty's signature for the transaction
  */
-struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
+struct LDKECDSASignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
 
 /**
  * Our counterparty's signature for the transaction
  */
-void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
+void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
  * All non-dust counterparty HTLC signatures, in the order they appear in the transaction
  *
  * Returns a copy of the field.
  */
-struct LDKCVec_SignatureZ HolderCommitmentTransaction_get_counterparty_htlc_sigs(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
+struct LDKCVec_ECDSASignatureZ HolderCommitmentTransaction_get_counterparty_htlc_sigs(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
 
 /**
  * All non-dust counterparty HTLC signatures, in the order they appear in the transaction
  */
-void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
+void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_ECDSASignatureZ val);
 
 /**
  * Creates a copy of the HolderCommitmentTransaction
@@ -34611,7 +44567,7 @@ struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransa
  * Create a new holder transaction with the given counterparty signatures.
  * The funding keys are used to figure out which signature should go first when building the transaction for broadcast.
  */
-MUST_USE_RES struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_new(struct LDKCommitmentTransaction commitment_tx, struct LDKSignature counterparty_sig, struct LDKCVec_SignatureZ counterparty_htlc_sigs, struct LDKPublicKey holder_funding_key, struct LDKPublicKey counterparty_funding_key);
+MUST_USE_RES struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_new(struct LDKCommitmentTransaction commitment_tx, struct LDKECDSASignature counterparty_sig, struct LDKCVec_ECDSASignatureZ counterparty_htlc_sigs, struct LDKPublicKey holder_funding_key, struct LDKPublicKey counterparty_funding_key);
 
 /**
  * Frees any resources used by the BuiltCommitmentTransaction, if is_owned is set and inner is non-NULL.
@@ -34674,12 +44630,12 @@ MUST_USE_RES struct LDKThirtyTwoBytes BuiltCommitmentTransaction_get_sighash_all
 /**
  * Signs the counterparty's commitment transaction.
  */
-MUST_USE_RES struct LDKSignature BuiltCommitmentTransaction_sign_counterparty_commitment(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
+MUST_USE_RES struct LDKECDSASignature BuiltCommitmentTransaction_sign_counterparty_commitment(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
 
 /**
  * Signs the holder commitment transaction because we are about to broadcast it.
  */
-MUST_USE_RES struct LDKSignature BuiltCommitmentTransaction_sign_holder_commitment(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+MUST_USE_RES struct LDKECDSASignature BuiltCommitmentTransaction_sign_holder_commitment(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis, const struct LDKEntropySource *NONNULL_PTR entropy_source);
 
 /**
  * Frees any resources used by the ClosingTransaction, if is_owned is set and inner is non-NULL.
@@ -34769,7 +44725,7 @@ MUST_USE_RES struct LDKThirtyTwoBytes TrustedClosingTransaction_get_sighash_all(
  * Sign a transaction, either because we are counter-signing the counterparty's transaction or
  * because we are about to broadcast a holder transaction.
  */
-MUST_USE_RES struct LDKSignature TrustedClosingTransaction_sign(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
+MUST_USE_RES struct LDKECDSASignature TrustedClosingTransaction_sign(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
 
 /**
  * Frees any resources used by the CommitmentTransaction, if is_owned is set and inner is non-NULL.
@@ -34796,6 +44752,11 @@ struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(s
  */
 MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
 
+/**
+ * The per commitment point used by the broadcaster.
+ */
+MUST_USE_RES struct LDKPublicKey CommitmentTransaction_per_commitment_point(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
+
 /**
  * The value to be sent to the broadcaster
  */
@@ -34864,7 +44825,35 @@ MUST_USE_RES struct LDKChannelTypeFeatures TrustedCommitmentTransaction_channel_
  *
  * This function is only valid in the holder commitment context, it always uses EcdsaSighashType::All.
  */
-MUST_USE_RES struct LDKCResult_CVec_SignatureZNoneZ TrustedCommitmentTransaction_get_htlc_sigs(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*htlc_base_key)[32], const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR channel_parameters, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+MUST_USE_RES struct LDKCResult_CVec_ECDSASignatureZNoneZ TrustedCommitmentTransaction_get_htlc_sigs(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*htlc_base_key)[32], const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR channel_parameters, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+
+/**
+ * Returns the index of the revokeable output, i.e. the `to_local` output sending funds to
+ * the broadcaster, in the built transaction, if any exists.
+ *
+ * There are two cases where this may return `None`:
+ * - The balance of the revokeable output is below the dust limit (only found on commitments
+ * early in the channel's lifetime, i.e. before the channel reserve is met).
+ * - This commitment was created before LDK 0.0.117. In this case, the
+ * commitment transaction previously didn't contain enough information to locate the
+ * revokeable output.
+ */
+MUST_USE_RES struct LDKCOption_usizeZ TrustedCommitmentTransaction_revokeable_output_index(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
+
+/**
+ * Helper method to build an unsigned justice transaction spending the revokeable
+ * `to_local` output to a destination script. Fee estimation accounts for the expected
+ * revocation witness data that will be added when signed.
+ *
+ * This method will error if the given fee rate results in a fee greater than the value
+ * of the output being spent, or if there exists no revokeable `to_local` output on this
+ * commitment transaction. See [`Self::revokeable_output_index`] for more details.
+ *
+ * The built transaction will allow fee bumping with RBF, and this method takes
+ * `feerate_per_kw` as an input such that multiple copies of a justice transaction at different
+ * fee rates may be built.
+ */
+MUST_USE_RES struct LDKCResult_TransactionNoneZ TrustedCommitmentTransaction_build_to_local_justice_tx(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg, uint64_t feerate_per_kw, struct LDKCVec_u8Z destination_script);
 
 /**
  * Commitment transaction numbers which appear in the transactions themselves are XOR'd with a
@@ -34984,6 +44973,51 @@ struct LDKBlindedHopFeatures BlindedHopFeatures_clone(const struct LDKBlindedHop
  */
 struct LDKChannelTypeFeatures ChannelTypeFeatures_clone(const struct LDKChannelTypeFeatures *NONNULL_PTR orig);
 
+/**
+ * Generates a non-cryptographic 64-bit hash of the InitFeatures.
+ */
+uint64_t InitFeatures_hash(const struct LDKInitFeatures *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the NodeFeatures.
+ */
+uint64_t NodeFeatures_hash(const struct LDKNodeFeatures *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelFeatures.
+ */
+uint64_t ChannelFeatures_hash(const struct LDKChannelFeatures *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Bolt11InvoiceFeatures.
+ */
+uint64_t Bolt11InvoiceFeatures_hash(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the OfferFeatures.
+ */
+uint64_t OfferFeatures_hash(const struct LDKOfferFeatures *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the InvoiceRequestFeatures.
+ */
+uint64_t InvoiceRequestFeatures_hash(const struct LDKInvoiceRequestFeatures *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Bolt12InvoiceFeatures.
+ */
+uint64_t Bolt12InvoiceFeatures_hash(const struct LDKBolt12InvoiceFeatures *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the BlindedHopFeatures.
+ */
+uint64_t BlindedHopFeatures_hash(const struct LDKBlindedHopFeatures *NONNULL_PTR o);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelTypeFeatures.
+ */
+uint64_t ChannelTypeFeatures_hash(const struct LDKChannelTypeFeatures *NONNULL_PTR o);
+
 /**
  * Frees any resources used by the InitFeatures, if is_owned is set and inner is non-NULL.
  */
@@ -35045,6 +45079,28 @@ MUST_USE_RES bool InitFeatures_requires_unknown_bits_from(const struct LDKInitFe
  */
 MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ InitFeatures_set_required_feature_bit(struct LDKInitFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ InitFeatures_set_optional_feature_bit(struct LDKInitFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35083,6 +45139,28 @@ MUST_USE_RES bool NodeFeatures_requires_unknown_bits_from(const struct LDKNodeFe
  */
 MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ NodeFeatures_set_required_feature_bit(struct LDKNodeFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ NodeFeatures_set_optional_feature_bit(struct LDKNodeFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35121,6 +45199,28 @@ MUST_USE_RES bool ChannelFeatures_requires_unknown_bits_from(const struct LDKCha
  */
 MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelFeatures_set_required_feature_bit(struct LDKChannelFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelFeatures_set_optional_feature_bit(struct LDKChannelFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35159,6 +45259,28 @@ MUST_USE_RES bool Bolt11InvoiceFeatures_requires_unknown_bits_from(const struct
  */
 MUST_USE_RES bool Bolt11InvoiceFeatures_requires_unknown_bits(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ Bolt11InvoiceFeatures_set_required_feature_bit(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ Bolt11InvoiceFeatures_set_optional_feature_bit(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35197,6 +45319,28 @@ MUST_USE_RES bool OfferFeatures_requires_unknown_bits_from(const struct LDKOffer
  */
 MUST_USE_RES bool OfferFeatures_requires_unknown_bits(const struct LDKOfferFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ OfferFeatures_set_required_feature_bit(struct LDKOfferFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ OfferFeatures_set_optional_feature_bit(struct LDKOfferFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35235,6 +45379,28 @@ MUST_USE_RES bool InvoiceRequestFeatures_requires_unknown_bits_from(const struct
  */
 MUST_USE_RES bool InvoiceRequestFeatures_requires_unknown_bits(const struct LDKInvoiceRequestFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ InvoiceRequestFeatures_set_required_feature_bit(struct LDKInvoiceRequestFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ InvoiceRequestFeatures_set_optional_feature_bit(struct LDKInvoiceRequestFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35273,6 +45439,28 @@ MUST_USE_RES bool Bolt12InvoiceFeatures_requires_unknown_bits_from(const struct
  */
 MUST_USE_RES bool Bolt12InvoiceFeatures_requires_unknown_bits(const struct LDKBolt12InvoiceFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ Bolt12InvoiceFeatures_set_required_feature_bit(struct LDKBolt12InvoiceFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ Bolt12InvoiceFeatures_set_optional_feature_bit(struct LDKBolt12InvoiceFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35311,6 +45499,28 @@ MUST_USE_RES bool BlindedHopFeatures_requires_unknown_bits_from(const struct LDK
  */
 MUST_USE_RES bool BlindedHopFeatures_requires_unknown_bits(const struct LDKBlindedHopFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ BlindedHopFeatures_set_required_feature_bit(struct LDKBlindedHopFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ BlindedHopFeatures_set_optional_feature_bit(struct LDKBlindedHopFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35349,6 +45559,28 @@ MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits_from(const struct LD
  */
 MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Sets a required feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
+ * be set instead (i.e., `bit - 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelTypeFeatures_set_required_feature_bit(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
+/**
+ * Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
+ * by [BOLT 9].
+ *
+ * Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
+ * set instead (i.e., `bit + 1`).
+ *
+ * [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
+ */
+MUST_USE_RES struct LDKCResult_NoneNoneZ ChannelTypeFeatures_set_optional_feature_bit(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg, uintptr_t bit);
+
 /**
  * Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
  * by [bLIP 2] or if it is a known `T` feature.
@@ -35996,6 +46228,46 @@ MUST_USE_RES bool NodeFeatures_requires_anchors_zero_fee_htlc_tx(const struct LD
  */
 MUST_USE_RES bool ChannelTypeFeatures_requires_anchors_zero_fee_htlc_tx(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_route_blinding_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_route_blinding_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_route_blinding(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_route_blinding_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_route_blinding_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_route_blinding(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_route_blinding(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_route_blinding(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
 /**
  * Set this feature as optional.
  */
@@ -36036,6 +46308,66 @@ MUST_USE_RES bool InitFeatures_requires_shutdown_anysegwit(const struct LDKInitF
  */
 MUST_USE_RES bool NodeFeatures_requires_shutdown_anysegwit(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_taproot_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_taproot_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_taproot(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_taproot_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_taproot_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_taproot(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void ChannelTypeFeatures_set_taproot_optional(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void ChannelTypeFeatures_set_taproot_required(struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_supports_taproot(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_taproot(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_taproot(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool ChannelTypeFeatures_requires_taproot(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
+
 /**
  * Set this feature as optional.
  */
@@ -36276,6 +46608,66 @@ MUST_USE_RES bool NodeFeatures_supports_keysend(const struct LDKNodeFeatures *NO
  */
 MUST_USE_RES bool NodeFeatures_requires_keysend(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
 
+/**
+ * Set this feature as optional.
+ */
+void InitFeatures_set_trampoline_routing_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_trampoline_routing_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_trampoline_routing_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_trampoline_routing_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void Bolt11InvoiceFeatures_set_trampoline_routing_optional(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void Bolt11InvoiceFeatures_set_trampoline_routing_required(struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool Bolt11InvoiceFeatures_supports_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_trampoline_routing(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_trampoline_routing(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool Bolt11InvoiceFeatures_requires_trampoline_routing(const struct LDKBolt11InvoiceFeatures *NONNULL_PTR this_arg);
+
 /**
  * Frees any resources used by the ShutdownScript, if is_owned is set and inner is non-NULL.
  */
@@ -36303,7 +46695,7 @@ void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
  *
  * [BOLT #2]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md
  */
-struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
 
 /**
  * The script that did not meet the requirements from [BOLT #2].
@@ -36352,10 +46744,10 @@ MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*s
  *
  * This function may return an error if `program` is invalid for the segwit `version`.
  */
-MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(struct LDKWitnessVersion version, struct LDKu8slice program);
+MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(struct LDKWitnessProgram witness_program);
 
 /**
- * Converts the shutdown script into the underlying [`Script`].
+ * Converts the shutdown script into the underlying [`ScriptBuf`].
  */
 MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
 
@@ -36373,6 +46765,91 @@ MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LD
  */
 MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
 
+/**
+ * Frees any resources used by the ChannelId, if is_owned is set and inner is non-NULL.
+ */
+void ChannelId_free(struct LDKChannelId this_obj);
+
+const uint8_t (*ChannelId_get_a(const struct LDKChannelId *NONNULL_PTR this_ptr))[32];
+
+void ChannelId_set_a(struct LDKChannelId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Constructs a new ChannelId given each field
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_new(struct LDKThirtyTwoBytes a_arg);
+
+/**
+ * Creates a copy of the ChannelId
+ */
+struct LDKChannelId ChannelId_clone(const struct LDKChannelId *NONNULL_PTR orig);
+
+/**
+ * Checks if two ChannelIds contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool ChannelId_eq(const struct LDKChannelId *NONNULL_PTR a, const struct LDKChannelId *NONNULL_PTR b);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the ChannelId.
+ */
+uint64_t ChannelId_hash(const struct LDKChannelId *NONNULL_PTR o);
+
+/**
+ * Create _v1_ channel ID based on a funding TX ID and output index
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_txid(const uint8_t (*txid)[32], uint16_t output_index);
+
+/**
+ * Create _v1_ channel ID from a funding tx outpoint
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_v1_from_funding_outpoint(struct LDKOutPoint outpoint);
+
+/**
+ * Create a _temporary_ channel ID randomly, based on an entropy source.
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_temporary_from_entropy_source(const struct LDKEntropySource *NONNULL_PTR entropy_source);
+
+/**
+ * Generic constructor; create a new channel ID from the provided data.
+ * Use a more specific `*_from_*` constructor when possible.
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_from_bytes(struct LDKThirtyTwoBytes data);
+
+/**
+ * Create a channel ID consisting of all-zeros data (e.g. when uninitialized or a placeholder).
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_new_zero(void);
+
+/**
+ * Check whether ID is consisting of all zeros (uninitialized)
+ */
+MUST_USE_RES bool ChannelId_is_zero(const struct LDKChannelId *NONNULL_PTR this_arg);
+
+/**
+ * Create _v2_ channel ID by concatenating the holder revocation basepoint with the counterparty
+ * revocation basepoint and hashing the result. The basepoints will be concatenated in increasing
+ * sorted order.
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_v2_from_revocation_basepoints(const struct LDKRevocationBasepoint *NONNULL_PTR ours, const struct LDKRevocationBasepoint *NONNULL_PTR theirs);
+
+/**
+ * Create temporary _v2_ channel ID by concatenating a zeroed out basepoint with the holder
+ * revocation basepoint and hashing the result.
+ */
+MUST_USE_RES struct LDKChannelId ChannelId_temporary_v2_from_revocation_basepoint(const struct LDKRevocationBasepoint *NONNULL_PTR our_revocation_basepoint);
+
+/**
+ * Serialize the ChannelId object into a byte array which can be read by ChannelId_read
+ */
+struct LDKCVec_u8Z ChannelId_write(const struct LDKChannelId *NONNULL_PTR obj);
+
+/**
+ * Read a ChannelId from a byte array, created by ChannelId_write
+ */
+struct LDKCResult_ChannelIdDecodeErrorZ ChannelId_read(struct LDKu8slice ser);
+
 /**
  * Frees any resources used by the Retry
  */
@@ -36386,7 +46863,7 @@ struct LDKRetry Retry_clone(const struct LDKRetry *NONNULL_PTR orig);
 /**
  * Utility method to constructs a new Attempts-variant Retry
  */
-struct LDKRetry Retry_attempts(uintptr_t a);
+struct LDKRetry Retry_attempts(uint32_t a);
 
 /**
  * Utility method to constructs a new Timeout-variant Retry
@@ -36404,6 +46881,16 @@ bool Retry_eq(const struct LDKRetry *NONNULL_PTR a, const struct LDKRetry *NONNU
  */
 uint64_t Retry_hash(const struct LDKRetry *NONNULL_PTR o);
 
+/**
+ * Serialize the Retry object into a byte array which can be read by Retry_read
+ */
+struct LDKCVec_u8Z Retry_write(const struct LDKRetry *NONNULL_PTR obj);
+
+/**
+ * Read a Retry from a byte array, created by Retry_write
+ */
+struct LDKCResult_RetryDecodeErrorZ Retry_read(struct LDKu8slice ser);
+
 /**
  * Creates a copy of the RetryableSendFailure
  */
@@ -36465,6 +46952,38 @@ struct LDKPaymentSendFailure PaymentSendFailure_duplicate_payment(void);
  */
 struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
 
+/**
+ * Checks if two PaymentSendFailures contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool PaymentSendFailure_eq(const struct LDKPaymentSendFailure *NONNULL_PTR a, const struct LDKPaymentSendFailure *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the ProbeSendFailure
+ */
+void ProbeSendFailure_free(struct LDKProbeSendFailure this_ptr);
+
+/**
+ * Creates a copy of the ProbeSendFailure
+ */
+struct LDKProbeSendFailure ProbeSendFailure_clone(const struct LDKProbeSendFailure *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new RouteNotFound-variant ProbeSendFailure
+ */
+struct LDKProbeSendFailure ProbeSendFailure_route_not_found(void);
+
+/**
+ * Utility method to constructs a new SendingFailed-variant ProbeSendFailure
+ */
+struct LDKProbeSendFailure ProbeSendFailure_sending_failed(struct LDKPaymentSendFailure a);
+
+/**
+ * Checks if two ProbeSendFailures contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool ProbeSendFailure_eq(const struct LDKProbeSendFailure *NONNULL_PTR a, const struct LDKProbeSendFailure *NONNULL_PTR b);
+
 /**
  * Frees any resources used by the RecipientOnionFields, if is_owned is set and inner is non-NULL.
  */
@@ -36483,7 +47002,7 @@ void RecipientOnionFields_free(struct LDKRecipientOnionFields this_obj);
  * want to provide a secret for a spontaneous payment if MPP is needed and you know your
  * recipient will not reject it.
  */
-struct LDKCOption_PaymentSecretZ RecipientOnionFields_get_payment_secret(const struct LDKRecipientOnionFields *NONNULL_PTR this_ptr);
+struct LDKCOption_ThirtyTwoBytesZ RecipientOnionFields_get_payment_secret(const struct LDKRecipientOnionFields *NONNULL_PTR this_ptr);
 
 /**
  * The [`PaymentSecret`] is an arbitrary 32 bytes provided by the recipient for us to repeat
@@ -36498,7 +47017,7 @@ struct LDKCOption_PaymentSecretZ RecipientOnionFields_get_payment_secret(const s
  * want to provide a secret for a spontaneous payment if MPP is needed and you know your
  * recipient will not reject it.
  */
-void RecipientOnionFields_set_payment_secret(struct LDKRecipientOnionFields *NONNULL_PTR this_ptr, struct LDKCOption_PaymentSecretZ val);
+void RecipientOnionFields_set_payment_secret(struct LDKRecipientOnionFields *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
 
 /**
  * The payment metadata serves a similar purpose as [`Self::payment_secret`] but is of
@@ -36534,11 +47053,6 @@ struct LDKCOption_CVec_u8ZZ RecipientOnionFields_get_payment_metadata(const stru
  */
 void RecipientOnionFields_set_payment_metadata(struct LDKRecipientOnionFields *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
 
-/**
- * Constructs a new RecipientOnionFields given each field
- */
-MUST_USE_RES struct LDKRecipientOnionFields RecipientOnionFields_new(struct LDKCOption_PaymentSecretZ payment_secret_arg, struct LDKCOption_CVec_u8ZZ payment_metadata_arg);
-
 /**
  * Creates a copy of the RecipientOnionFields
  */
@@ -36581,4190 +47095,7498 @@ MUST_USE_RES struct LDKRecipientOnionFields RecipientOnionFields_secret_only(str
 MUST_USE_RES struct LDKRecipientOnionFields RecipientOnionFields_spontaneous_empty(void);
 
 /**
- * Calls the free function if one is set
+ * Creates a new [`RecipientOnionFields`] from an existing one, adding custom TLVs. Each
+ * TLV is provided as a `(u64, Vec<u8>)` for the type number and serialized value
+ * respectively. TLV type numbers must be unique and within the range
+ * reserved for custom types, i.e. >= 2^16, otherwise this method will return `Err(())`.
+ *
+ * This method will also error for types in the experimental range which have been
+ * standardized within the protocol, which only includes 5482373484 (keysend) for now.
+ *
+ * See [`Self::custom_tlvs`] for more info.
  */
-void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
+MUST_USE_RES struct LDKCResult_RecipientOnionFieldsNoneZ RecipientOnionFields_with_custom_tlvs(struct LDKRecipientOnionFields this_arg, struct LDKCVec_C2Tuple_u64CVec_u8ZZZ custom_tlvs);
 
 /**
- * Calls the free function if one is set
+ * Gets the custom TLVs that will be sent or have been received.
+ *
+ * Custom TLVs allow sending extra application-specific data with a payment. They provide
+ * additional flexibility on top of payment metadata, as while other implementations may
+ * require `payment_metadata` to reflect metadata provided in an invoice, custom TLVs
+ * do not have this restriction.
+ *
+ * Note that if this field is non-empty, it will contain strictly increasing TLVs, each
+ * represented by a `(u64, Vec<u8>)` for its type number and serialized value respectively.
+ * This is validated when setting this field using [`Self::with_custom_tlvs`].
  */
-void Type_free(struct LDKType this_ptr);
+MUST_USE_RES struct LDKCVec_C2Tuple_u64CVec_u8ZZZ RecipientOnionFields_custom_tlvs(const struct LDKRecipientOnionFields *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the UnsignedBolt12Invoice, if is_owned is set and inner is non-NULL.
+ * Calls the free function if one is set
  */
-void UnsignedBolt12Invoice_free(struct LDKUnsignedBolt12Invoice this_obj);
+void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
 
 /**
- * The public key corresponding to the key needed to sign the invoice.
+ * Creates a copy of a Type
  */
-MUST_USE_RES struct LDKPublicKey UnsignedBolt12Invoice_signing_pubkey(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
+struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the Bolt12Invoice, if is_owned is set and inner is non-NULL.
+ * Calls the free function if one is set
  */
-void Bolt12Invoice_free(struct LDKBolt12Invoice this_obj);
+void Type_free(struct LDKType this_ptr);
 
 /**
- * Creates a copy of the Bolt12Invoice
+ * Frees any resources used by the OfferId, if is_owned is set and inner is non-NULL.
  */
-struct LDKBolt12Invoice Bolt12Invoice_clone(const struct LDKBolt12Invoice *NONNULL_PTR orig);
+void OfferId_free(struct LDKOfferId this_obj);
 
-/**
- * A complete description of the purpose of the originating offer or refund. Intended to be
- * displayed to the user but with the caveat that it has not been verified in any way.
- */
-MUST_USE_RES struct LDKPrintableString Bolt12Invoice_description(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+const uint8_t (*OfferId_get_a(const struct LDKOfferId *NONNULL_PTR this_ptr))[32];
+
+void OfferId_set_a(struct LDKOfferId *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * Duration since the Unix epoch when the invoice was created.
+ * Constructs a new OfferId given each field
  */
-MUST_USE_RES uint64_t Bolt12Invoice_created_at(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKOfferId OfferId_new(struct LDKThirtyTwoBytes a_arg);
 
 /**
- * Duration since [`Bolt12Invoice::created_at`] when the invoice has expired and therefore
- * should no longer be paid.
+ * Creates a copy of the OfferId
  */
-MUST_USE_RES uint64_t Bolt12Invoice_relative_expiry(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+struct LDKOfferId OfferId_clone(const struct LDKOfferId *NONNULL_PTR orig);
 
 /**
- * Whether the invoice has expired.
+ * Checks if two OfferIds contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-MUST_USE_RES bool Bolt12Invoice_is_expired(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+bool OfferId_eq(const struct LDKOfferId *NONNULL_PTR a, const struct LDKOfferId *NONNULL_PTR b);
 
 /**
- * SHA256 hash of the payment preimage that will be given in return for paying the invoice.
+ * Serialize the OfferId object into a byte array which can be read by OfferId_read
  */
-MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_payment_hash(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+struct LDKCVec_u8Z OfferId_write(const struct LDKOfferId *NONNULL_PTR obj);
 
 /**
- * The minimum amount required for a successful payment of the invoice.
+ * Read a OfferId from a byte array, created by OfferId_write
  */
-MUST_USE_RES uint64_t Bolt12Invoice_amount_msats(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+struct LDKCResult_OfferIdDecodeErrorZ OfferId_read(struct LDKu8slice ser);
 
 /**
- * Features pertaining to paying an invoice.
+ * Frees any resources used by the OfferWithExplicitMetadataBuilder, if is_owned is set and inner is non-NULL.
  */
-MUST_USE_RES struct LDKBolt12InvoiceFeatures Bolt12Invoice_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+void OfferWithExplicitMetadataBuilder_free(struct LDKOfferWithExplicitMetadataBuilder this_obj);
 
 /**
- * The public key corresponding to the key used to sign the invoice.
+ * Creates a copy of the OfferWithExplicitMetadataBuilder
  */
-MUST_USE_RES struct LDKPublicKey Bolt12Invoice_signing_pubkey(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_clone(const struct LDKOfferWithExplicitMetadataBuilder *NONNULL_PTR orig);
 
 /**
- * Hash that was used for signing the invoice.
+ * Frees any resources used by the OfferWithDerivedMetadataBuilder, if is_owned is set and inner is non-NULL.
  */
-MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_signable_hash(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
+void OfferWithDerivedMetadataBuilder_free(struct LDKOfferWithDerivedMetadataBuilder this_obj);
 
 /**
- * Verifies that the invoice was for a request or refund created using the given key.
+ * Creates a copy of the OfferWithDerivedMetadataBuilder
  */
-MUST_USE_RES bool Bolt12Invoice_verify(const struct LDKBolt12Invoice *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
+struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_clone(const struct LDKOfferWithDerivedMetadataBuilder *NONNULL_PTR orig);
 
 /**
- * Serialize the Bolt12Invoice object into a byte array which can be read by Bolt12Invoice_read
+ * Creates a new builder for an offer using the [`Offer::signing_pubkey`] for signing invoices.
+ * The associated secret key must be remembered while the offer is valid.
+ *
+ * Use a different pubkey per offer to avoid correlating offers.
+ *
+ * # Note
+ *
+ * If constructing an [`Offer`] for use with a [`ChannelManager`], use
+ * [`ChannelManager::create_offer_builder`] instead of [`OfferBuilder::new`].
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+ * [`ChannelManager::create_offer_builder`]: crate::ln::channelmanager::ChannelManager::create_offer_builder
  */
-struct LDKCVec_u8Z Bolt12Invoice_write(const struct LDKBolt12Invoice *NONNULL_PTR obj);
+MUST_USE_RES struct LDKOfferWithExplicitMetadataBuilder OfferWithExplicitMetadataBuilder_new(struct LDKPublicKey signing_pubkey);
 
 /**
- * Frees any resources used by the BlindedPayInfo, if is_owned is set and inner is non-NULL.
+ * Sets the [`Offer::metadata`] to the given bytes.
+ *
+ * Successive calls to this method will override the previous setting.
  */
-void BlindedPayInfo_free(struct LDKBlindedPayInfo this_obj);
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_metadata(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKCVec_u8Z metadata);
 
 /**
- * Base fee charged (in millisatoshi) for the entire blinded path.
+ * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called,
+ * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported.
+ *
+ * See [`Offer::chains`] on how this relates to the payment currency.
+ *
+ * Successive calls to this method will add another chain hash.
  */
-uint32_t BlindedPayInfo_get_fee_base_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_chain(struct LDKOfferWithExplicitMetadataBuilder this_arg, enum LDKNetwork network);
 
 /**
- * Base fee charged (in millisatoshi) for the entire blinded path.
+ * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-void BlindedPayInfo_set_fee_base_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint32_t val);
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_amount_msats(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t amount_msats);
 
 /**
- * Liquidity fee charged (in millionths of the amount transferred) for the entire blinded path
- * (i.e., 10,000 is 1%).
+ * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Offer::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-uint32_t BlindedPayInfo_get_fee_proportional_millionths(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_absolute_expiry(struct LDKOfferWithExplicitMetadataBuilder this_arg, uint64_t absolute_expiry);
 
 /**
- * Liquidity fee charged (in millionths of the amount transferred) for the entire blinded path
- * (i.e., 10,000 is 1%).
+ * Sets the [`Offer::description`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-void BlindedPayInfo_set_fee_proportional_millionths(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint32_t val);
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_description(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr description);
 
 /**
- * Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for the entire blinded
- * path.
+ * Sets the [`Offer::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-uint16_t BlindedPayInfo_get_cltv_expiry_delta(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_issuer(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKStr issuer);
 
 /**
- * Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for the entire blinded
- * path.
+ * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by
+ * private channels or if [`Offer::signing_pubkey`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
  */
-void BlindedPayInfo_set_cltv_expiry_delta(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint16_t val);
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_path(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKBlindedPath path);
 
 /**
- * The minimum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
- * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
- * seen by the recipient.
+ * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to
+ * [`Quantity::One`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-uint64_t BlindedPayInfo_get_htlc_minimum_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES void OfferWithExplicitMetadataBuilder_supported_quantity(struct LDKOfferWithExplicitMetadataBuilder this_arg, struct LDKQuantity quantity);
 
 /**
- * The minimum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
- * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
- * seen by the recipient.
+ * Builds an [`Offer`] from the builder's settings.
  */
-void BlindedPayInfo_set_htlc_minimum_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint64_t val);
+MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithExplicitMetadataBuilder_build(struct LDKOfferWithExplicitMetadataBuilder this_arg);
 
 /**
- * The maximum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
- * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
- * seen by the recipient.
+ * Similar to [`OfferBuilder::new`] except, if [`OfferBuilder::path`] is called, the signing
+ * pubkey is derived from the given [`ExpandedKey`] and [`EntropySource`]. This provides
+ * recipient privacy by using a different signing pubkey for each offer. Otherwise, the
+ * provided `node_id` is used for the signing pubkey.
+ *
+ * Also, sets the metadata when [`OfferBuilder::build`] is called such that it can be used by
+ * [`InvoiceRequest::verify`] to determine if the request was produced for the offer given an
+ * [`ExpandedKey`].
+ *
+ * [`InvoiceRequest::verify`]: crate::offers::invoice_request::InvoiceRequest::verify
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
  */
-uint64_t BlindedPayInfo_get_htlc_maximum_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKOfferWithDerivedMetadataBuilder OfferWithDerivedMetadataBuilder_deriving_signing_pubkey(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source);
 
 /**
- * The maximum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
- * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
- * seen by the recipient.
+ * Adds the chain hash of the given [`Network`] to [`Offer::chains`]. If not called,
+ * the chain hash of [`Network::Bitcoin`] is assumed to be the only one supported.
+ *
+ * See [`Offer::chains`] on how this relates to the payment currency.
+ *
+ * Successive calls to this method will add another chain hash.
  */
-void BlindedPayInfo_set_htlc_maximum_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint64_t val);
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_chain(struct LDKOfferWithDerivedMetadataBuilder this_arg, enum LDKNetwork network);
 
 /**
- * Features set in `encrypted_data_tlv` for the `encrypted_recipient_data` TLV record in an
- * onion payload.
+ * Sets the [`Offer::amount`] as an [`Amount::Bitcoin`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-struct LDKBlindedHopFeatures BlindedPayInfo_get_features(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_amount_msats(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t amount_msats);
 
 /**
- * Features set in `encrypted_data_tlv` for the `encrypted_recipient_data` TLV record in an
- * onion payload.
+ * Sets the [`Offer::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Offer::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-void BlindedPayInfo_set_features(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, struct LDKBlindedHopFeatures val);
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_absolute_expiry(struct LDKOfferWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
 
 /**
- * Constructs a new BlindedPayInfo given each field
+ * Sets the [`Offer::description`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-MUST_USE_RES struct LDKBlindedPayInfo BlindedPayInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, struct LDKBlindedHopFeatures features_arg);
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_description(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr description);
 
 /**
- * Creates a copy of the BlindedPayInfo
+ * Sets the [`Offer::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-struct LDKBlindedPayInfo BlindedPayInfo_clone(const struct LDKBlindedPayInfo *NONNULL_PTR orig);
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_issuer(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKStr issuer);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the BlindedPayInfo.
+ * Adds a blinded path to [`Offer::paths`]. Must include at least one path if only connected by
+ * private channels or if [`Offer::signing_pubkey`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
  */
-uint64_t BlindedPayInfo_hash(const struct LDKBlindedPayInfo *NONNULL_PTR o);
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_path(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path);
 
 /**
- * Checks if two BlindedPayInfos contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Sets the quantity of items for [`Offer::supported_quantity`]. If not called, defaults to
+ * [`Quantity::One`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-bool BlindedPayInfo_eq(const struct LDKBlindedPayInfo *NONNULL_PTR a, const struct LDKBlindedPayInfo *NONNULL_PTR b);
+MUST_USE_RES void OfferWithDerivedMetadataBuilder_supported_quantity(struct LDKOfferWithDerivedMetadataBuilder this_arg, struct LDKQuantity quantity);
 
 /**
- * Serialize the BlindedPayInfo object into a byte array which can be read by BlindedPayInfo_read
+ * Builds an [`Offer`] from the builder's settings.
  */
-struct LDKCVec_u8Z BlindedPayInfo_write(const struct LDKBlindedPayInfo *NONNULL_PTR obj);
+MUST_USE_RES struct LDKCResult_OfferBolt12SemanticErrorZ OfferWithDerivedMetadataBuilder_build(struct LDKOfferWithDerivedMetadataBuilder this_arg);
 
 /**
- * Read a BlindedPayInfo from a byte array, created by BlindedPayInfo_write
+ * Frees any resources used by the Offer, if is_owned is set and inner is non-NULL.
  */
-struct LDKCResult_BlindedPayInfoDecodeErrorZ BlindedPayInfo_read(struct LDKu8slice ser);
+void Offer_free(struct LDKOffer this_obj);
 
 /**
- * Frees any resources used by the InvoiceError, if is_owned is set and inner is non-NULL.
+ * Creates a copy of the Offer
  */
-void InvoiceError_free(struct LDKInvoiceError this_obj);
+struct LDKOffer Offer_clone(const struct LDKOffer *NONNULL_PTR orig);
 
 /**
- * The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error.
- *
- * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
- * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
  */
-struct LDKErroneousField InvoiceError_get_erroneous_field(const struct LDKInvoiceError *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ Offer_chains(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error.
- *
- * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
- * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
  */
-void InvoiceError_set_erroneous_field(struct LDKInvoiceError *NONNULL_PTR this_ptr, struct LDKErroneousField val);
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ Offer_metadata(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * An explanation of the error.
+ * The minimum amount required for a successful payment of a single item.
  */
-struct LDKUntrustedString InvoiceError_get_message(const struct LDKInvoiceError *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCOption_AmountZ Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * An explanation of the error.
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void InvoiceError_set_message(struct LDKInvoiceError *NONNULL_PTR this_ptr, struct LDKUntrustedString val);
+MUST_USE_RES struct LDKPrintableString Offer_description(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * Constructs a new InvoiceError given each field
+ * Features pertaining to the offer.
  */
-MUST_USE_RES struct LDKInvoiceError InvoiceError_new(struct LDKErroneousField erroneous_field_arg, struct LDKUntrustedString message_arg);
+MUST_USE_RES struct LDKOfferFeatures Offer_offer_features(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the InvoiceError
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
  */
-struct LDKInvoiceError InvoiceError_clone(const struct LDKInvoiceError *NONNULL_PTR orig);
+MUST_USE_RES struct LDKCOption_u64Z Offer_absolute_expiry(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the ErroneousField, if is_owned is set and inner is non-NULL.
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void ErroneousField_free(struct LDKErroneousField this_obj);
+MUST_USE_RES struct LDKPrintableString Offer_issuer(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * The type number of the TLV field containing the error.
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
  */
-uint64_t ErroneousField_get_tlv_fieldnum(const struct LDKErroneousField *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCVec_BlindedPathZ Offer_paths(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * The type number of the TLV field containing the error.
+ * The quantity of items supported.
  */
-void ErroneousField_set_tlv_fieldnum(struct LDKErroneousField *NONNULL_PTR this_ptr, uint64_t val);
+MUST_USE_RES struct LDKQuantity Offer_supported_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * A value to use for the TLV field to avoid the error.
+ * The public key used by the recipient to sign invoices.
  *
- * Returns a copy of the field.
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKCOption_CVec_u8ZZ ErroneousField_get_suggested_value(const struct LDKErroneousField *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKPublicKey Offer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * A value to use for the TLV field to avoid the error.
+ * Returns the id of the offer.
  */
-void ErroneousField_set_suggested_value(struct LDKErroneousField *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
+MUST_USE_RES struct LDKOfferId Offer_id(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * Constructs a new ErroneousField given each field
+ * Returns whether the given chain is supported by the offer.
  */
-MUST_USE_RES struct LDKErroneousField ErroneousField_new(uint64_t tlv_fieldnum_arg, struct LDKCOption_CVec_u8ZZ suggested_value_arg);
+MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain);
 
 /**
- * Creates a copy of the ErroneousField
+ * Whether the offer has expired.
  */
-struct LDKErroneousField ErroneousField_clone(const struct LDKErroneousField *NONNULL_PTR orig);
+MUST_USE_RES bool Offer_is_expired(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * Serialize the InvoiceError object into a byte array which can be read by InvoiceError_read
+ * Whether the offer has expired given the duration since the Unix epoch.
  */
-struct LDKCVec_u8Z InvoiceError_write(const struct LDKInvoiceError *NONNULL_PTR obj);
+MUST_USE_RES bool Offer_is_expired_no_std(const struct LDKOffer *NONNULL_PTR this_arg, uint64_t duration_since_epoch);
 
 /**
- * Read a InvoiceError from a byte array, created by InvoiceError_write
+ * Returns whether the given quantity is valid for the offer.
  */
-struct LDKCResult_InvoiceErrorDecodeErrorZ InvoiceError_read(struct LDKu8slice ser);
+MUST_USE_RES bool Offer_is_valid_quantity(const struct LDKOffer *NONNULL_PTR this_arg, uint64_t quantity);
 
 /**
- * Frees any resources used by the UnsignedInvoiceRequest, if is_owned is set and inner is non-NULL.
+ * Returns whether a quantity is expected in an [`InvoiceRequest`] for the offer.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
  */
-void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj);
+MUST_USE_RES bool Offer_expects_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the InvoiceRequest, if is_owned is set and inner is non-NULL.
+ * Similar to [`Offer::request_invoice`] except it:
+ * - derives the [`InvoiceRequest::payer_id`] such that a different key can be used for each
+ *   request,
+ * - sets [`InvoiceRequest::payer_metadata`] when [`InvoiceRequestBuilder::build`] is called
+ *   such that it can be used by [`Bolt12Invoice::verify`] to determine if the invoice was
+ *   requested using a base [`ExpandedKey`] from which the payer id was derived, and
+ * - includes the [`PaymentId`] encrypted in [`InvoiceRequest::payer_metadata`] so that it can
+ *   be used when sending the payment for the requested invoice.
+ *
+ * Useful to protect the sender's privacy.
+ *
+ * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
+ * [`InvoiceRequest::payer_metadata`]: crate::offers::invoice_request::InvoiceRequest::payer_metadata
+ * [`Bolt12Invoice::verify`]: crate::offers::invoice::Bolt12Invoice::verify
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
  */
-void InvoiceRequest_free(struct LDKInvoiceRequest this_obj);
+MUST_USE_RES struct LDKCResult_InvoiceRequestWithDerivedPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_payer_id(const struct LDKOffer *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id);
 
 /**
- * Creates a copy of the InvoiceRequest
+ * Similar to [`Offer::request_invoice_deriving_payer_id`] except uses `payer_id` for the
+ * [`InvoiceRequest::payer_id`] instead of deriving a different key for each request.
+ *
+ * Useful for recurring payments using the same `payer_id` with different invoices.
+ *
+ * [`InvoiceRequest::payer_id`]: crate::offers::invoice_request::InvoiceRequest::payer_id
  */
-struct LDKInvoiceRequest InvoiceRequest_clone(const struct LDKInvoiceRequest *NONNULL_PTR orig);
+MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice_deriving_metadata(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKPublicKey payer_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, struct LDKThirtyTwoBytes payment_id);
 
 /**
- * An unpredictable series of bytes, typically containing information about the derivation of
- * [`payer_id`].
+ * Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`,
+ * which will be reflected in the `Bolt12Invoice` response.
  *
- * [`payer_id`]: Self::payer_id
+ * The `metadata` is useful for including information about the derivation of `payer_id` such
+ * that invoice response handling can be stateless. Also serves as payer-provided entropy while
+ * hashing in the signature calculation.
+ *
+ * This should not leak any information such as by using a simple BIP-32 derivation path.
+ * Otherwise, payments may be correlated.
+ *
+ * Errors if the offer contains unknown required features.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
  */
-MUST_USE_RES struct LDKu8slice InvoiceRequest_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCResult_InvoiceRequestWithExplicitPayerIdBuilderBolt12SemanticErrorZ Offer_request_invoice(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id);
 
 /**
- * A chain from [`Offer::chains`] that the offer is valid for.
+ * Generates a non-cryptographic 64-bit hash of the Offer.
  */
-MUST_USE_RES struct LDKThirtyTwoBytes InvoiceRequest_chain(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+uint64_t Offer_hash(const struct LDKOffer *NONNULL_PTR o);
 
 /**
- * The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
- * must be greater than or equal to [`Offer::amount`], converted if necessary.
- *
- * [`chain`]: Self::chain
+ * Serialize the Offer object into a byte array which can be read by Offer_read
  */
-MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_amount_msats(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+struct LDKCVec_u8Z Offer_write(const struct LDKOffer *NONNULL_PTR obj);
 
 /**
- * Features pertaining to requesting an invoice.
+ * Frees any resources used by the Amount
  */
-MUST_USE_RES struct LDKInvoiceRequestFeatures InvoiceRequest_features(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+void Amount_free(struct LDKAmount this_ptr);
 
 /**
- * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ * Creates a copy of the Amount
  */
-MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_quantity(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+struct LDKAmount Amount_clone(const struct LDKAmount *NONNULL_PTR orig);
 
 /**
- * A possibly transient pubkey used to sign the invoice request.
+ * Utility method to constructs a new Bitcoin-variant Amount
  */
-MUST_USE_RES struct LDKPublicKey InvoiceRequest_payer_id(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+struct LDKAmount Amount_bitcoin(uint64_t amount_msats);
 
 /**
- * A payer-provided note which will be seen by the recipient and reflected back in the invoice
- * response.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Utility method to constructs a new Currency-variant Amount
  */
-MUST_USE_RES struct LDKPrintableString InvoiceRequest_payer_note(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
+struct LDKAmount Amount_currency(struct LDKThreeBytes iso4217_code, uint64_t amount);
 
 /**
- * Verifies that the request was for an offer created using the given key. Returns the derived
- * keys need to sign an [`Bolt12Invoice`] for the request if they could be extracted from the
- * metadata.
- *
- * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * Frees any resources used by the Quantity
  */
-MUST_USE_RES struct LDKCResult_COption_KeyPairZNoneZ InvoiceRequest_verify(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
+void Quantity_free(struct LDKQuantity this_ptr);
 
 /**
- * Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read
+ * Creates a copy of the Quantity
  */
-struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);
+struct LDKQuantity Quantity_clone(const struct LDKQuantity *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the Offer, if is_owned is set and inner is non-NULL.
+ * Utility method to constructs a new Bounded-variant Quantity
  */
-void Offer_free(struct LDKOffer this_obj);
+struct LDKQuantity Quantity_bounded(uint64_t a);
 
 /**
- * Creates a copy of the Offer
+ * Utility method to constructs a new Unbounded-variant Quantity
  */
-struct LDKOffer Offer_clone(const struct LDKOffer *NONNULL_PTR orig);
+struct LDKQuantity Quantity_unbounded(void);
 
 /**
- * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
- * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
- * for the selected chain.
+ * Utility method to constructs a new One-variant Quantity
  */
-MUST_USE_RES struct LDKCVec_ChainHashZ Offer_chains(const struct LDKOffer *NONNULL_PTR this_arg);
+struct LDKQuantity Quantity_one(void);
 
 /**
- * Returns whether the given chain is supported by the offer.
+ * Read a Offer object from a string
  */
-MUST_USE_RES bool Offer_supports_chain(const struct LDKOffer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes chain);
+struct LDKCResult_OfferBolt12ParseErrorZ Offer_from_str(struct LDKStr s);
 
 /**
- * Opaque bytes set by the originator. Useful for authentication and validating fields since it
- * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
+ * Frees any resources used by the InvoiceWithExplicitSigningPubkeyBuilder, if is_owned is set and inner is non-NULL.
  */
-MUST_USE_RES struct LDKCOption_CVec_u8ZZ Offer_metadata(const struct LDKOffer *NONNULL_PTR this_arg);
+void InvoiceWithExplicitSigningPubkeyBuilder_free(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_obj);
 
 /**
- * The minimum amount required for a successful payment of a single item.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Frees any resources used by the InvoiceWithDerivedSigningPubkeyBuilder, if is_owned is set and inner is non-NULL.
  */
-MUST_USE_RES struct LDKAmount Offer_amount(const struct LDKOffer *NONNULL_PTR this_arg);
+void InvoiceWithDerivedSigningPubkeyBuilder_free(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_obj);
 
 /**
- * A complete description of the purpose of the payment. Intended to be displayed to the user
- * but with the caveat that it has not been verified in any way.
+ * Builds an unsigned [`Bolt12Invoice`] after checking for valid semantics. It can be signed by
+ * [`UnsignedBolt12Invoice::sign`].
  */
-MUST_USE_RES struct LDKPrintableString Offer_description(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCResult_UnsignedBolt12InvoiceBolt12SemanticErrorZ InvoiceWithExplicitSigningPubkeyBuilder_build(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg);
 
 /**
- * Features pertaining to the offer.
+ * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`].
+ * Any expiry that has already passed is valid and can be checked for using
+ * [`Bolt12Invoice::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-MUST_USE_RES struct LDKOfferFeatures Offer_features(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs);
 
 /**
- * Duration since the Unix epoch when an invoice should no longer be requested.
+ * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`].
  *
- * If `None`, the offer does not expire.
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses.
  */
-MUST_USE_RES struct LDKCOption_DurationZ Offer_absolute_expiry(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]);
 
 /**
- * Whether the offer has expired.
+ * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses.
  */
-MUST_USE_RES bool Offer_is_expired(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]);
 
 /**
- * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
- * displayed to the user but with the caveat that it has not been verified in any way.
+ * Adds a P2TR address to [`Bolt12Invoice::fallbacks`].
  *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2TR addresses.
  */
-MUST_USE_RES struct LDKPrintableString Offer_issuer(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key);
 
 /**
- * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
- * recipient privacy by obfuscating its node id.
+ * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is
+ * disallowed.
  */
-MUST_USE_RES struct LDKCVec_BlindedPathZ Offer_paths(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES void InvoiceWithExplicitSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithExplicitSigningPubkeyBuilder this_arg);
 
 /**
- * The quantity of items supported.
+ * Builds a signed [`Bolt12Invoice`] after checking for valid semantics.
  */
-MUST_USE_RES struct LDKQuantity Offer_supported_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCResult_Bolt12InvoiceBolt12SemanticErrorZ InvoiceWithDerivedSigningPubkeyBuilder_build_and_sign(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg);
 
 /**
- * Returns whether the given quantity is valid for the offer.
+ * Sets the [`Bolt12Invoice::relative_expiry`] as seconds since [`Bolt12Invoice::created_at`].
+ * Any expiry that has already passed is valid and can be checked for using
+ * [`Bolt12Invoice::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-MUST_USE_RES bool Offer_is_valid_quantity(const struct LDKOffer *NONNULL_PTR this_arg, uint64_t quantity);
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_relative_expiry(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, uint32_t relative_expiry_secs);
 
 /**
- * Returns whether a quantity is expected in an [`InvoiceRequest`] for the offer.
+ * Adds a P2WSH address to [`Bolt12Invoice::fallbacks`].
  *
- * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WSH addresses.
  */
-MUST_USE_RES bool Offer_expects_quantity(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wsh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*script_hash)[32]);
 
 /**
- * The public key used by the recipient to sign invoices.
+ * Adds a P2WPKH address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2WPKH addresses.
  */
-MUST_USE_RES struct LDKPublicKey Offer_signing_pubkey(const struct LDKOffer *NONNULL_PTR this_arg);
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v0_p2wpkh(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, const uint8_t (*pubkey_hash)[20]);
 
 /**
- * Serialize the Offer object into a byte array which can be read by Offer_read
+ * Adds a P2TR address to [`Bolt12Invoice::fallbacks`].
+ *
+ * Successive calls to this method will add another address. Caller is responsible for not
+ * adding duplicate addresses and only calling if capable of receiving to P2TR addresses.
  */
-struct LDKCVec_u8Z Offer_write(const struct LDKOffer *NONNULL_PTR obj);
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_fallback_v1_p2tr_tweaked(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg, struct LDKTweakedPublicKey output_key);
 
 /**
- * Frees any resources used by the Amount, if is_owned is set and inner is non-NULL.
+ * Sets [`Bolt12Invoice::invoice_features`] to indicate MPP may be used. Otherwise, MPP is
+ * disallowed.
  */
-void Amount_free(struct LDKAmount this_obj);
+MUST_USE_RES void InvoiceWithDerivedSigningPubkeyBuilder_allow_mpp(struct LDKInvoiceWithDerivedSigningPubkeyBuilder this_arg);
 
 /**
- * Creates a copy of the Amount
+ * Frees any resources used by the UnsignedBolt12Invoice, if is_owned is set and inner is non-NULL.
  */
-struct LDKAmount Amount_clone(const struct LDKAmount *NONNULL_PTR orig);
+void UnsignedBolt12Invoice_free(struct LDKUnsignedBolt12Invoice this_obj);
 
 /**
- * Frees any resources used by the Quantity, if is_owned is set and inner is non-NULL.
+ * Creates a copy of the UnsignedBolt12Invoice
  */
-void Quantity_free(struct LDKQuantity this_obj);
+struct LDKUnsignedBolt12Invoice UnsignedBolt12Invoice_clone(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR orig);
 
 /**
- * Creates a copy of the Quantity
+ * Calls the free function if one is set
  */
-struct LDKQuantity Quantity_clone(const struct LDKQuantity *NONNULL_PTR orig);
+void SignBolt12InvoiceFn_free(struct LDKSignBolt12InvoiceFn this_ptr);
 
 /**
- * Read a Offer object from a string
+ * Returns the [`TaggedHash`] of the invoice to sign.
  */
-struct LDKCResult_OfferBolt12ParseErrorZ Offer_from_str(struct LDKStr s);
+MUST_USE_RES struct LDKTaggedHash UnsignedBolt12Invoice_tagged_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the Bolt12ParseError, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the Bolt12Invoice, if is_owned is set and inner is non-NULL.
  */
-void Bolt12ParseError_free(struct LDKBolt12ParseError this_obj);
+void Bolt12Invoice_free(struct LDKBolt12Invoice this_obj);
 
 /**
- * Creates a copy of the Bolt12ParseError
+ * Creates a copy of the Bolt12Invoice
  */
-struct LDKBolt12ParseError Bolt12ParseError_clone(const struct LDKBolt12ParseError *NONNULL_PTR orig);
+struct LDKBolt12Invoice Bolt12Invoice_clone(const struct LDKBolt12Invoice *NONNULL_PTR orig);
 
 /**
- * Creates a copy of the Bolt12SemanticError
+ * The chains that may be used when paying a requested invoice.
+ *
+ * From [`Offer::chains`]; `None` if the invoice was created in response to a [`Refund`].
+ *
+ * [`Offer::chains`]: crate::offers::offer::Offer::chains
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_clone(const enum LDKBolt12SemanticError *NONNULL_PTR orig);
+MUST_USE_RES struct LDKCOption_CVec_ThirtyTwoBytesZZ UnsignedBolt12Invoice_offer_chains(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new AlreadyExpired-variant Bolt12SemanticError
+ * The chain that must be used when paying the invoice; selected from [`offer_chains`] if the
+ * invoice originated from an offer.
+ *
+ * From [`InvoiceRequest::chain`] or [`Refund::chain`].
+ *
+ * [`offer_chains`]: Self::offer_chains
+ * [`InvoiceRequest::chain`]: crate::offers::invoice_request::InvoiceRequest::chain
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_already_expired(void);
+MUST_USE_RES struct LDKThirtyTwoBytes UnsignedBolt12Invoice_chain(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnsupportedChain-variant Bolt12SemanticError
+ * Opaque bytes set by the originating [`Offer`].
+ *
+ * From [`Offer::metadata`]; `None` if the invoice was created in response to a [`Refund`] or
+ * if the [`Offer`] did not set it.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::metadata`]: crate::offers::offer::Offer::metadata
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unsupported_chain(void);
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedBolt12Invoice_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnexpectedChain-variant Bolt12SemanticError
+ * The minimum amount required for a successful payment of a single item.
+ *
+ * From [`Offer::amount`]; `None` if the invoice was created in response to a [`Refund`] or if
+ * the [`Offer`] did not set it.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::amount`]: crate::offers::offer::Offer::amount
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_chain(void);
+MUST_USE_RES struct LDKCOption_AmountZ UnsignedBolt12Invoice_amount(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingAmount-variant Bolt12SemanticError
+ * Features pertaining to the originating [`Offer`].
+ *
+ * From [`Offer::offer_features`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::offer_features`]: crate::offers::offer::Offer::offer_features
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_amount(void);
+MUST_USE_RES struct LDKOfferFeatures UnsignedBolt12Invoice_offer_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new InvalidAmount-variant Bolt12SemanticError
+ * A complete description of the purpose of the originating offer or refund.
+ *
+ * From [`Offer::description`] or [`Refund::description`].
+ *
+ * [`Offer::description`]: crate::offers::offer::Offer::description
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_invalid_amount(void);
+MUST_USE_RES struct LDKPrintableString UnsignedBolt12Invoice_description(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new InsufficientAmount-variant Bolt12SemanticError
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * From [`Offer::absolute_expiry`] or [`Refund::absolute_expiry`].
+ *
+ * [`Offer::absolute_expiry`]: crate::offers::offer::Offer::absolute_expiry
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_insufficient_amount(void);
+MUST_USE_RES struct LDKCOption_u64Z UnsignedBolt12Invoice_absolute_expiry(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnexpectedAmount-variant Bolt12SemanticError
+ * The issuer of the offer or refund.
+ *
+ * From [`Offer::issuer`] or [`Refund::issuer`].
+ *
+ * [`Offer::issuer`]: crate::offers::offer::Offer::issuer
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_amount(void);
+MUST_USE_RES struct LDKPrintableString UnsignedBolt12Invoice_issuer(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnsupportedCurrency-variant Bolt12SemanticError
+ * Paths to the recipient originating from publicly reachable nodes.
+ *
+ * From [`Offer::paths`] or [`Refund::paths`].
+ *
+ * [`Offer::paths`]: crate::offers::offer::Offer::paths
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unsupported_currency(void);
+MUST_USE_RES struct LDKCVec_BlindedPathZ UnsignedBolt12Invoice_message_paths(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnknownRequiredFeatures-variant Bolt12SemanticError
+ * The quantity of items supported.
+ *
+ * From [`Offer::supported_quantity`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unknown_required_features(void);
+MUST_USE_RES struct LDKCOption_QuantityZ UnsignedBolt12Invoice_supported_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnexpectedFeatures-variant Bolt12SemanticError
+ * An unpredictable series of bytes from the payer.
+ *
+ * From [`InvoiceRequest::payer_metadata`] or [`Refund::payer_metadata`].
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_features(void);
+MUST_USE_RES struct LDKu8slice UnsignedBolt12Invoice_payer_metadata(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingDescription-variant Bolt12SemanticError
+ * Features pertaining to requesting an invoice.
+ *
+ * From [`InvoiceRequest::invoice_request_features`] or [`Refund::features`].
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_description(void);
+MUST_USE_RES struct LDKInvoiceRequestFeatures UnsignedBolt12Invoice_invoice_request_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingSigningPubkey-variant Bolt12SemanticError
+ * The quantity of items requested or refunded for.
+ *
+ * From [`InvoiceRequest::quantity`] or [`Refund::quantity`].
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_signing_pubkey(void);
+MUST_USE_RES struct LDKCOption_u64Z UnsignedBolt12Invoice_quantity(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new InvalidSigningPubkey-variant Bolt12SemanticError
+ * A possibly transient pubkey used to sign the invoice request or to send an invoice for a
+ * refund in case there are no [`message_paths`].
+ *
+ * [`message_paths`]: Self::message_paths
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_invalid_signing_pubkey(void);
+MUST_USE_RES struct LDKPublicKey UnsignedBolt12Invoice_payer_id(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnexpectedSigningPubkey-variant Bolt12SemanticError
+ * A payer-provided note reflected back in the invoice.
+ *
+ * From [`InvoiceRequest::payer_note`] or [`Refund::payer_note`].
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_signing_pubkey(void);
+MUST_USE_RES struct LDKPrintableString UnsignedBolt12Invoice_payer_note(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingQuantity-variant Bolt12SemanticError
+ * Duration since the Unix epoch when the invoice was created.
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_quantity(void);
+MUST_USE_RES uint64_t UnsignedBolt12Invoice_created_at(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new InvalidQuantity-variant Bolt12SemanticError
+ * Duration since [`Bolt12Invoice::created_at`] when the invoice has expired and therefore
+ * should no longer be paid.
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_invalid_quantity(void);
+MUST_USE_RES uint64_t UnsignedBolt12Invoice_relative_expiry(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnexpectedQuantity-variant Bolt12SemanticError
+ * Whether the invoice has expired.
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_quantity(void);
+MUST_USE_RES bool UnsignedBolt12Invoice_is_expired(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new InvalidMetadata-variant Bolt12SemanticError
+ * SHA256 hash of the payment preimage that will be given in return for paying the invoice.
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_invalid_metadata(void);
+MUST_USE_RES struct LDKThirtyTwoBytes UnsignedBolt12Invoice_payment_hash(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnexpectedMetadata-variant Bolt12SemanticError
+ * The minimum amount required for a successful payment of the invoice.
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_metadata(void);
+MUST_USE_RES uint64_t UnsignedBolt12Invoice_amount_msats(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingPayerMetadata-variant Bolt12SemanticError
+ * Features pertaining to paying an invoice.
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_metadata(void);
+MUST_USE_RES struct LDKBolt12InvoiceFeatures UnsignedBolt12Invoice_invoice_features(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingPayerId-variant Bolt12SemanticError
+ * The public key corresponding to the key used to sign the invoice.
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_id(void);
+MUST_USE_RES struct LDKPublicKey UnsignedBolt12Invoice_signing_pubkey(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingPaths-variant Bolt12SemanticError
+ * The chains that may be used when paying a requested invoice.
+ *
+ * From [`Offer::chains`]; `None` if the invoice was created in response to a [`Refund`].
+ *
+ * [`Offer::chains`]: crate::offers::offer::Offer::chains
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_paths(void);
+MUST_USE_RES struct LDKCOption_CVec_ThirtyTwoBytesZZ Bolt12Invoice_offer_chains(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new InvalidPayInfo-variant Bolt12SemanticError
+ * The chain that must be used when paying the invoice; selected from [`offer_chains`] if the
+ * invoice originated from an offer.
+ *
+ * From [`InvoiceRequest::chain`] or [`Refund::chain`].
+ *
+ * [`offer_chains`]: Self::offer_chains
+ * [`InvoiceRequest::chain`]: crate::offers::invoice_request::InvoiceRequest::chain
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_invalid_pay_info(void);
+MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_chain(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingCreationTime-variant Bolt12SemanticError
+ * Opaque bytes set by the originating [`Offer`].
+ *
+ * From [`Offer::metadata`]; `None` if the invoice was created in response to a [`Refund`] or
+ * if the [`Offer`] did not set it.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::metadata`]: crate::offers::offer::Offer::metadata
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_creation_time(void);
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ Bolt12Invoice_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingPaymentHash-variant Bolt12SemanticError
+ * The minimum amount required for a successful payment of a single item.
+ *
+ * From [`Offer::amount`]; `None` if the invoice was created in response to a [`Refund`] or if
+ * the [`Offer`] did not set it.
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::amount`]: crate::offers::offer::Offer::amount
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_payment_hash(void);
+MUST_USE_RES struct LDKCOption_AmountZ Bolt12Invoice_amount(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new MissingSignature-variant Bolt12SemanticError
+ * Features pertaining to the originating [`Offer`].
+ *
+ * From [`Offer::offer_features`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
+ * [`Offer::offer_features`]: crate::offers::offer::Offer::offer_features
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-enum LDKBolt12SemanticError Bolt12SemanticError_missing_signature(void);
+MUST_USE_RES struct LDKOfferFeatures Bolt12Invoice_offer_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the Refund, if is_owned is set and inner is non-NULL.
+ * A complete description of the purpose of the originating offer or refund.
+ *
+ * From [`Offer::description`] or [`Refund::description`].
+ *
+ * [`Offer::description`]: crate::offers::offer::Offer::description
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void Refund_free(struct LDKRefund this_obj);
+MUST_USE_RES struct LDKPrintableString Bolt12Invoice_description(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the Refund
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * From [`Offer::absolute_expiry`] or [`Refund::absolute_expiry`].
+ *
+ * [`Offer::absolute_expiry`]: crate::offers::offer::Offer::absolute_expiry
  */
-struct LDKRefund Refund_clone(const struct LDKRefund *NONNULL_PTR orig);
+MUST_USE_RES struct LDKCOption_u64Z Bolt12Invoice_absolute_expiry(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * A complete description of the purpose of the refund. Intended to be displayed to the user
- * but with the caveat that it has not been verified in any way.
+ * The issuer of the offer or refund.
+ *
+ * From [`Offer::issuer`] or [`Refund::issuer`].
+ *
+ * [`Offer::issuer`]: crate::offers::offer::Offer::issuer
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKPrintableString Refund_description(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKPrintableString Bolt12Invoice_issuer(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Duration since the Unix epoch when an invoice should no longer be sent.
+ * Paths to the recipient originating from publicly reachable nodes.
  *
- * If `None`, the refund does not expire.
+ * From [`Offer::paths`] or [`Refund::paths`].
+ *
+ * [`Offer::paths`]: crate::offers::offer::Offer::paths
  */
-MUST_USE_RES struct LDKCOption_DurationZ Refund_absolute_expiry(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCVec_BlindedPathZ Bolt12Invoice_message_paths(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Whether the refund has expired.
+ * The quantity of items supported.
+ *
+ * From [`Offer::supported_quantity`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
  */
-MUST_USE_RES bool Refund_is_expired(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCOption_QuantityZ Bolt12Invoice_supported_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * The issuer of the refund, possibly beginning with `user@domain` or `domain`. Intended to be
- * displayed to the user but with the caveat that it has not been verified in any way.
+ * An unpredictable series of bytes from the payer.
  *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * From [`InvoiceRequest::payer_metadata`] or [`Refund::payer_metadata`].
  */
-MUST_USE_RES struct LDKPrintableString Refund_issuer(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKu8slice Bolt12Invoice_payer_metadata(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Paths to the sender originating from publicly reachable nodes. Blinded paths provide sender
- * privacy by obfuscating its node id.
+ * Features pertaining to requesting an invoice.
+ *
+ * From [`InvoiceRequest::invoice_request_features`] or [`Refund::features`].
  */
-MUST_USE_RES struct LDKCVec_BlindedPathZ Refund_paths(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKInvoiceRequestFeatures Bolt12Invoice_invoice_request_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * An unpredictable series of bytes, typically containing information about the derivation of
- * [`payer_id`].
+ * The quantity of items requested or refunded for.
  *
- * [`payer_id`]: Self::payer_id
+ * From [`InvoiceRequest::quantity`] or [`Refund::quantity`].
  */
-MUST_USE_RES struct LDKu8slice Refund_metadata(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCOption_u64Z Bolt12Invoice_quantity(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * A chain that the refund is valid for.
+ * A possibly transient pubkey used to sign the invoice request or to send an invoice for a
+ * refund in case there are no [`message_paths`].
+ *
+ * [`message_paths`]: Self::message_paths
  */
-MUST_USE_RES struct LDKThirtyTwoBytes Refund_chain(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKPublicKey Bolt12Invoice_payer_id(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * The amount to refund in msats (i.e., the minimum lightning-payable unit for [`chain`]).
+ * A payer-provided note reflected back in the invoice.
  *
- * [`chain`]: Self::chain
+ * From [`InvoiceRequest::payer_note`] or [`Refund::payer_note`].
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES uint64_t Refund_amount_msats(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKPrintableString Bolt12Invoice_payer_note(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Features pertaining to requesting an invoice.
+ * Duration since the Unix epoch when the invoice was created.
  */
-MUST_USE_RES struct LDKInvoiceRequestFeatures Refund_features(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES uint64_t Bolt12Invoice_created_at(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * The quantity of an item that refund is for.
+ * Duration since [`Bolt12Invoice::created_at`] when the invoice has expired and therefore
+ * should no longer be paid.
  */
-MUST_USE_RES struct LDKCOption_u64Z Refund_quantity(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES uint64_t Bolt12Invoice_relative_expiry(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * A public node id to send to in the case where there are no [`paths`]. Otherwise, a possibly
- * transient pubkey.
- *
- * [`paths`]: Self::paths
+ * Whether the invoice has expired.
  */
-MUST_USE_RES struct LDKPublicKey Refund_payer_id(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES bool Bolt12Invoice_is_expired(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Payer provided note to include in the invoice.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * SHA256 hash of the payment preimage that will be given in return for paying the invoice.
  */
-MUST_USE_RES struct LDKPrintableString Refund_payer_note(const struct LDKRefund *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_payment_hash(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Serialize the Refund object into a byte array which can be read by Refund_read
+ * The minimum amount required for a successful payment of the invoice.
  */
-struct LDKCVec_u8Z Refund_write(const struct LDKRefund *NONNULL_PTR obj);
+MUST_USE_RES uint64_t Bolt12Invoice_amount_msats(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Read a Refund object from a string
+ * Features pertaining to paying an invoice.
  */
-struct LDKCResult_RefundBolt12ParseErrorZ Refund_from_str(struct LDKStr s);
+MUST_USE_RES struct LDKBolt12InvoiceFeatures Bolt12Invoice_invoice_features(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the UtxoLookupError
+ * The public key corresponding to the key used to sign the invoice.
  */
-enum LDKUtxoLookupError UtxoLookupError_clone(const enum LDKUtxoLookupError *NONNULL_PTR orig);
+MUST_USE_RES struct LDKPublicKey Bolt12Invoice_signing_pubkey(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnknownChain-variant UtxoLookupError
+ * Signature of the invoice verified using [`Bolt12Invoice::signing_pubkey`].
  */
-enum LDKUtxoLookupError UtxoLookupError_unknown_chain(void);
+MUST_USE_RES struct LDKSchnorrSignature Bolt12Invoice_signature(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new UnknownTx-variant UtxoLookupError
+ * Hash that was used for signing the invoice.
  */
-enum LDKUtxoLookupError UtxoLookupError_unknown_tx(void);
+MUST_USE_RES struct LDKThirtyTwoBytes Bolt12Invoice_signable_hash(const struct LDKBolt12Invoice *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the UtxoResult
+ * Verifies that the invoice was for a request or refund created using the given key. Returns
+ * the associated [`PaymentId`] to use when sending the payment.
  */
-void UtxoResult_free(struct LDKUtxoResult this_ptr);
+MUST_USE_RES struct LDKCResult_ThirtyTwoBytesNoneZ Bolt12Invoice_verify(const struct LDKBolt12Invoice *NONNULL_PTR this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
 
 /**
- * Creates a copy of the UtxoResult
+ * Generates a non-cryptographic 64-bit hash of the Bolt12Invoice.
  */
-struct LDKUtxoResult UtxoResult_clone(const struct LDKUtxoResult *NONNULL_PTR orig);
+uint64_t Bolt12Invoice_hash(const struct LDKBolt12Invoice *NONNULL_PTR o);
 
 /**
- * Utility method to constructs a new Sync-variant UtxoResult
+ * Serialize the UnsignedBolt12Invoice object into a byte array which can be read by UnsignedBolt12Invoice_read
  */
-struct LDKUtxoResult UtxoResult_sync(struct LDKCResult_TxOutUtxoLookupErrorZ a);
+struct LDKCVec_u8Z UnsignedBolt12Invoice_write(const struct LDKUnsignedBolt12Invoice *NONNULL_PTR obj);
 
 /**
- * Utility method to constructs a new Async-variant UtxoResult
+ * Serialize the Bolt12Invoice object into a byte array which can be read by Bolt12Invoice_read
  */
-struct LDKUtxoResult UtxoResult_async(struct LDKUtxoFuture a);
+struct LDKCVec_u8Z Bolt12Invoice_write(const struct LDKBolt12Invoice *NONNULL_PTR obj);
 
 /**
- * Calls the free function if one is set
+ * Frees any resources used by the BlindedPayInfo, if is_owned is set and inner is non-NULL.
  */
-void UtxoLookup_free(struct LDKUtxoLookup this_ptr);
+void BlindedPayInfo_free(struct LDKBlindedPayInfo this_obj);
 
 /**
- * Frees any resources used by the UtxoFuture, if is_owned is set and inner is non-NULL.
+ * Base fee charged (in millisatoshi) for the entire blinded path.
  */
-void UtxoFuture_free(struct LDKUtxoFuture this_obj);
+uint32_t BlindedPayInfo_get_fee_base_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
 
 /**
- * Creates a copy of the UtxoFuture
+ * Base fee charged (in millisatoshi) for the entire blinded path.
  */
-struct LDKUtxoFuture UtxoFuture_clone(const struct LDKUtxoFuture *NONNULL_PTR orig);
+void BlindedPayInfo_set_fee_base_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * Builds a new future for later resolution.
+ * Liquidity fee charged (in millionths of the amount transferred) for the entire blinded path
+ * (i.e., 10,000 is 1%).
  */
-MUST_USE_RES struct LDKUtxoFuture UtxoFuture_new(void);
+uint32_t BlindedPayInfo_get_fee_proportional_millionths(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
 
 /**
- * Resolves this future against the given `graph` and with the given `result`.
- *
- * This is identical to calling [`UtxoFuture::resolve`] with a dummy `gossip`, disabling
- * forwarding the validated gossip message onwards to peers.
- *
- * Because this may cause the [`NetworkGraph`]'s [`processing_queue_high`] to flip, in order
- * to allow us to interact with peers again, you should call [`PeerManager::process_events`]
- * after this.
- *
- * [`processing_queue_high`]: crate::ln::msgs::RoutingMessageHandler::processing_queue_high
- * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ * Liquidity fee charged (in millionths of the amount transferred) for the entire blinded path
+ * (i.e., 10,000 is 1%).
  */
-void UtxoFuture_resolve_without_forwarding(const struct LDKUtxoFuture *NONNULL_PTR this_arg, const struct LDKNetworkGraph *NONNULL_PTR graph, struct LDKCResult_TxOutUtxoLookupErrorZ result);
+void BlindedPayInfo_set_fee_proportional_millionths(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * Resolves this future against the given `graph` and with the given `result`.
- *
- * The given `gossip` is used to broadcast any validated messages onwards to all peers which
- * have available buffer space.
- *
- * Because this may cause the [`NetworkGraph`]'s [`processing_queue_high`] to flip, in order
- * to allow us to interact with peers again, you should call [`PeerManager::process_events`]
- * after this.
- *
- * [`processing_queue_high`]: crate::ln::msgs::RoutingMessageHandler::processing_queue_high
- * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ * Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for the entire blinded
+ * path.
  */
-void UtxoFuture_resolve(const struct LDKUtxoFuture *NONNULL_PTR this_arg, const struct LDKNetworkGraph *NONNULL_PTR graph, const struct LDKP2PGossipSync *NONNULL_PTR gossip, struct LDKCResult_TxOutUtxoLookupErrorZ result);
+uint16_t BlindedPayInfo_get_cltv_expiry_delta(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the NodeId, if is_owned is set and inner is non-NULL.
+ * Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for the entire blinded
+ * path.
  */
-void NodeId_free(struct LDKNodeId this_obj);
+void BlindedPayInfo_set_cltv_expiry_delta(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * Creates a copy of the NodeId
+ * The minimum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
+ * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
+ * seen by the recipient.
  */
-struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
+uint64_t BlindedPayInfo_get_htlc_minimum_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
 
 /**
- * Create a new NodeId from a public key
+ * The minimum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
+ * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
+ * seen by the recipient.
  */
-MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
+void BlindedPayInfo_set_htlc_minimum_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Get the public key slice from this NodeId
+ * The maximum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
+ * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
+ * seen by the recipient.
  */
-MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
+uint64_t BlindedPayInfo_get_htlc_maximum_msat(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
 
 /**
- * Get the public key from this NodeId
+ * The maximum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
+ * blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
+ * seen by the recipient.
  */
-MUST_USE_RES struct LDKCResult_PublicKeyErrorZ NodeId_as_pubkey(const struct LDKNodeId *NONNULL_PTR this_arg);
+void BlindedPayInfo_set_htlc_maximum_msat(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the NodeId.
+ * Features set in `encrypted_data_tlv` for the `encrypted_recipient_data` TLV record in an
+ * onion payload.
  */
-uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
+struct LDKBlindedHopFeatures BlindedPayInfo_get_features(const struct LDKBlindedPayInfo *NONNULL_PTR this_ptr);
 
 /**
- * Serialize the NodeId object into a byte array which can be read by NodeId_read
+ * Features set in `encrypted_data_tlv` for the `encrypted_recipient_data` TLV record in an
+ * onion payload.
  */
-struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
+void BlindedPayInfo_set_features(struct LDKBlindedPayInfo *NONNULL_PTR this_ptr, struct LDKBlindedHopFeatures val);
 
 /**
- * Read a NodeId from a byte array, created by NodeId_write
+ * Constructs a new BlindedPayInfo given each field
  */
-struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
+MUST_USE_RES struct LDKBlindedPayInfo BlindedPayInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, struct LDKBlindedHopFeatures features_arg);
 
 /**
- * Frees any resources used by the NetworkGraph, if is_owned is set and inner is non-NULL.
+ * Creates a copy of the BlindedPayInfo
  */
-void NetworkGraph_free(struct LDKNetworkGraph this_obj);
+struct LDKBlindedPayInfo BlindedPayInfo_clone(const struct LDKBlindedPayInfo *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the ReadOnlyNetworkGraph, if is_owned is set and inner is non-NULL.
+ * Generates a non-cryptographic 64-bit hash of the BlindedPayInfo.
  */
-void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
+uint64_t BlindedPayInfo_hash(const struct LDKBlindedPayInfo *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the NetworkUpdate
+ * Checks if two BlindedPayInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
+bool BlindedPayInfo_eq(const struct LDKBlindedPayInfo *NONNULL_PTR a, const struct LDKBlindedPayInfo *NONNULL_PTR b);
 
 /**
- * Creates a copy of the NetworkUpdate
+ * Serialize the BlindedPayInfo object into a byte array which can be read by BlindedPayInfo_read
  */
-struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
+struct LDKCVec_u8Z BlindedPayInfo_write(const struct LDKBlindedPayInfo *NONNULL_PTR obj);
 
 /**
- * Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
+ * Read a BlindedPayInfo from a byte array, created by BlindedPayInfo_write
  */
-struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
+struct LDKCResult_BlindedPayInfoDecodeErrorZ BlindedPayInfo_read(struct LDKu8slice ser);
 
 /**
- * Utility method to constructs a new ChannelFailure-variant NetworkUpdate
+ * Frees any resources used by the InvoiceError, if is_owned is set and inner is non-NULL.
  */
-struct LDKNetworkUpdate NetworkUpdate_channel_failure(uint64_t short_channel_id, bool is_permanent);
+void InvoiceError_free(struct LDKInvoiceError this_obj);
 
 /**
- * Utility method to constructs a new NodeFailure-variant NetworkUpdate
+ * The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
+struct LDKErroneousField InvoiceError_get_erroneous_field(const struct LDKInvoiceError *NONNULL_PTR this_ptr);
 
 /**
- * Checks if two NetworkUpdates contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
+ * The field in the [`InvoiceRequest`] or the [`Bolt12Invoice`] that contained an error.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-bool NetworkUpdate_eq(const struct LDKNetworkUpdate *NONNULL_PTR a, const struct LDKNetworkUpdate *NONNULL_PTR b);
+void InvoiceError_set_erroneous_field(struct LDKInvoiceError *NONNULL_PTR this_ptr, struct LDKErroneousField val);
 
 /**
- * Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
+ * An explanation of the error.
  */
-struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
+struct LDKUntrustedString InvoiceError_get_message(const struct LDKInvoiceError *NONNULL_PTR this_ptr);
 
 /**
- * Read a NetworkUpdate from a byte array, created by NetworkUpdate_write
+ * An explanation of the error.
  */
-struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
+void InvoiceError_set_message(struct LDKInvoiceError *NONNULL_PTR this_ptr, struct LDKUntrustedString val);
 
 /**
- * Frees any resources used by the P2PGossipSync, if is_owned is set and inner is non-NULL.
+ * Constructs a new InvoiceError given each field
+ *
+ * Note that erroneous_field_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void P2PGossipSync_free(struct LDKP2PGossipSync this_obj);
+MUST_USE_RES struct LDKInvoiceError InvoiceError_new(struct LDKErroneousField erroneous_field_arg, struct LDKUntrustedString message_arg);
 
 /**
- * Creates a new tracker of the actual state of the network of channels and nodes,
- * assuming an existing [`NetworkGraph`].
- * UTXO lookup is used to make sure announced channels exist on-chain, channel data is
- * correct, and the announcement is signed with channel owners' keys.
+ * Creates a copy of the InvoiceError
  */
-MUST_USE_RES struct LDKP2PGossipSync P2PGossipSync_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_UtxoLookupZ utxo_lookup, struct LDKLogger logger);
+struct LDKInvoiceError InvoiceError_clone(const struct LDKInvoiceError *NONNULL_PTR orig);
 
 /**
- * Adds a provider used to check new announcements. Does not affect
- * existing announcements unless they are updated.
- * Add, update or remove the provider would replace the current one.
+ * Frees any resources used by the ErroneousField, if is_owned is set and inner is non-NULL.
  */
-void P2PGossipSync_add_utxo_lookup(struct LDKP2PGossipSync *NONNULL_PTR this_arg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+void ErroneousField_free(struct LDKErroneousField this_obj);
 
 /**
- * Handles any network updates originating from [`Event`]s.
- *
- * [`Event`]: crate::events::Event
+ * The type number of the TLV field containing the error.
  */
-void NetworkGraph_handle_network_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNetworkUpdate *NONNULL_PTR network_update);
+uint64_t ErroneousField_get_tlv_fieldnum(const struct LDKErroneousField *NONNULL_PTR this_ptr);
 
 /**
- * Gets the genesis hash for this network graph.
+ * The type number of the TLV field containing the error.
  */
-MUST_USE_RES struct LDKThirtyTwoBytes NetworkGraph_get_genesis_hash(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+void ErroneousField_set_tlv_fieldnum(struct LDKErroneousField *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Verifies the signature of a [`NodeAnnouncement`].
+ * A value to use for the TLV field to avoid the error.
  *
- * Returns an error if it is invalid.
+ * Returns a copy of the field.
  */
-struct LDKCResult_NoneLightningErrorZ verify_node_announcement(const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+struct LDKCOption_CVec_u8ZZ ErroneousField_get_suggested_value(const struct LDKErroneousField *NONNULL_PTR this_ptr);
 
 /**
- * Verifies all signatures included in a [`ChannelAnnouncement`].
- *
- * Returns an error if one of the signatures is invalid.
+ * A value to use for the TLV field to avoid the error.
  */
-struct LDKCResult_NoneLightningErrorZ verify_channel_announcement(const struct LDKChannelAnnouncement *NONNULL_PTR msg);
+void ErroneousField_set_suggested_value(struct LDKErroneousField *NONNULL_PTR this_ptr, struct LDKCOption_CVec_u8ZZ val);
 
 /**
- * Constructs a new RoutingMessageHandler which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned RoutingMessageHandler must be freed before this_arg is
+ * Constructs a new ErroneousField given each field
  */
-struct LDKRoutingMessageHandler P2PGossipSync_as_RoutingMessageHandler(const struct LDKP2PGossipSync *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKErroneousField ErroneousField_new(uint64_t tlv_fieldnum_arg, struct LDKCOption_CVec_u8ZZ suggested_value_arg);
 
 /**
- * Constructs a new MessageSendEventsProvider which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned MessageSendEventsProvider must be freed before this_arg is
+ * Creates a copy of the ErroneousField
  */
-struct LDKMessageSendEventsProvider P2PGossipSync_as_MessageSendEventsProvider(const struct LDKP2PGossipSync *NONNULL_PTR this_arg);
+struct LDKErroneousField ErroneousField_clone(const struct LDKErroneousField *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the ChannelUpdateInfo, if is_owned is set and inner is non-NULL.
+ * Creates an [`InvoiceError`] with the given message.
  */
-void ChannelUpdateInfo_free(struct LDKChannelUpdateInfo this_obj);
+MUST_USE_RES struct LDKInvoiceError InvoiceError_from_string(struct LDKStr s);
 
 /**
- * When the last update to the channel direction was issued.
- * Value is opaque, as set in the announcement.
+ * Serialize the InvoiceError object into a byte array which can be read by InvoiceError_read
  */
-uint32_t ChannelUpdateInfo_get_last_update(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z InvoiceError_write(const struct LDKInvoiceError *NONNULL_PTR obj);
 
 /**
- * When the last update to the channel direction was issued.
- * Value is opaque, as set in the announcement.
+ * Read a InvoiceError from a byte array, created by InvoiceError_write
  */
-void ChannelUpdateInfo_set_last_update(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint32_t val);
+struct LDKCResult_InvoiceErrorDecodeErrorZ InvoiceError_read(struct LDKu8slice ser);
 
 /**
- * Whether the channel can be currently used for payments (in this one direction).
+ * Frees any resources used by the InvoiceRequestWithExplicitPayerIdBuilder, if is_owned is set and inner is non-NULL.
  */
-bool ChannelUpdateInfo_get_enabled(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+void InvoiceRequestWithExplicitPayerIdBuilder_free(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_obj);
 
 /**
- * Whether the channel can be currently used for payments (in this one direction).
+ * Frees any resources used by the InvoiceRequestWithDerivedPayerIdBuilder, if is_owned is set and inner is non-NULL.
  */
-void ChannelUpdateInfo_set_enabled(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, bool val);
+void InvoiceRequestWithDerivedPayerIdBuilder_free(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_obj);
 
 /**
- * The difference in CLTV values that you must have when routing through this channel.
+ * Builds an unsigned [`InvoiceRequest`] after checking for valid semantics. It can be signed
+ * by [`UnsignedInvoiceRequest::sign`].
  */
-uint16_t ChannelUpdateInfo_get_cltv_expiry_delta(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCResult_UnsignedInvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_build(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg);
 
 /**
- * The difference in CLTV values that you must have when routing through this channel.
+ * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported
+ * by the offer.
+ *
+ * Successive calls to this method will override the previous setting.
  */
-void ChannelUpdateInfo_set_cltv_expiry_delta(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint16_t val);
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_chain(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, enum LDKNetwork network);
 
 /**
- * The minimum value, which must be relayed to the next hop via the channel
+ * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is
+ * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]).
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`quantity`]: Self::quantity
  */
-uint64_t ChannelUpdateInfo_get_htlc_minimum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t amount_msats);
 
 /**
- * The minimum value, which must be relayed to the next hop via the channel
+ * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity`
+ * does not conform to [`Offer::is_valid_quantity`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-void ChannelUpdateInfo_set_htlc_minimum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint64_t val);
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithExplicitPayerIdBuilder_quantity(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, uint64_t quantity);
 
 /**
- * The maximum value which may be relayed to the next hop via the channel.
+ * Sets the [`InvoiceRequest::payer_note`].
+ *
+ * Successive calls to this method will override the previous setting.
  */
-uint64_t ChannelUpdateInfo_get_htlc_maximum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES void InvoiceRequestWithExplicitPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithExplicitPayerIdBuilder this_arg, struct LDKStr payer_note);
 
 /**
- * The maximum value which may be relayed to the next hop via the channel.
+ * Builds a signed [`InvoiceRequest`] after checking for valid semantics.
  */
-void ChannelUpdateInfo_set_htlc_maximum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint64_t val);
+MUST_USE_RES struct LDKCResult_InvoiceRequestBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_build_and_sign(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg);
 
 /**
- * Fees charged when the channel is used for routing
+ * Sets the [`InvoiceRequest::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed. Errors if the chain for `network` is not supported
+ * by the offer.
+ *
+ * Successive calls to this method will override the previous setting.
  */
-struct LDKRoutingFees ChannelUpdateInfo_get_fees(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_chain(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, enum LDKNetwork network);
 
 /**
- * Fees charged when the channel is used for routing
+ * Sets the [`InvoiceRequest::amount_msats`] for paying an invoice. Errors if `amount_msats` is
+ * not at least the expected invoice amount (i.e., [`Offer::amount`] times [`quantity`]).
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`quantity`]: Self::quantity
  */
-void ChannelUpdateInfo_set_fees(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_amount_msats(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t amount_msats);
 
 /**
- * Most recent update for the channel received from the network
- * Mostly redundant with the data we store in fields explicitly.
- * Everything else is useful only for sending out for initial routing sync.
- * Not stored if contains excess data to prevent DoS.
+ * Sets [`InvoiceRequest::quantity`] of items. If not set, `1` is assumed. Errors if `quantity`
+ * does not conform to [`Offer::is_valid_quantity`].
  *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Successive calls to this method will override the previous setting.
  */
-struct LDKChannelUpdate ChannelUpdateInfo_get_last_update_message(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCResult_NoneBolt12SemanticErrorZ InvoiceRequestWithDerivedPayerIdBuilder_quantity(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, uint64_t quantity);
 
 /**
- * Most recent update for the channel received from the network
- * Mostly redundant with the data we store in fields explicitly.
- * Everything else is useful only for sending out for initial routing sync.
- * Not stored if contains excess data to prevent DoS.
+ * Sets the [`InvoiceRequest::payer_note`].
  *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Successive calls to this method will override the previous setting.
  */
-void ChannelUpdateInfo_set_last_update_message(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
+MUST_USE_RES void InvoiceRequestWithDerivedPayerIdBuilder_payer_note(struct LDKInvoiceRequestWithDerivedPayerIdBuilder this_arg, struct LDKStr payer_note);
 
 /**
- * Constructs a new ChannelUpdateInfo given each field
+ * Frees any resources used by the UnsignedInvoiceRequest, if is_owned is set and inner is non-NULL.
  */
-MUST_USE_RES struct LDKChannelUpdateInfo ChannelUpdateInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
+void UnsignedInvoiceRequest_free(struct LDKUnsignedInvoiceRequest this_obj);
 
 /**
- * Creates a copy of the ChannelUpdateInfo
+ * Creates a copy of the UnsignedInvoiceRequest
  */
-struct LDKChannelUpdateInfo ChannelUpdateInfo_clone(const struct LDKChannelUpdateInfo *NONNULL_PTR orig);
+struct LDKUnsignedInvoiceRequest UnsignedInvoiceRequest_clone(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR orig);
 
 /**
- * Checks if two ChannelUpdateInfos contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Calls the free function if one is set
  */
-bool ChannelUpdateInfo_eq(const struct LDKChannelUpdateInfo *NONNULL_PTR a, const struct LDKChannelUpdateInfo *NONNULL_PTR b);
+void SignInvoiceRequestFn_free(struct LDKSignInvoiceRequestFn this_ptr);
 
 /**
- * Serialize the ChannelUpdateInfo object into a byte array which can be read by ChannelUpdateInfo_read
+ * Returns the [`TaggedHash`] of the invoice to sign.
  */
-struct LDKCVec_u8Z ChannelUpdateInfo_write(const struct LDKChannelUpdateInfo *NONNULL_PTR obj);
+MUST_USE_RES struct LDKTaggedHash UnsignedInvoiceRequest_tagged_hash(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Read a ChannelUpdateInfo from a byte array, created by ChannelUpdateInfo_write
+ * Frees any resources used by the InvoiceRequest, if is_owned is set and inner is non-NULL.
  */
-struct LDKCResult_ChannelUpdateInfoDecodeErrorZ ChannelUpdateInfo_read(struct LDKu8slice ser);
+void InvoiceRequest_free(struct LDKInvoiceRequest this_obj);
 
 /**
- * Frees any resources used by the ChannelInfo, if is_owned is set and inner is non-NULL.
+ * Creates a copy of the InvoiceRequest
  */
-void ChannelInfo_free(struct LDKChannelInfo this_obj);
+struct LDKInvoiceRequest InvoiceRequest_clone(const struct LDKInvoiceRequest *NONNULL_PTR orig);
 
 /**
- * Protocol features of a channel communicated during its announcement
+ * Frees any resources used by the VerifiedInvoiceRequest, if is_owned is set and inner is non-NULL.
  */
-struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+void VerifiedInvoiceRequest_free(struct LDKVerifiedInvoiceRequest this_obj);
 
 /**
- * Protocol features of a channel communicated during its announcement
+ * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made.
  */
-void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
+struct LDKOfferId VerifiedInvoiceRequest_get_offer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr);
 
 /**
- * Source node of the first direction of a channel
+ * The identifier of the [`Offer`] for which the [`InvoiceRequest`] was made.
  */
-struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+void VerifiedInvoiceRequest_set_offer_id(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKOfferId val);
 
 /**
- * Source node of the first direction of a channel
+ * Keys used for signing a [`Bolt12Invoice`] if they can be derived.
+ *
+ * If `Some`, must call [`respond_using_derived_keys`] when responding. Otherwise, call
+ * [`respond_with`].
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`respond_using_derived_keys`]: Self::respond_using_derived_keys
+ * [`respond_with`]: Self::respond_with
  */
-void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
+struct LDKCOption_SecretKeyZ VerifiedInvoiceRequest_get_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr);
 
 /**
- * Details about the first direction of a channel
+ * Keys used for signing a [`Bolt12Invoice`] if they can be derived.
  *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * If `Some`, must call [`respond_using_derived_keys`] when responding. Otherwise, call
+ * [`respond_with`].
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`respond_using_derived_keys`]: Self::respond_using_derived_keys
+ * [`respond_with`]: Self::respond_with
  */
-struct LDKChannelUpdateInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+void VerifiedInvoiceRequest_set_keys(struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_ptr, struct LDKCOption_SecretKeyZ val);
 
 /**
- * Details about the first direction of a channel
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Creates a copy of the VerifiedInvoiceRequest
  */
-void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdateInfo val);
+struct LDKVerifiedInvoiceRequest VerifiedInvoiceRequest_clone(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR orig);
 
 /**
- * Source node of the second direction of a channel
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
  */
-struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ UnsignedInvoiceRequest_chains(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Source node of the second direction of a channel
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
  */
-void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ UnsignedInvoiceRequest_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Details about the second direction of a channel
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * The minimum amount required for a successful payment of a single item.
  */
-struct LDKChannelUpdateInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCOption_AmountZ UnsignedInvoiceRequest_amount(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Details about the second direction of a channel
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
  *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdateInfo val);
+MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_description(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * The channel capacity as seen on-chain, if chain lookup is available.
+ * Features pertaining to the offer.
  */
-struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKOfferFeatures UnsignedInvoiceRequest_offer_features(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * The channel capacity as seen on-chain, if chain lookup is available.
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
  */
-void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+MUST_USE_RES struct LDKCOption_u64Z UnsignedInvoiceRequest_absolute_expiry(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * An initial announcement of the channel
- * Mostly redundant with the data we store in fields explicitly.
- * Everything else is useful only for sending out for initial routing sync.
- * Not stored if contains excess data to prevent DoS.
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
  *
  * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_issuer(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * An initial announcement of the channel
- * Mostly redundant with the data we store in fields explicitly.
- * Everything else is useful only for sending out for initial routing sync.
- * Not stored if contains excess data to prevent DoS.
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ UnsignedInvoiceRequest_paths(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of items supported.
+ */
+MUST_USE_RES struct LDKQuantity UnsignedInvoiceRequest_supported_quantity(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The public key used by the recipient to sign invoices.
  *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
+MUST_USE_RES struct LDKPublicKey UnsignedInvoiceRequest_signing_pubkey(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the ChannelInfo
+ * An unpredictable series of bytes, typically containing information about the derivation of
+ * [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
  */
-struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
+MUST_USE_RES struct LDKu8slice UnsignedInvoiceRequest_payer_metadata(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Checks if two ChannelInfos contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * A chain from [`Offer::chains`] that the offer is valid for.
  */
-bool ChannelInfo_eq(const struct LDKChannelInfo *NONNULL_PTR a, const struct LDKChannelInfo *NONNULL_PTR b);
+MUST_USE_RES struct LDKThirtyTwoBytes UnsignedInvoiceRequest_chain(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Returns a [`ChannelUpdateInfo`] based on the direction implied by the channel_flag.
+ * The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
+ * must be greater than or equal to [`Offer::amount`], converted if necessary.
+ *
+ * [`chain`]: Self::chain
+ */
+MUST_USE_RES struct LDKCOption_u64Z UnsignedInvoiceRequest_amount_msats(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to requesting an invoice.
+ */
+MUST_USE_RES struct LDKInvoiceRequestFeatures UnsignedInvoiceRequest_invoice_request_features(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+MUST_USE_RES struct LDKCOption_u64Z UnsignedInvoiceRequest_quantity(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+MUST_USE_RES struct LDKPublicKey UnsignedInvoiceRequest_payer_id(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response.
  *
  * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKChannelUpdateInfo ChannelInfo_get_directional_info(const struct LDKChannelInfo *NONNULL_PTR this_arg, uint8_t channel_flags);
+MUST_USE_RES struct LDKPrintableString UnsignedInvoiceRequest_payer_note(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Serialize the ChannelInfo object into a byte array which can be read by ChannelInfo_read
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
  */
-struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
+MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ InvoiceRequest_chains(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Read a ChannelInfo from a byte array, created by ChannelInfo_write
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
  */
-struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ InvoiceRequest_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the DirectedChannelInfo, if is_owned is set and inner is non-NULL.
+ * The minimum amount required for a successful payment of a single item.
  */
-void DirectedChannelInfo_free(struct LDKDirectedChannelInfo this_obj);
+MUST_USE_RES struct LDKCOption_AmountZ InvoiceRequest_amount(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the DirectedChannelInfo
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKDirectedChannelInfo DirectedChannelInfo_clone(const struct LDKDirectedChannelInfo *NONNULL_PTR orig);
+MUST_USE_RES struct LDKPrintableString InvoiceRequest_description(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Returns information for the channel.
+ * Features pertaining to the offer.
  */
-MUST_USE_RES struct LDKChannelInfo DirectedChannelInfo_channel(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKOfferFeatures InvoiceRequest_offer_features(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Returns the maximum HTLC amount allowed over the channel in the direction.
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
  */
-MUST_USE_RES uint64_t DirectedChannelInfo_htlc_maximum_msat(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_absolute_expiry(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Returns the [`EffectiveCapacity`] of the channel in the direction.
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
  *
- * This is either the total capacity from the funding transaction, if known, or the
- * `htlc_maximum_msat` for the direction as advertised by the gossip network, if known,
- * otherwise.
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKEffectiveCapacity DirectedChannelInfo_effective_capacity(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKPrintableString InvoiceRequest_issuer(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the EffectiveCapacity
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
  */
-void EffectiveCapacity_free(struct LDKEffectiveCapacity this_ptr);
+MUST_USE_RES struct LDKCVec_BlindedPathZ InvoiceRequest_paths(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the EffectiveCapacity
+ * The quantity of items supported.
  */
-struct LDKEffectiveCapacity EffectiveCapacity_clone(const struct LDKEffectiveCapacity *NONNULL_PTR orig);
+MUST_USE_RES struct LDKQuantity InvoiceRequest_supported_quantity(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new ExactLiquidity-variant EffectiveCapacity
+ * The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKEffectiveCapacity EffectiveCapacity_exact_liquidity(uint64_t liquidity_msat);
+MUST_USE_RES struct LDKPublicKey InvoiceRequest_signing_pubkey(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new AdvertisedMaxHTLC-variant EffectiveCapacity
+ * An unpredictable series of bytes, typically containing information about the derivation of
+ * [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
  */
-struct LDKEffectiveCapacity EffectiveCapacity_advertised_max_htlc(uint64_t amount_msat);
+MUST_USE_RES struct LDKu8slice InvoiceRequest_payer_metadata(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new Total-variant EffectiveCapacity
+ * A chain from [`Offer::chains`] that the offer is valid for.
  */
-struct LDKEffectiveCapacity EffectiveCapacity_total(uint64_t capacity_msat, uint64_t htlc_maximum_msat);
+MUST_USE_RES struct LDKThirtyTwoBytes InvoiceRequest_chain(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new Infinite-variant EffectiveCapacity
+ * The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
+ * must be greater than or equal to [`Offer::amount`], converted if necessary.
+ *
+ * [`chain`]: Self::chain
  */
-struct LDKEffectiveCapacity EffectiveCapacity_infinite(void);
+MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_amount_msats(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new HintMaxHTLC-variant EffectiveCapacity
+ * Features pertaining to requesting an invoice.
  */
-struct LDKEffectiveCapacity EffectiveCapacity_hint_max_htlc(uint64_t amount_msat);
+MUST_USE_RES struct LDKInvoiceRequestFeatures InvoiceRequest_invoice_request_features(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new Unknown-variant EffectiveCapacity
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
  */
-struct LDKEffectiveCapacity EffectiveCapacity_unknown(void);
+MUST_USE_RES struct LDKCOption_u64Z InvoiceRequest_quantity(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Returns the effective capacity denominated in millisatoshi.
+ * A possibly transient pubkey used to sign the invoice request.
  */
-MUST_USE_RES uint64_t EffectiveCapacity_as_msat(const struct LDKEffectiveCapacity *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKPublicKey InvoiceRequest_payer_id(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the RoutingFees, if is_owned is set and inner is non-NULL.
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void RoutingFees_free(struct LDKRoutingFees this_obj);
+MUST_USE_RES struct LDKPrintableString InvoiceRequest_payer_note(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Flat routing fee in millisatoshis.
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the
+ * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
+ *
+ * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned
+ * creation time is used for the `created_at` parameter.
+ *
+ * [`Duration`]: core::time::Duration
  */
-uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
 
 /**
- * Flat routing fee in millisatoshis.
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields.
+ *
+ * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
+ * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds
+ * where [`std::time::SystemTime`] is not available.
+ *
+ * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment
+ * for the invoice.
+ *
+ * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
+ * must contain one or more elements ordered from most-preferred to least-preferred, if there's
+ * a preference. Note, however, that any privacy is lost if a public node id was used for
+ * [`Offer::signing_pubkey`].
+ *
+ * Errors if the request contains unknown required features.
+ *
+ * # Note
+ *
+ * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`],
+ * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead.
+ *
+ * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at
+ * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey
  */
-void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
+MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ InvoiceRequest_respond_with_no_std(const struct LDKInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
 
 /**
- * Liquidity-based routing fee in millionths of a routed amount.
- * In other words, 10000 is 1%.
+ * Verifies that the request was for an offer created using the given key. Returns the verified
+ * request which contains the derived keys needed to sign a [`Bolt12Invoice`] for the request
+ * if they could be extracted from the metadata.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
  */
-uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCResult_VerifiedInvoiceRequestNoneZ InvoiceRequest_verify(struct LDKInvoiceRequest this_arg, const struct LDKExpandedKey *NONNULL_PTR key);
 
 /**
- * Liquidity-based routing fee in millionths of a routed amount.
- * In other words, 10000 is 1%.
+ * Signature of the invoice request using [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
  */
-void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
+MUST_USE_RES struct LDKSchnorrSignature InvoiceRequest_signature(const struct LDKInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Constructs a new RoutingFees given each field
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
  */
-MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
+MUST_USE_RES struct LDKCVec_ThirtyTwoBytesZ VerifiedInvoiceRequest_chains(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Checks if two RoutingFeess contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
  */
-bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ VerifiedInvoiceRequest_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the RoutingFees
+ * The minimum amount required for a successful payment of a single item.
  */
-struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
+MUST_USE_RES struct LDKCOption_AmountZ VerifiedInvoiceRequest_amount(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the RoutingFees.
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
+MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_description(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Serialize the RoutingFees object into a byte array which can be read by RoutingFees_read
+ * Features pertaining to the offer.
  */
-struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
+MUST_USE_RES struct LDKOfferFeatures VerifiedInvoiceRequest_offer_features(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Read a RoutingFees from a byte array, created by RoutingFees_write
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
  */
-struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
+MUST_USE_RES struct LDKCOption_u64Z VerifiedInvoiceRequest_absolute_expiry(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the NodeAnnouncementInfo, if is_owned is set and inner is non-NULL.
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
+MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_issuer(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Protocol features the node announced support for
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
  */
-struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCVec_BlindedPathZ VerifiedInvoiceRequest_paths(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Protocol features the node announced support for
+ * The quantity of items supported.
  */
-void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
+MUST_USE_RES struct LDKQuantity VerifiedInvoiceRequest_supported_quantity(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * When the last known update to the node state was issued.
- * Value is opaque, as set in the announcement.
+ * The public key used by the recipient to sign invoices.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKPublicKey VerifiedInvoiceRequest_signing_pubkey(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * When the last known update to the node state was issued.
- * Value is opaque, as set in the announcement.
+ * An unpredictable series of bytes, typically containing information about the derivation of
+ * [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
  */
-void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
+MUST_USE_RES struct LDKu8slice VerifiedInvoiceRequest_payer_metadata(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Color assigned to the node
+ * A chain from [`Offer::chains`] that the offer is valid for.
  */
-const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
+MUST_USE_RES struct LDKThirtyTwoBytes VerifiedInvoiceRequest_chain(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Color assigned to the node
+ * The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
+ * must be greater than or equal to [`Offer::amount`], converted if necessary.
+ *
+ * [`chain`]: Self::chain
  */
-void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
+MUST_USE_RES struct LDKCOption_u64Z VerifiedInvoiceRequest_amount_msats(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Moniker assigned to the node.
- * May be invalid or malicious (eg control chars),
- * should not be exposed to the user.
+ * Features pertaining to requesting an invoice.
  */
-struct LDKNodeAlias NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKInvoiceRequestFeatures VerifiedInvoiceRequest_invoice_request_features(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * Moniker assigned to the node.
- * May be invalid or malicious (eg control chars),
- * should not be exposed to the user.
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
  */
-void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAlias val);
+MUST_USE_RES struct LDKCOption_u64Z VerifiedInvoiceRequest_quantity(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * An initial announcement of the node
- * Mostly redundant with the data we store in fields explicitly.
- * Everything else is useful only for sending out for initial routing sync.
- * Not stored if contains excess data to prevent DoS.
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+MUST_USE_RES struct LDKPublicKey VerifiedInvoiceRequest_payer_id(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response.
  *
  * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKPrintableString VerifiedInvoiceRequest_payer_note(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);
 
 /**
- * An initial announcement of the node
- * Mostly redundant with the data we store in fields explicitly.
- * Everything else is useful only for sending out for initial routing sync.
- * Not stored if contains excess data to prevent DoS.
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields and using the
+ * [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
+ *
+ * See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned
+ * creation time is used for the `created_at` parameter.
+ *
+ * [`Duration`]: core::time::Duration
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request with the given required fields.
+ *
+ * Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
+ * `created_at`, which is used to set [`Bolt12Invoice::created_at`]. Useful for `no-std` builds
+ * where [`std::time::SystemTime`] is not available.
+ *
+ * The caller is expected to remember the preimage of `payment_hash` in order to claim a payment
+ * for the invoice.
+ *
+ * The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
+ * must contain one or more elements ordered from most-preferred to least-preferred, if there's
+ * a preference. Note, however, that any privacy is lost if a public node id was used for
+ * [`Offer::signing_pubkey`].
+ *
+ * Errors if the request contains unknown required features.
+ *
+ * # Note
+ *
+ * If the originating [`Offer`] was created using [`OfferBuilder::deriving_signing_pubkey`],
+ * then use [`InvoiceRequest::verify`] and [`VerifiedInvoiceRequest`] methods instead.
+ *
+ * [`Bolt12Invoice::created_at`]: crate::offers::invoice::Bolt12Invoice::created_at
+ * [`OfferBuilder::deriving_signing_pubkey`]: crate::offers::offer::OfferBuilder::deriving_signing_pubkey
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_with_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses
+ * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use
+ * the same [`ExpandedKey`] as the one used to create the offer.
+ *
+ * See [`InvoiceRequest::respond_with`] for further details.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash);
+
+/**
+ * Creates an [`InvoiceBuilder`] for the request using the given required fields and that uses
+ * derived signing keys from the originating [`Offer`] to sign the [`Bolt12Invoice`]. Must use
+ * the same [`ExpandedKey`] as the one used to create the offer.
+ *
+ * See [`InvoiceRequest::respond_with_no_std`] for further details.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ */
+MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);
+
+/**
+ * Serialize the UnsignedInvoiceRequest object into a byte array which can be read by UnsignedInvoiceRequest_read
+ */
+struct LDKCVec_u8Z UnsignedInvoiceRequest_write(const struct LDKUnsignedInvoiceRequest *NONNULL_PTR obj);
+
+/**
+ * Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read
+ */
+struct LDKCVec_u8Z InvoiceRequest_write(const struct LDKInvoiceRequest *NONNULL_PTR obj);
+
+/**
+ * Frees any resources used by the InvoiceRequestFields, if is_owned is set and inner is non-NULL.
+ */
+void InvoiceRequestFields_free(struct LDKInvoiceRequestFields this_obj);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+struct LDKPublicKey InvoiceRequestFields_get_payer_id(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+
+/**
+ * A possibly transient pubkey used to sign the invoice request.
+ */
+void InvoiceRequestFields_set_payer_id(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+struct LDKCOption_u64Z InvoiceRequestFields_get_quantity(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+
+/**
+ * The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
+ */
+void InvoiceRequestFields_set_quantity(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response. Truncated to [`PAYER_NOTE_LIMIT`] characters.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKUntrustedString InvoiceRequestFields_get_payer_note_truncated(const struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr);
+
+/**
+ * A payer-provided note which will be seen by the recipient and reflected back in the invoice
+ * response. Truncated to [`PAYER_NOTE_LIMIT`] characters.
  *
  * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
+void InvoiceRequestFields_set_payer_note_truncated(struct LDKInvoiceRequestFields *NONNULL_PTR this_ptr, struct LDKUntrustedString val);
 
 /**
- * Constructs a new NodeAnnouncementInfo given each field
+ * Constructs a new InvoiceRequestFields given each field
+ *
+ * Note that payer_note_truncated_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKNodeFeatures features_arg, uint32_t last_update_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKNodeAnnouncement announcement_message_arg);
+MUST_USE_RES struct LDKInvoiceRequestFields InvoiceRequestFields_new(struct LDKPublicKey payer_id_arg, struct LDKCOption_u64Z quantity_arg, struct LDKUntrustedString payer_note_truncated_arg);
 
 /**
- * Creates a copy of the NodeAnnouncementInfo
+ * Creates a copy of the InvoiceRequestFields
  */
-struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
+struct LDKInvoiceRequestFields InvoiceRequestFields_clone(const struct LDKInvoiceRequestFields *NONNULL_PTR orig);
 
 /**
- * Checks if two NodeAnnouncementInfos contain equal inner contents.
+ * Checks if two InvoiceRequestFieldss contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
  * Two objects with NULL inner values will be considered "equal" here.
  */
-bool NodeAnnouncementInfo_eq(const struct LDKNodeAnnouncementInfo *NONNULL_PTR a, const struct LDKNodeAnnouncementInfo *NONNULL_PTR b);
+bool InvoiceRequestFields_eq(const struct LDKInvoiceRequestFields *NONNULL_PTR a, const struct LDKInvoiceRequestFields *NONNULL_PTR b);
 
 /**
- * Internet-level addresses via which one can connect to the node
+ * Serialize the InvoiceRequestFields object into a byte array which can be read by InvoiceRequestFields_read
  */
-MUST_USE_RES struct LDKCVec_NetAddressZ NodeAnnouncementInfo_addresses(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_arg);
+struct LDKCVec_u8Z InvoiceRequestFields_write(const struct LDKInvoiceRequestFields *NONNULL_PTR obj);
 
 /**
- * Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
+ * Read a InvoiceRequestFields from a byte array, created by InvoiceRequestFields_write
  */
-struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
+struct LDKCResult_InvoiceRequestFieldsDecodeErrorZ InvoiceRequestFields_read(struct LDKu8slice ser);
 
 /**
- * Read a NodeAnnouncementInfo from a byte array, created by NodeAnnouncementInfo_write
+ * Frees any resources used by the TaggedHash, if is_owned is set and inner is non-NULL.
  */
-struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
+void TaggedHash_free(struct LDKTaggedHash this_obj);
 
 /**
- * Frees any resources used by the NodeAlias, if is_owned is set and inner is non-NULL.
+ * Creates a copy of the TaggedHash
  */
-void NodeAlias_free(struct LDKNodeAlias this_obj);
+struct LDKTaggedHash TaggedHash_clone(const struct LDKTaggedHash *NONNULL_PTR orig);
 
-const uint8_t (*NodeAlias_get_a(const struct LDKNodeAlias *NONNULL_PTR this_ptr))[32];
+/**
+ * Returns the digest to sign.
+ */
+MUST_USE_RES const uint8_t (*TaggedHash_as_digest(const struct LDKTaggedHash *NONNULL_PTR this_arg))[32];
 
-void NodeAlias_set_a(struct LDKNodeAlias *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+/**
+ * Returns the tag used in the tagged hash.
+ */
+MUST_USE_RES struct LDKStr TaggedHash_tag(const struct LDKTaggedHash *NONNULL_PTR this_arg);
+
+/**
+ * Returns the merkle root used in the tagged hash.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes TaggedHash_merkle_root(const struct LDKTaggedHash *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the SignError
+ */
+void SignError_free(struct LDKSignError this_ptr);
+
+/**
+ * Creates a copy of the SignError
+ */
+struct LDKSignError SignError_clone(const struct LDKSignError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Signing-variant SignError
+ */
+struct LDKSignError SignError_signing(void);
+
+/**
+ * Utility method to constructs a new Verification-variant SignError
+ */
+struct LDKSignError SignError_verification(enum LDKSecp256k1Error a);
+
+/**
+ * Frees any resources used by the Bolt12ParseError, if is_owned is set and inner is non-NULL.
+ */
+void Bolt12ParseError_free(struct LDKBolt12ParseError this_obj);
+
+/**
+ * Creates a copy of the Bolt12ParseError
+ */
+struct LDKBolt12ParseError Bolt12ParseError_clone(const struct LDKBolt12ParseError *NONNULL_PTR orig);
+
+/**
+ * Creates a copy of the Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_clone(const enum LDKBolt12SemanticError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new AlreadyExpired-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_already_expired(void);
+
+/**
+ * Utility method to constructs a new UnsupportedChain-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unsupported_chain(void);
+
+/**
+ * Utility method to constructs a new UnexpectedChain-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_chain(void);
+
+/**
+ * Utility method to constructs a new MissingAmount-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_amount(void);
+
+/**
+ * Utility method to constructs a new InvalidAmount-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_amount(void);
+
+/**
+ * Utility method to constructs a new InsufficientAmount-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_insufficient_amount(void);
+
+/**
+ * Utility method to constructs a new UnexpectedAmount-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_amount(void);
+
+/**
+ * Utility method to constructs a new UnsupportedCurrency-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unsupported_currency(void);
+
+/**
+ * Utility method to constructs a new UnknownRequiredFeatures-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unknown_required_features(void);
+
+/**
+ * Utility method to constructs a new UnexpectedFeatures-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_features(void);
+
+/**
+ * Utility method to constructs a new MissingDescription-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_description(void);
+
+/**
+ * Utility method to constructs a new MissingSigningPubkey-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_signing_pubkey(void);
+
+/**
+ * Utility method to constructs a new InvalidSigningPubkey-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_signing_pubkey(void);
+
+/**
+ * Utility method to constructs a new UnexpectedSigningPubkey-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_signing_pubkey(void);
+
+/**
+ * Utility method to constructs a new MissingQuantity-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_quantity(void);
+
+/**
+ * Utility method to constructs a new InvalidQuantity-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_quantity(void);
+
+/**
+ * Utility method to constructs a new UnexpectedQuantity-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_quantity(void);
+
+/**
+ * Utility method to constructs a new InvalidMetadata-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_metadata(void);
+
+/**
+ * Utility method to constructs a new UnexpectedMetadata-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_metadata(void);
+
+/**
+ * Utility method to constructs a new MissingPayerMetadata-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_metadata(void);
+
+/**
+ * Utility method to constructs a new MissingPayerId-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_payer_id(void);
+
+/**
+ * Utility method to constructs a new DuplicatePaymentId-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_duplicate_payment_id(void);
+
+/**
+ * Utility method to constructs a new MissingPaths-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_paths(void);
+
+/**
+ * Utility method to constructs a new UnexpectedPaths-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_unexpected_paths(void);
+
+/**
+ * Utility method to constructs a new InvalidPayInfo-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_invalid_pay_info(void);
+
+/**
+ * Utility method to constructs a new MissingCreationTime-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_creation_time(void);
+
+/**
+ * Utility method to constructs a new MissingPaymentHash-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_payment_hash(void);
+
+/**
+ * Utility method to constructs a new MissingSignature-variant Bolt12SemanticError
+ */
+enum LDKBolt12SemanticError Bolt12SemanticError_missing_signature(void);
+
+/**
+ * Frees any resources used by the RefundMaybeWithDerivedMetadataBuilder, if is_owned is set and inner is non-NULL.
+ */
+void RefundMaybeWithDerivedMetadataBuilder_free(struct LDKRefundMaybeWithDerivedMetadataBuilder this_obj);
+
+/**
+ * Creates a copy of the RefundMaybeWithDerivedMetadataBuilder
+ */
+struct LDKRefundMaybeWithDerivedMetadataBuilder RefundMaybeWithDerivedMetadataBuilder_clone(const struct LDKRefundMaybeWithDerivedMetadataBuilder *NONNULL_PTR orig);
+
+/**
+ * Creates a new builder for a refund using the [`Refund::payer_id`] for the public node id to
+ * send to if no [`Refund::paths`] are set. Otherwise, it may be a transient pubkey.
+ *
+ * Additionally, sets the required (empty) [`Refund::description`], [`Refund::payer_metadata`],
+ * and [`Refund::amount_msats`].
+ *
+ * # Note
+ *
+ * If constructing a [`Refund`] for use with a [`ChannelManager`], use
+ * [`ChannelManager::create_refund_builder`] instead of [`RefundBuilder::new`].
+ *
+ * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
+ * [`ChannelManager::create_refund_builder`]: crate::ln::channelmanager::ChannelManager::create_refund_builder
+ */
+MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_new(struct LDKCVec_u8Z metadata, struct LDKPublicKey payer_id, uint64_t amount_msats);
+
+/**
+ * Similar to [`RefundBuilder::new`] except, if [`RefundBuilder::path`] is called, the payer id
+ * is derived from the given [`ExpandedKey`] and nonce. This provides sender privacy by using a
+ * different payer id for each refund, assuming a different nonce is used.  Otherwise, the
+ * provided `node_id` is used for the payer id.
+ *
+ * Also, sets the metadata when [`RefundBuilder::build`] is called such that it can be used to
+ * verify that an [`InvoiceRequest`] was produced for the refund given an [`ExpandedKey`].
+ *
+ * The `payment_id` is encrypted in the metadata and should be unique. This ensures that only
+ * one invoice will be paid for the refund and that payments can be uniquely identified.
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
+ */
+MUST_USE_RES struct LDKCResult_RefundMaybeWithDerivedMetadataBuilderBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_deriving_payer_id(struct LDKPublicKey node_id, const struct LDKExpandedKey *NONNULL_PTR expanded_key, struct LDKEntropySource entropy_source, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id);
+
+/**
+ * Sets the [`Refund::description`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_description(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr description);
+
+/**
+ * Sets the [`Refund::absolute_expiry`] as seconds since the Unix epoch. Any expiry that has
+ * already passed is valid and can be checked for using [`Refund::is_expired`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_absolute_expiry(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t absolute_expiry);
+
+/**
+ * Sets the [`Refund::issuer`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_issuer(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr issuer);
+
+/**
+ * Adds a blinded path to [`Refund::paths`]. Must include at least one path if only connected
+ * by private channels or if [`Refund::payer_id`] is not a public node id.
+ *
+ * Successive calls to this method will add another blinded path. Caller is responsible for not
+ * adding duplicate paths.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_path(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKBlindedPath path);
+
+/**
+ * Sets the [`Refund::chain`] of the given [`Network`] for paying an invoice. If not
+ * called, [`Network::Bitcoin`] is assumed.
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_chain(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, enum LDKNetwork network);
+
+/**
+ * Sets [`Refund::quantity`] of items. This is purely for informational purposes. It is useful
+ * when the refund pertains to a [`Bolt12Invoice`] that paid for more than one item from an
+ * [`Offer`] as specified by [`InvoiceRequest::quantity`].
+ *
+ * Successive calls to this method will override the previous setting.
+ *
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
+ * [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
+ * [`Offer`]: crate::offers::offer::Offer
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_quantity(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, uint64_t quantity);
+
+/**
+ * Sets the [`Refund::payer_note`].
+ *
+ * Successive calls to this method will override the previous setting.
+ */
+MUST_USE_RES void RefundMaybeWithDerivedMetadataBuilder_payer_note(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg, struct LDKStr payer_note);
+
+/**
+ * Builds a [`Refund`] after checking for valid semantics.
+ */
+MUST_USE_RES struct LDKCResult_RefundBolt12SemanticErrorZ RefundMaybeWithDerivedMetadataBuilder_build(struct LDKRefundMaybeWithDerivedMetadataBuilder this_arg);
+
+/**
+ * Frees any resources used by the Refund, if is_owned is set and inner is non-NULL.
+ */
+void Refund_free(struct LDKRefund this_obj);
+
+/**
+ * Creates a copy of the Refund
+ */
+struct LDKRefund Refund_clone(const struct LDKRefund *NONNULL_PTR orig);
+
+/**
+ * A complete description of the purpose of the refund. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ */
+MUST_USE_RES struct LDKPrintableString Refund_description(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Duration since the Unix epoch when an invoice should no longer be sent.
+ *
+ * If `None`, the refund does not expire.
+ */
+MUST_USE_RES struct LDKCOption_u64Z Refund_absolute_expiry(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Whether the refund has expired.
+ */
+MUST_USE_RES bool Refund_is_expired(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Whether the refund has expired given the duration since the Unix epoch.
+ */
+MUST_USE_RES bool Refund_is_expired_no_std(const struct LDKRefund *NONNULL_PTR this_arg, uint64_t duration_since_epoch);
+
+/**
+ * The issuer of the refund, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Refund_issuer(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Paths to the sender originating from publicly reachable nodes. Blinded paths provide sender
+ * privacy by obfuscating its node id.
+ */
+MUST_USE_RES struct LDKCVec_BlindedPathZ Refund_paths(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * An unpredictable series of bytes, typically containing information about the derivation of
+ * [`payer_id`].
+ *
+ * [`payer_id`]: Self::payer_id
+ */
+MUST_USE_RES struct LDKu8slice Refund_payer_metadata(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * A chain that the refund is valid for.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes Refund_chain(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * The amount to refund in msats (i.e., the minimum lightning-payable unit for [`chain`]).
+ *
+ * [`chain`]: Self::chain
+ */
+MUST_USE_RES uint64_t Refund_amount_msats(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Features pertaining to requesting an invoice.
+ */
+MUST_USE_RES struct LDKInvoiceRequestFeatures Refund_features(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * The quantity of an item that refund is for.
+ */
+MUST_USE_RES struct LDKCOption_u64Z Refund_quantity(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * A public node id to send to in the case where there are no [`paths`]. Otherwise, a possibly
+ * transient pubkey.
+ *
+ * [`paths`]: Self::paths
+ */
+MUST_USE_RES struct LDKPublicKey Refund_payer_id(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Payer provided note to include in the invoice.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPrintableString Refund_payer_note(const struct LDKRefund *NONNULL_PTR this_arg);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Refund.
+ */
+uint64_t Refund_hash(const struct LDKRefund *NONNULL_PTR o);
+
+/**
+ * Serialize the Refund object into a byte array which can be read by Refund_read
+ */
+struct LDKCVec_u8Z Refund_write(const struct LDKRefund *NONNULL_PTR obj);
+
+/**
+ * Read a Refund object from a string
+ */
+struct LDKCResult_RefundBolt12ParseErrorZ Refund_from_str(struct LDKStr s);
+
+/**
+ * Creates a copy of the UtxoLookupError
+ */
+enum LDKUtxoLookupError UtxoLookupError_clone(const enum LDKUtxoLookupError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new UnknownChain-variant UtxoLookupError
+ */
+enum LDKUtxoLookupError UtxoLookupError_unknown_chain(void);
+
+/**
+ * Utility method to constructs a new UnknownTx-variant UtxoLookupError
+ */
+enum LDKUtxoLookupError UtxoLookupError_unknown_tx(void);
+
+/**
+ * Frees any resources used by the UtxoResult
+ */
+void UtxoResult_free(struct LDKUtxoResult this_ptr);
+
+/**
+ * Creates a copy of the UtxoResult
+ */
+struct LDKUtxoResult UtxoResult_clone(const struct LDKUtxoResult *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Sync-variant UtxoResult
+ */
+struct LDKUtxoResult UtxoResult_sync(struct LDKCResult_TxOutUtxoLookupErrorZ a);
+
+/**
+ * Utility method to constructs a new Async-variant UtxoResult
+ */
+struct LDKUtxoResult UtxoResult_async(struct LDKUtxoFuture a);
+
+/**
+ * Calls the free function if one is set
+ */
+void UtxoLookup_free(struct LDKUtxoLookup this_ptr);
+
+/**
+ * Frees any resources used by the UtxoFuture, if is_owned is set and inner is non-NULL.
+ */
+void UtxoFuture_free(struct LDKUtxoFuture this_obj);
+
+/**
+ * Creates a copy of the UtxoFuture
+ */
+struct LDKUtxoFuture UtxoFuture_clone(const struct LDKUtxoFuture *NONNULL_PTR orig);
+
+/**
+ * Builds a new future for later resolution.
+ */
+MUST_USE_RES struct LDKUtxoFuture UtxoFuture_new(void);
+
+/**
+ * Resolves this future against the given `graph` and with the given `result`.
+ *
+ * This is identical to calling [`UtxoFuture::resolve`] with a dummy `gossip`, disabling
+ * forwarding the validated gossip message onwards to peers.
+ *
+ * Because this may cause the [`NetworkGraph`]'s [`processing_queue_high`] to flip, in order
+ * to allow us to interact with peers again, you should call [`PeerManager::process_events`]
+ * after this.
+ *
+ * [`processing_queue_high`]: crate::ln::msgs::RoutingMessageHandler::processing_queue_high
+ * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ */
+void UtxoFuture_resolve_without_forwarding(const struct LDKUtxoFuture *NONNULL_PTR this_arg, const struct LDKNetworkGraph *NONNULL_PTR graph, struct LDKCResult_TxOutUtxoLookupErrorZ result);
+
+/**
+ * Resolves this future against the given `graph` and with the given `result`.
+ *
+ * The given `gossip` is used to broadcast any validated messages onwards to all peers which
+ * have available buffer space.
+ *
+ * Because this may cause the [`NetworkGraph`]'s [`processing_queue_high`] to flip, in order
+ * to allow us to interact with peers again, you should call [`PeerManager::process_events`]
+ * after this.
+ *
+ * [`processing_queue_high`]: crate::ln::msgs::RoutingMessageHandler::processing_queue_high
+ * [`PeerManager::process_events`]: crate::ln::peer_handler::PeerManager::process_events
+ */
+void UtxoFuture_resolve(const struct LDKUtxoFuture *NONNULL_PTR this_arg, const struct LDKNetworkGraph *NONNULL_PTR graph, const struct LDKP2PGossipSync *NONNULL_PTR gossip, struct LDKCResult_TxOutUtxoLookupErrorZ result);
+
+/**
+ * Frees any resources used by the NodeId, if is_owned is set and inner is non-NULL.
+ */
+void NodeId_free(struct LDKNodeId this_obj);
+
+/**
+ * Creates a copy of the NodeId
+ */
+struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
+
+/**
+ * Create a new NodeId from a public key
+ */
+MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
+
+/**
+ * Create a new NodeId from a slice of bytes
+ */
+MUST_USE_RES struct LDKCResult_NodeIdDecodeErrorZ NodeId_from_slice(struct LDKu8slice bytes);
+
+/**
+ * Get the public key slice from this NodeId
+ */
+MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
+
+/**
+ * Get the public key as an array from this NodeId
+ */
+MUST_USE_RES const uint8_t (*NodeId_as_array(const struct LDKNodeId *NONNULL_PTR this_arg))[33];
+
+/**
+ * Get the public key from this NodeId
+ */
+MUST_USE_RES struct LDKCResult_PublicKeySecp256k1ErrorZ NodeId_as_pubkey(const struct LDKNodeId *NONNULL_PTR this_arg);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the NodeId.
+ */
+uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
+
+/**
+ * Serialize the NodeId object into a byte array which can be read by NodeId_read
+ */
+struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
+
+/**
+ * Read a NodeId from a byte array, created by NodeId_write
+ */
+struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the NetworkGraph, if is_owned is set and inner is non-NULL.
+ */
+void NetworkGraph_free(struct LDKNetworkGraph this_obj);
+
+/**
+ * Frees any resources used by the ReadOnlyNetworkGraph, if is_owned is set and inner is non-NULL.
+ */
+void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
+
+/**
+ * Frees any resources used by the NetworkUpdate
+ */
+void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
+
+/**
+ * Creates a copy of the NetworkUpdate
+ */
+struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new ChannelUpdateMessage-variant NetworkUpdate
+ */
+struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
+
+/**
+ * Utility method to constructs a new ChannelFailure-variant NetworkUpdate
+ */
+struct LDKNetworkUpdate NetworkUpdate_channel_failure(uint64_t short_channel_id, bool is_permanent);
+
+/**
+ * Utility method to constructs a new NodeFailure-variant NetworkUpdate
+ */
+struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
+
+/**
+ * Checks if two NetworkUpdates contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool NetworkUpdate_eq(const struct LDKNetworkUpdate *NONNULL_PTR a, const struct LDKNetworkUpdate *NONNULL_PTR b);
+
+/**
+ * Serialize the NetworkUpdate object into a byte array which can be read by NetworkUpdate_read
+ */
+struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
+
+/**
+ * Read a NetworkUpdate from a byte array, created by NetworkUpdate_write
+ */
+struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the P2PGossipSync, if is_owned is set and inner is non-NULL.
+ */
+void P2PGossipSync_free(struct LDKP2PGossipSync this_obj);
+
+/**
+ * Creates a new tracker of the actual state of the network of channels and nodes,
+ * assuming an existing [`NetworkGraph`].
+ * UTXO lookup is used to make sure announced channels exist on-chain, channel data is
+ * correct, and the announcement is signed with channel owners' keys.
+ */
+MUST_USE_RES struct LDKP2PGossipSync P2PGossipSync_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_UtxoLookupZ utxo_lookup, struct LDKLogger logger);
+
+/**
+ * Adds a provider used to check new announcements. Does not affect
+ * existing announcements unless they are updated.
+ * Add, update or remove the provider would replace the current one.
+ */
+void P2PGossipSync_add_utxo_lookup(const struct LDKP2PGossipSync *NONNULL_PTR this_arg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+
+/**
+ * Handles any network updates originating from [`Event`]s.
+ * Note that this will skip applying any [`NetworkUpdate::ChannelUpdateMessage`] to avoid
+ * leaking possibly identifying information of the sender to the public network.
+ *
+ * [`Event`]: crate::events::Event
+ */
+void NetworkGraph_handle_network_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNetworkUpdate *NONNULL_PTR network_update);
+
+/**
+ * Gets the chain hash for this network graph.
+ */
+MUST_USE_RES struct LDKThirtyTwoBytes NetworkGraph_get_chain_hash(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Verifies the signature of a [`NodeAnnouncement`].
+ *
+ * Returns an error if it is invalid.
+ */
+struct LDKCResult_NoneLightningErrorZ verify_node_announcement(const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+
+/**
+ * Verifies all signatures included in a [`ChannelAnnouncement`].
+ *
+ * Returns an error if one of the signatures is invalid.
+ */
+struct LDKCResult_NoneLightningErrorZ verify_channel_announcement(const struct LDKChannelAnnouncement *NONNULL_PTR msg);
+
+/**
+ * Constructs a new RoutingMessageHandler which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned RoutingMessageHandler must be freed before this_arg is
+ */
+struct LDKRoutingMessageHandler P2PGossipSync_as_RoutingMessageHandler(const struct LDKP2PGossipSync *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new MessageSendEventsProvider which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned MessageSendEventsProvider must be freed before this_arg is
+ */
+struct LDKMessageSendEventsProvider P2PGossipSync_as_MessageSendEventsProvider(const struct LDKP2PGossipSync *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the ChannelUpdateInfo, if is_owned is set and inner is non-NULL.
+ */
+void ChannelUpdateInfo_free(struct LDKChannelUpdateInfo this_obj);
+
+/**
+ * When the last update to the channel direction was issued.
+ * Value is opaque, as set in the announcement.
+ */
+uint32_t ChannelUpdateInfo_get_last_update(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * When the last update to the channel direction was issued.
+ * Value is opaque, as set in the announcement.
+ */
+void ChannelUpdateInfo_set_last_update(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Whether the channel can be currently used for payments (in this one direction).
+ */
+bool ChannelUpdateInfo_get_enabled(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Whether the channel can be currently used for payments (in this one direction).
+ */
+void ChannelUpdateInfo_set_enabled(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, bool val);
+
+/**
+ * The difference in CLTV values that you must have when routing through this channel.
+ */
+uint16_t ChannelUpdateInfo_get_cltv_expiry_delta(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The difference in CLTV values that you must have when routing through this channel.
+ */
+void ChannelUpdateInfo_set_cltv_expiry_delta(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint16_t val);
+
+/**
+ * The minimum value, which must be relayed to the next hop via the channel
+ */
+uint64_t ChannelUpdateInfo_get_htlc_minimum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The minimum value, which must be relayed to the next hop via the channel
+ */
+void ChannelUpdateInfo_set_htlc_minimum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The maximum value which may be relayed to the next hop via the channel.
+ */
+uint64_t ChannelUpdateInfo_get_htlc_maximum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum value which may be relayed to the next hop via the channel.
+ */
+void ChannelUpdateInfo_set_htlc_maximum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Fees charged when the channel is used for routing
+ */
+struct LDKRoutingFees ChannelUpdateInfo_get_fees(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Fees charged when the channel is used for routing
+ */
+void ChannelUpdateInfo_set_fees(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
+
+/**
+ * Most recent update for the channel received from the network
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelUpdate ChannelUpdateInfo_get_last_update_message(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Most recent update for the channel received from the network
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelUpdateInfo_set_last_update_message(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
+
+/**
+ * Constructs a new ChannelUpdateInfo given each field
+ *
+ * Note that last_update_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKChannelUpdateInfo ChannelUpdateInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
+
+/**
+ * Creates a copy of the ChannelUpdateInfo
+ */
+struct LDKChannelUpdateInfo ChannelUpdateInfo_clone(const struct LDKChannelUpdateInfo *NONNULL_PTR orig);
+
+/**
+ * Checks if two ChannelUpdateInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool ChannelUpdateInfo_eq(const struct LDKChannelUpdateInfo *NONNULL_PTR a, const struct LDKChannelUpdateInfo *NONNULL_PTR b);
+
+/**
+ * Serialize the ChannelUpdateInfo object into a byte array which can be read by ChannelUpdateInfo_read
+ */
+struct LDKCVec_u8Z ChannelUpdateInfo_write(const struct LDKChannelUpdateInfo *NONNULL_PTR obj);
+
+/**
+ * Read a ChannelUpdateInfo from a byte array, created by ChannelUpdateInfo_write
+ */
+struct LDKCResult_ChannelUpdateInfoDecodeErrorZ ChannelUpdateInfo_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the ChannelInfo, if is_owned is set and inner is non-NULL.
+ */
+void ChannelInfo_free(struct LDKChannelInfo this_obj);
+
+/**
+ * Protocol features of a channel communicated during its announcement
+ */
+struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Protocol features of a channel communicated during its announcement
+ */
+void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
+
+/**
+ * Source node of the first direction of a channel
+ */
+struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Source node of the first direction of a channel
+ */
+void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
+
+/**
+ * Details about the first direction of a channel
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelUpdateInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Details about the first direction of a channel
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdateInfo val);
+
+/**
+ * Source node of the second direction of a channel
+ */
+struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Source node of the second direction of a channel
+ */
+void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
+
+/**
+ * Details about the second direction of a channel
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelUpdateInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Details about the second direction of a channel
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdateInfo val);
+
+/**
+ * The channel capacity as seen on-chain, if chain lookup is available.
+ */
+struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * The channel capacity as seen on-chain, if chain lookup is available.
+ */
+void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * An initial announcement of the channel
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
+
+/**
+ * An initial announcement of the channel
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
+
+/**
+ * Creates a copy of the ChannelInfo
+ */
+struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
+
+/**
+ * Checks if two ChannelInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool ChannelInfo_eq(const struct LDKChannelInfo *NONNULL_PTR a, const struct LDKChannelInfo *NONNULL_PTR b);
+
+/**
+ * Returns a [`ChannelUpdateInfo`] based on the direction implied by the channel_flag.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKChannelUpdateInfo ChannelInfo_get_directional_info(const struct LDKChannelInfo *NONNULL_PTR this_arg, uint8_t channel_flags);
+
+/**
+ * Serialize the ChannelInfo object into a byte array which can be read by ChannelInfo_read
+ */
+struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
+
+/**
+ * Read a ChannelInfo from a byte array, created by ChannelInfo_write
+ */
+struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the DirectedChannelInfo, if is_owned is set and inner is non-NULL.
+ */
+void DirectedChannelInfo_free(struct LDKDirectedChannelInfo this_obj);
+
+/**
+ * Creates a copy of the DirectedChannelInfo
+ */
+struct LDKDirectedChannelInfo DirectedChannelInfo_clone(const struct LDKDirectedChannelInfo *NONNULL_PTR orig);
+
+/**
+ * Returns information for the channel.
+ */
+MUST_USE_RES struct LDKChannelInfo DirectedChannelInfo_channel(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+
+/**
+ * Returns the [`EffectiveCapacity`] of the channel in the direction.
+ *
+ * This is either the total capacity from the funding transaction, if known, or the
+ * `htlc_maximum_msat` for the direction as advertised by the gossip network, if known,
+ * otherwise.
+ */
+MUST_USE_RES struct LDKEffectiveCapacity DirectedChannelInfo_effective_capacity(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+
+/**
+ * Returns the `node_id` of the source hop.
+ *
+ * Refers to the `node_id` forwarding the payment to the next hop.
+ */
+MUST_USE_RES struct LDKNodeId DirectedChannelInfo_source(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+
+/**
+ * Returns the `node_id` of the target hop.
+ *
+ * Refers to the `node_id` receiving the payment from the previous hop.
+ */
+MUST_USE_RES struct LDKNodeId DirectedChannelInfo_target(const struct LDKDirectedChannelInfo *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the EffectiveCapacity
+ */
+void EffectiveCapacity_free(struct LDKEffectiveCapacity this_ptr);
+
+/**
+ * Creates a copy of the EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_clone(const struct LDKEffectiveCapacity *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new ExactLiquidity-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_exact_liquidity(uint64_t liquidity_msat);
+
+/**
+ * Utility method to constructs a new AdvertisedMaxHTLC-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_advertised_max_htlc(uint64_t amount_msat);
+
+/**
+ * Utility method to constructs a new Total-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_total(uint64_t capacity_msat, uint64_t htlc_maximum_msat);
+
+/**
+ * Utility method to constructs a new Infinite-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_infinite(void);
+
+/**
+ * Utility method to constructs a new HintMaxHTLC-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_hint_max_htlc(uint64_t amount_msat);
+
+/**
+ * Utility method to constructs a new Unknown-variant EffectiveCapacity
+ */
+struct LDKEffectiveCapacity EffectiveCapacity_unknown(void);
+
+/**
+ * Returns the effective capacity denominated in millisatoshi.
+ */
+MUST_USE_RES uint64_t EffectiveCapacity_as_msat(const struct LDKEffectiveCapacity *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the RoutingFees, if is_owned is set and inner is non-NULL.
+ */
+void RoutingFees_free(struct LDKRoutingFees this_obj);
+
+/**
+ * Flat routing fee in millisatoshis.
+ */
+uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
+
+/**
+ * Flat routing fee in millisatoshis.
+ */
+void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Liquidity-based routing fee in millionths of a routed amount.
+ * In other words, 10000 is 1%.
+ */
+uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
+
+/**
+ * Liquidity-based routing fee in millionths of a routed amount.
+ * In other words, 10000 is 1%.
+ */
+void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Constructs a new RoutingFees given each field
+ */
+MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
+
+/**
+ * Checks if two RoutingFeess contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
+
+/**
+ * Creates a copy of the RoutingFees
+ */
+struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RoutingFees.
+ */
+uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
+
+/**
+ * Serialize the RoutingFees object into a byte array which can be read by RoutingFees_read
+ */
+struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
+
+/**
+ * Read a RoutingFees from a byte array, created by RoutingFees_write
+ */
+struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the NodeAnnouncementInfo, if is_owned is set and inner is non-NULL.
+ */
+void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
+
+/**
+ * Protocol features the node announced support for
+ */
+struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Protocol features the node announced support for
+ */
+void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
+
+/**
+ * When the last known update to the node state was issued.
+ * Value is opaque, as set in the announcement.
+ */
+uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
+/**
+ * When the last known update to the node state was issued.
+ * Value is opaque, as set in the announcement.
+ */
+void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Color assigned to the node
+ */
+const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
+
+/**
+ * Color assigned to the node
+ */
+void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
+
+/**
+ * Moniker assigned to the node.
+ * May be invalid or malicious (eg control chars),
+ * should not be exposed to the user.
+ */
+struct LDKNodeAlias NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
+/**
+ * Moniker assigned to the node.
+ * May be invalid or malicious (eg control chars),
+ * should not be exposed to the user.
+ */
+void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAlias val);
+
+/**
+ * An initial announcement of the node
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
+/**
+ * An initial announcement of the node
+ * Mostly redundant with the data we store in fields explicitly.
+ * Everything else is useful only for sending out for initial routing sync.
+ * Not stored if contains excess data to prevent DoS.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
+
+/**
+ * Constructs a new NodeAnnouncementInfo given each field
+ *
+ * Note that announcement_message_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKNodeFeatures features_arg, uint32_t last_update_arg, struct LDKThreeBytes rgb_arg, struct LDKNodeAlias alias_arg, struct LDKNodeAnnouncement announcement_message_arg);
+
+/**
+ * Creates a copy of the NodeAnnouncementInfo
+ */
+struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
+
+/**
+ * Checks if two NodeAnnouncementInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool NodeAnnouncementInfo_eq(const struct LDKNodeAnnouncementInfo *NONNULL_PTR a, const struct LDKNodeAnnouncementInfo *NONNULL_PTR b);
+
+/**
+ * Internet-level addresses via which one can connect to the node
+ */
+MUST_USE_RES struct LDKCVec_SocketAddressZ NodeAnnouncementInfo_addresses(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the NodeAnnouncementInfo object into a byte array which can be read by NodeAnnouncementInfo_read
+ */
+struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
+
+/**
+ * Read a NodeAnnouncementInfo from a byte array, created by NodeAnnouncementInfo_write
+ */
+struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the NodeAlias, if is_owned is set and inner is non-NULL.
+ */
+void NodeAlias_free(struct LDKNodeAlias this_obj);
+
+const uint8_t (*NodeAlias_get_a(const struct LDKNodeAlias *NONNULL_PTR this_ptr))[32];
+
+void NodeAlias_set_a(struct LDKNodeAlias *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * Constructs a new NodeAlias given each field
+ */
+MUST_USE_RES struct LDKNodeAlias NodeAlias_new(struct LDKThirtyTwoBytes a_arg);
+
+/**
+ * Creates a copy of the NodeAlias
+ */
+struct LDKNodeAlias NodeAlias_clone(const struct LDKNodeAlias *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the NodeAlias.
+ */
+uint64_t NodeAlias_hash(const struct LDKNodeAlias *NONNULL_PTR o);
+
+/**
+ * Checks if two NodeAliass contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool NodeAlias_eq(const struct LDKNodeAlias *NONNULL_PTR a, const struct LDKNodeAlias *NONNULL_PTR b);
+
+/**
+ * Serialize the NodeAlias object into a byte array which can be read by NodeAlias_read
+ */
+struct LDKCVec_u8Z NodeAlias_write(const struct LDKNodeAlias *NONNULL_PTR obj);
+
+/**
+ * Read a NodeAlias from a byte array, created by NodeAlias_write
+ */
+struct LDKCResult_NodeAliasDecodeErrorZ NodeAlias_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the NodeInfo, if is_owned is set and inner is non-NULL.
+ */
+void NodeInfo_free(struct LDKNodeInfo this_obj);
+
+/**
+ * All valid channels a node has announced
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u64Z NodeInfo_get_channels(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+
+/**
+ * All valid channels a node has announced
+ */
+void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+
+/**
+ * More information about a node from node_announcement.
+ * Optional because we store a Node entry after learning about it from
+ * a channel announcement, but before receiving a node announcement.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+
+/**
+ * More information about a node from node_announcement.
+ * Optional because we store a Node entry after learning about it from
+ * a channel announcement, but before receiving a node announcement.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
+
+/**
+ * Constructs a new NodeInfo given each field
+ *
+ * Note that announcement_info_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
+
+/**
+ * Creates a copy of the NodeInfo
+ */
+struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
+
+/**
+ * Checks if two NodeInfos contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b);
+
+/**
+ * Returns whether the node has only announced Tor addresses.
+ */
+MUST_USE_RES bool NodeInfo_is_tor_only(const struct LDKNodeInfo *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read
+ */
+struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
+
+/**
+ * Read a NodeInfo from a byte array, created by NodeInfo_write
+ */
+struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the NetworkGraph object into a byte array which can be read by NetworkGraph_read
+ */
+struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
+
+/**
+ * Read a NetworkGraph from a byte array, created by NetworkGraph_write
+ */
+struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser, struct LDKLogger arg);
+
+/**
+ * Creates a new, empty, network graph.
+ */
+MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(enum LDKNetwork network, struct LDKLogger logger);
+
+/**
+ * Returns a read-only view of the network graph.
+ */
+MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * The unix timestamp provided by the most recent rapid gossip sync.
+ * It will be set by the rapid sync process after every sync completion.
+ */
+MUST_USE_RES struct LDKCOption_u32Z NetworkGraph_get_last_rapid_gossip_sync_timestamp(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Update the unix timestamp provided by the most recent rapid gossip sync.
+ * This should be done automatically by the rapid sync process after every sync completion.
+ */
+void NetworkGraph_set_last_rapid_gossip_sync_timestamp(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint32_t last_rapid_gossip_sync_timestamp);
+
+/**
+ * For an already known node (from channel announcements), update its stored properties from a
+ * given node announcement.
+ *
+ * You probably don't want to call this directly, instead relying on a P2PGossipSync's
+ * RoutingMessageHandler implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+
+/**
+ * For an already known node (from channel announcements), update its stored properties from a
+ * given node announcement without verifying the associated signatures. Because we aren't
+ * given the associated signatures here we cannot relay the node announcement to any of our
+ * peers.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
+
+/**
+ * Store or update channel info from a channel announcement.
+ *
+ * You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
+ * [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ *
+ * If a [`UtxoLookup`] object is provided via `utxo_lookup`, it will be called to verify
+ * the corresponding UTXO exists on chain and is correctly-formatted.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+
+/**
+ * Store or update channel info from a channel announcement.
+ *
+ * You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
+ * [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ *
+ * This will skip verification of if the channel is actually on-chain.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement_no_lookup(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg);
+
+/**
+ * Store or update channel info from a channel announcement without verifying the associated
+ * signatures. Because we aren't given the associated signatures here we cannot relay the
+ * channel announcement to any of our peers.
+ *
+ * If a [`UtxoLookup`] object is provided via `utxo_lookup`, it will be called to verify
+ * the corresponding UTXO exists on chain and is correctly-formatted.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+
+/**
+ * Update channel from partial announcement data received via rapid gossip sync
+ *
+ * `timestamp: u64`: Timestamp emulating the backdated original announcement receipt (by the
+ * rapid gossip sync server)
+ *
+ * All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_add_channel_from_partial_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, uint64_t timestamp, struct LDKChannelFeatures features, struct LDKPublicKey node_id_1, struct LDKPublicKey node_id_2);
+
+/**
+ * Marks a channel in the graph as failed permanently.
+ *
+ * The channel and any node for which this was their last channel are removed from the graph.
+ */
+void NetworkGraph_channel_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id);
+
+/**
+ * Marks a node in the graph as permanently failed, effectively removing it and its channels
+ * from local storage.
+ */
+void NetworkGraph_node_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey node_id);
+
+/**
+ * Removes information about channels that we haven't heard any updates about in some time.
+ * This can be used regularly to prune the network graph of channels that likely no longer
+ * exist.
+ *
+ * While there is no formal requirement that nodes regularly re-broadcast their channel
+ * updates every two weeks, the non-normative section of BOLT 7 currently suggests that
+ * pruning occur for updates which are at least two weeks old, which we implement here.
+ *
+ * Note that for users of the `lightning-background-processor` crate this method may be
+ * automatically called regularly for you.
+ *
+ * This method will also cause us to stop tracking removed nodes and channels if they have been
+ * in the map for a while so that these can be resynced from gossip in the future.
+ *
+ * This method is only available with the `std` feature. See
+ * [`NetworkGraph::remove_stale_channels_and_tracking_with_time`] for `no-std` use.
+ */
+void NetworkGraph_remove_stale_channels_and_tracking(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Removes information about channels that we haven't heard any updates about in some time.
+ * This can be used regularly to prune the network graph of channels that likely no longer
+ * exist.
+ *
+ * While there is no formal requirement that nodes regularly re-broadcast their channel
+ * updates every two weeks, the non-normative section of BOLT 7 currently suggests that
+ * pruning occur for updates which are at least two weeks old, which we implement here.
+ *
+ * This method will also cause us to stop tracking removed nodes and channels if they have been
+ * in the map for a while so that these can be resynced from gossip in the future.
+ *
+ * This function takes the current unix time as an argument. For users with the `std` feature
+ * enabled, [`NetworkGraph::remove_stale_channels_and_tracking`] may be preferable.
+ */
+void NetworkGraph_remove_stale_channels_and_tracking_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
+
+/**
+ * For an already known (from announcement) channel, update info about one of the directions
+ * of the channel.
+ *
+ * You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
+ * [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ *
+ * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * materially in the future will be rejected.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
+
+/**
+ * For an already known (from announcement) channel, update info about one of the directions
+ * of the channel without verifying the associated signatures. Because we aren't given the
+ * associated signatures here we cannot relay the channel update to any of our peers.
+ *
+ * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * materially in the future will be rejected.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
+
+/**
+ * For an already known (from announcement) channel, verify the given [`ChannelUpdate`].
+ *
+ * This checks whether the update currently is applicable by [`Self::update_channel`].
+ *
+ * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
+ * materially in the future will be rejected.
+ */
+MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_verify_channel_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
+
+/**
+ * Returns information on a channel with the given id.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKChannelInfo ReadOnlyNetworkGraph_channel(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id);
+
+/**
+ * Returns the list of channels in the graph
+ */
+MUST_USE_RES struct LDKCVec_u64Z ReadOnlyNetworkGraph_list_channels(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Returns information on a node with the given id.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKNodeInfo ReadOnlyNetworkGraph_node(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Returns the list of nodes in the graph
+ */
+MUST_USE_RES struct LDKCVec_NodeIdZ ReadOnlyNetworkGraph_list_nodes(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+
+/**
+ * Get network addresses by node id.
+ * Returns None if the requested node is completely unknown,
+ * or if node announcement for the node was never received.
+ */
+MUST_USE_RES struct LDKCOption_CVec_SocketAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
+
+/**
+ * Frees any resources used by the DefaultRouter, if is_owned is set and inner is non-NULL.
+ */
+void DefaultRouter_free(struct LDKDefaultRouter this_obj);
+
+/**
+ * Creates a new router.
+ */
+MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, struct LDKEntropySource entropy_source, struct LDKLockableScore scorer, struct LDKProbabilisticScoringFeeParameters score_params);
+
+/**
+ * Constructs a new Router which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Router must be freed before this_arg is
+ */
+struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new MessageRouter which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned MessageRouter must be freed before this_arg is
+ */
+struct LDKMessageRouter DefaultRouter_as_MessageRouter(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
+
+/**
+ * Calls the free function if one is set
+ */
+void Router_free(struct LDKRouter this_ptr);
+
+/**
+ * Frees any resources used by the ScorerAccountingForInFlightHtlcs, if is_owned is set and inner is non-NULL.
+ */
+void ScorerAccountingForInFlightHtlcs_free(struct LDKScorerAccountingForInFlightHtlcs this_obj);
+
+/**
+ * Initialize a new `ScorerAccountingForInFlightHtlcs`.
+ */
+MUST_USE_RES struct LDKScorerAccountingForInFlightHtlcs ScorerAccountingForInFlightHtlcs_new(struct LDKScoreLookUp scorer, const struct LDKInFlightHtlcs *NONNULL_PTR inflight_htlcs);
+
+/**
+ * Constructs a new ScoreLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreLookUp must be freed before this_arg is
+ */
+struct LDKScoreLookUp ScorerAccountingForInFlightHtlcs_as_ScoreLookUp(const struct LDKScorerAccountingForInFlightHtlcs *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the InFlightHtlcs, if is_owned is set and inner is non-NULL.
+ */
+void InFlightHtlcs_free(struct LDKInFlightHtlcs this_obj);
+
+/**
+ * Creates a copy of the InFlightHtlcs
+ */
+struct LDKInFlightHtlcs InFlightHtlcs_clone(const struct LDKInFlightHtlcs *NONNULL_PTR orig);
+
+/**
+ * Constructs an empty `InFlightHtlcs`.
+ */
+MUST_USE_RES struct LDKInFlightHtlcs InFlightHtlcs_new(void);
+
+/**
+ * Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`.
+ */
+void InFlightHtlcs_process_path(struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKPath *NONNULL_PTR path, struct LDKPublicKey payer_node_id);
+
+/**
+ * Adds a known HTLC given the public key of the HTLC source, target, and short channel
+ * id.
+ */
+void InFlightHtlcs_add_inflight_htlc(struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target, uint64_t channel_scid, uint64_t used_msat);
+
+/**
+ * Returns liquidity in msat given the public key of the HTLC source, target, and short channel
+ * id.
+ */
+MUST_USE_RES struct LDKCOption_u64Z InFlightHtlcs_used_liquidity_msat(const struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target, uint64_t channel_scid);
+
+/**
+ * Serialize the InFlightHtlcs object into a byte array which can be read by InFlightHtlcs_read
+ */
+struct LDKCVec_u8Z InFlightHtlcs_write(const struct LDKInFlightHtlcs *NONNULL_PTR obj);
+
+/**
+ * Read a InFlightHtlcs from a byte array, created by InFlightHtlcs_write
+ */
+struct LDKCResult_InFlightHtlcsDecodeErrorZ InFlightHtlcs_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the RouteHop, if is_owned is set and inner is non-NULL.
+ */
+void RouteHop_free(struct LDKRouteHop this_obj);
+
+/**
+ * The node_id of the node at this hop.
+ */
+struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The node_id of the node at this hop.
+ */
+void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The node_announcement features of the node at this hop. For the last hop, these may be
+ * amended to match the features present in the invoice this node generated.
+ */
+struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The node_announcement features of the node at this hop. For the last hop, these may be
+ * amended to match the features present in the invoice this node generated.
+ */
+void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
+
+/**
+ * The channel that should be used from the previous hop to reach this node.
+ */
+uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The channel that should be used from the previous hop to reach this node.
+ */
+void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The channel_announcement features of the channel that should be used from the previous hop
+ * to reach this node.
+ */
+struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The channel_announcement features of the channel that should be used from the previous hop
+ * to reach this node.
+ */
+void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
+
+/**
+ * The fee taken on this hop (for paying for the use of the *next* channel in the path).
+ * If this is the last hop in [`Path::hops`]:
+ * * if we're sending to a [`BlindedPath`], this is the fee paid for use of the entire blinded path
+ * * otherwise, this is the full value of this [`Path`]'s part of the payment
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The fee taken on this hop (for paying for the use of the *next* channel in the path).
+ * If this is the last hop in [`Path::hops`]:
+ * * if we're sending to a [`BlindedPath`], this is the fee paid for use of the entire blinded path
+ * * otherwise, this is the full value of this [`Path`]'s part of the payment
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The CLTV delta added for this hop.
+ * If this is the last hop in [`Path::hops`]:
+ * * if we're sending to a [`BlindedPath`], this is the CLTV delta for the entire blinded path
+ * * otherwise, this is the CLTV delta expected at the destination
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * The CLTV delta added for this hop.
+ * If this is the last hop in [`Path::hops`]:
+ * * if we're sending to a [`BlindedPath`], this is the CLTV delta for the entire blinded path
+ * * otherwise, this is the CLTV delta expected at the destination
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * Indicates whether this hop is possibly announced in the public network graph.
+ *
+ * Will be `true` if there is a possibility that the channel is publicly known, i.e., if we
+ * either know for sure it's announced in the public graph, or if any public channels exist
+ * for which the given `short_channel_id` could be an alias for. Will be `false` if we believe
+ * the channel to be unannounced.
+ *
+ * Will be `true` for objects serialized with LDK version 0.0.116 and before.
+ */
+bool RouteHop_get_maybe_announced_channel(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+
+/**
+ * Indicates whether this hop is possibly announced in the public network graph.
+ *
+ * Will be `true` if there is a possibility that the channel is publicly known, i.e., if we
+ * either know for sure it's announced in the public graph, or if any public channels exist
+ * for which the given `short_channel_id` could be an alias for. Will be `false` if we believe
+ * the channel to be unannounced.
+ *
+ * Will be `true` for objects serialized with LDK version 0.0.116 and before.
+ */
+void RouteHop_set_maybe_announced_channel(struct LDKRouteHop *NONNULL_PTR this_ptr, bool val);
+
+/**
+ * Constructs a new RouteHop given each field
+ */
+MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg, bool maybe_announced_channel_arg);
+
+/**
+ * Creates a copy of the RouteHop
+ */
+struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RouteHop.
+ */
+uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
+
+/**
+ * Checks if two RouteHops contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
+
+/**
+ * Serialize the RouteHop object into a byte array which can be read by RouteHop_read
+ */
+struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
+
+/**
+ * Read a RouteHop from a byte array, created by RouteHop_write
+ */
+struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the BlindedTail, if is_owned is set and inner is non-NULL.
+ */
+void BlindedTail_free(struct LDKBlindedTail this_obj);
+
+/**
+ * The hops of the [`BlindedPath`] provided by the recipient.
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+struct LDKCVec_BlindedHopZ BlindedTail_get_hops(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+
+/**
+ * The hops of the [`BlindedPath`] provided by the recipient.
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+void BlindedTail_set_hops(struct LDKBlindedTail *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val);
+
+/**
+ * The blinding point of the [`BlindedPath`] provided by the recipient.
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+struct LDKPublicKey BlindedTail_get_blinding_point(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+
+/**
+ * The blinding point of the [`BlindedPath`] provided by the recipient.
+ *
+ * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ */
+void BlindedTail_set_blinding_point(struct LDKBlindedTail *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Excess CLTV delta added to the recipient's CLTV expiry to deter intermediate nodes from
+ * inferring the destination. May be 0.
+ */
+uint32_t BlindedTail_get_excess_final_cltv_expiry_delta(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+
+/**
+ * Excess CLTV delta added to the recipient's CLTV expiry to deter intermediate nodes from
+ * inferring the destination. May be 0.
+ */
+void BlindedTail_set_excess_final_cltv_expiry_delta(struct LDKBlindedTail *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * The total amount paid on this [`Path`], excluding the fees.
+ */
+uint64_t BlindedTail_get_final_value_msat(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+
+/**
+ * The total amount paid on this [`Path`], excluding the fees.
+ */
+void BlindedTail_set_final_value_msat(struct LDKBlindedTail *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Constructs a new BlindedTail given each field
+ */
+MUST_USE_RES struct LDKBlindedTail BlindedTail_new(struct LDKCVec_BlindedHopZ hops_arg, struct LDKPublicKey blinding_point_arg, uint32_t excess_final_cltv_expiry_delta_arg, uint64_t final_value_msat_arg);
+
+/**
+ * Creates a copy of the BlindedTail
+ */
+struct LDKBlindedTail BlindedTail_clone(const struct LDKBlindedTail *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the BlindedTail.
+ */
+uint64_t BlindedTail_hash(const struct LDKBlindedTail *NONNULL_PTR o);
+
+/**
+ * Checks if two BlindedTails contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool BlindedTail_eq(const struct LDKBlindedTail *NONNULL_PTR a, const struct LDKBlindedTail *NONNULL_PTR b);
+
+/**
+ * Serialize the BlindedTail object into a byte array which can be read by BlindedTail_read
+ */
+struct LDKCVec_u8Z BlindedTail_write(const struct LDKBlindedTail *NONNULL_PTR obj);
+
+/**
+ * Read a BlindedTail from a byte array, created by BlindedTail_write
+ */
+struct LDKCResult_BlindedTailDecodeErrorZ BlindedTail_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the Path, if is_owned is set and inner is non-NULL.
+ */
+void Path_free(struct LDKPath this_obj);
+
+/**
+ * The list of unblinded hops in this [`Path`]. Must be at least length one.
+ */
+struct LDKCVec_RouteHopZ Path_get_hops(const struct LDKPath *NONNULL_PTR this_ptr);
+
+/**
+ * The list of unblinded hops in this [`Path`]. Must be at least length one.
+ */
+void Path_set_hops(struct LDKPath *NONNULL_PTR this_ptr, struct LDKCVec_RouteHopZ val);
+
+/**
+ * The blinded path at which this path terminates, if we're sending to one, and its metadata.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKBlindedTail Path_get_blinded_tail(const struct LDKPath *NONNULL_PTR this_ptr);
+
+/**
+ * The blinded path at which this path terminates, if we're sending to one, and its metadata.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void Path_set_blinded_tail(struct LDKPath *NONNULL_PTR this_ptr, struct LDKBlindedTail val);
+
+/**
+ * Constructs a new Path given each field
+ *
+ * Note that blinded_tail_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKPath Path_new(struct LDKCVec_RouteHopZ hops_arg, struct LDKBlindedTail blinded_tail_arg);
+
+/**
+ * Creates a copy of the Path
+ */
+struct LDKPath Path_clone(const struct LDKPath *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Path.
+ */
+uint64_t Path_hash(const struct LDKPath *NONNULL_PTR o);
+
+/**
+ * Checks if two Paths contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool Path_eq(const struct LDKPath *NONNULL_PTR a, const struct LDKPath *NONNULL_PTR b);
+
+/**
+ * Gets the fees for a given path, excluding any excess paid to the recipient.
+ */
+MUST_USE_RES uint64_t Path_fee_msat(const struct LDKPath *NONNULL_PTR this_arg);
+
+/**
+ * Gets the total amount paid on this [`Path`], excluding the fees.
+ */
+MUST_USE_RES uint64_t Path_final_value_msat(const struct LDKPath *NONNULL_PTR this_arg);
+
+/**
+ * Gets the final hop's CLTV expiry delta.
+ */
+MUST_USE_RES struct LDKCOption_u32Z Path_final_cltv_expiry_delta(const struct LDKPath *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the Route, if is_owned is set and inner is non-NULL.
+ */
+void Route_free(struct LDKRoute this_obj);
+
+/**
+ * The list of [`Path`]s taken for a single (potentially-)multi-part payment. If no
+ * [`BlindedTail`]s are present, then the pubkey of the last [`RouteHop`] in each path must be
+ * the same.
+ */
+struct LDKCVec_PathZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
+
+/**
+ * The list of [`Path`]s taken for a single (potentially-)multi-part payment. If no
+ * [`BlindedTail`]s are present, then the pubkey of the last [`RouteHop`] in each path must be
+ * the same.
+ */
+void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_PathZ val);
+
+/**
+ * The `route_params` parameter passed to [`find_route`].
+ *
+ * This is used by `ChannelManager` to track information which may be required for retries.
+ *
+ * Will be `None` for objects serialized with LDK versions prior to 0.0.117.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKRouteParameters Route_get_route_params(const struct LDKRoute *NONNULL_PTR this_ptr);
+
+/**
+ * The `route_params` parameter passed to [`find_route`].
+ *
+ * This is used by `ChannelManager` to track information which may be required for retries.
+ *
+ * Will be `None` for objects serialized with LDK versions prior to 0.0.117.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+void Route_set_route_params(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKRouteParameters val);
+
+/**
+ * Constructs a new Route given each field
+ *
+ * Note that route_params_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_PathZ paths_arg, struct LDKRouteParameters route_params_arg);
+
+/**
+ * Creates a copy of the Route
+ */
+struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Route.
+ */
+uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
+
+/**
+ * Checks if two Routes contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
+
+/**
+ * Returns the total amount of fees paid on this [`Route`].
+ *
+ * For objects serialized with LDK 0.0.117 and after, this includes any extra payment made to
+ * the recipient, which can happen in excess of the amount passed to [`find_route`] via
+ * [`RouteParameters::final_value_msat`], if we had to reach the [`htlc_minimum_msat`] limits.
+ *
+ * [`htlc_minimum_msat`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_update-message
+ */
+MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
+
+/**
+ * Returns the total amount paid on this [`Route`], excluding the fees.
+ *
+ * Might be more than requested as part of the given [`RouteParameters::final_value_msat`] if
+ * we had to reach the [`htlc_minimum_msat`] limits.
+ *
+ * [`htlc_minimum_msat`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_update-message
+ */
+MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the Route object into a byte array which can be read by Route_read
+ */
+struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
+
+/**
+ * Read a Route from a byte array, created by Route_write
+ */
+struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the RouteParameters, if is_owned is set and inner is non-NULL.
+ */
+void RouteParameters_free(struct LDKRouteParameters this_obj);
+
+/**
+ * The parameters of the failed payment path.
+ */
+struct LDKPaymentParameters RouteParameters_get_payment_params(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The parameters of the failed payment path.
+ */
+void RouteParameters_set_payment_params(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPaymentParameters val);
+
+/**
+ * The amount in msats sent on the failed payment path.
+ */
+uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The amount in msats sent on the failed payment path.
+ */
+void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The maximum total fees, in millisatoshi, that may accrue during route finding.
+ *
+ * This limit also applies to the total fees that may arise while retrying failed payment
+ * paths.
+ *
+ * Note that values below a few sats may result in some paths being spuriously ignored.
+ */
+struct LDKCOption_u64Z RouteParameters_get_max_total_routing_fee_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum total fees, in millisatoshi, that may accrue during route finding.
+ *
+ * This limit also applies to the total fees that may arise while retrying failed payment
+ * paths.
+ *
+ * Note that values below a few sats may result in some paths being spuriously ignored.
+ */
+void RouteParameters_set_max_total_routing_fee_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * Constructs a new RouteParameters given each field
+ */
+MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPaymentParameters payment_params_arg, uint64_t final_value_msat_arg, struct LDKCOption_u64Z max_total_routing_fee_msat_arg);
+
+/**
+ * Creates a copy of the RouteParameters
+ */
+struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RouteParameters.
+ */
+uint64_t RouteParameters_hash(const struct LDKRouteParameters *NONNULL_PTR o);
+
+/**
+ * Checks if two RouteParameterss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RouteParameters_eq(const struct LDKRouteParameters *NONNULL_PTR a, const struct LDKRouteParameters *NONNULL_PTR b);
+
+/**
+ * Constructs [`RouteParameters`] from the given [`PaymentParameters`] and a payment amount.
+ *
+ * [`Self::max_total_routing_fee_msat`] defaults to 1% of the payment amount + 50 sats
+ */
+MUST_USE_RES struct LDKRouteParameters RouteParameters_from_payment_params_and_value(struct LDKPaymentParameters payment_params, uint64_t final_value_msat);
+
+/**
+ * Serialize the RouteParameters object into a byte array which can be read by RouteParameters_read
+ */
+struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
+
+/**
+ * Read a RouteParameters from a byte array, created by RouteParameters_write
+ */
+struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the PaymentParameters, if is_owned is set and inner is non-NULL.
+ */
+void PaymentParameters_free(struct LDKPaymentParameters this_obj);
+
+/**
+ * Information about the payee, such as their features and route hints for their channels.
+ */
+struct LDKPayee PaymentParameters_get_payee(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * Information about the payee, such as their features and route hints for their channels.
+ */
+void PaymentParameters_set_payee(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
+
+/**
+ * Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
+ */
+struct LDKCOption_u64Z PaymentParameters_get_expiry_time(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
+ */
+void PaymentParameters_set_expiry_time(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * The maximum total CLTV delta we accept for the route.
+ * Defaults to [`DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA`].
+ */
+uint32_t PaymentParameters_get_max_total_cltv_expiry_delta(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum total CLTV delta we accept for the route.
+ * Defaults to [`DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA`].
+ */
+void PaymentParameters_set_max_total_cltv_expiry_delta(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint32_t val);
+
+/**
+ * The maximum number of paths that may be used by (MPP) payments.
+ * Defaults to [`DEFAULT_MAX_PATH_COUNT`].
+ */
+uint8_t PaymentParameters_get_max_path_count(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum number of paths that may be used by (MPP) payments.
+ * Defaults to [`DEFAULT_MAX_PATH_COUNT`].
+ */
+void PaymentParameters_set_max_path_count(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+
+/**
+ * Selects the maximum share of a channel's total capacity which will be sent over a channel,
+ * as a power of 1/2. A higher value prefers to send the payment using more MPP parts whereas
+ * a lower value prefers to send larger MPP parts, potentially saturating channels and
+ * increasing failure probability for those paths.
+ *
+ * Note that this restriction will be relaxed during pathfinding after paths which meet this
+ * restriction have been found. While paths which meet this criteria will be searched for, it
+ * is ultimately up to the scorer to select them over other paths.
+ *
+ * A value of 0 will allow payments up to and including a channel's total announced usable
+ * capacity, a value of one will only use up to half its capacity, two 1/4, etc.
+ *
+ * Default value: 2
+ */
+uint8_t PaymentParameters_get_max_channel_saturation_power_of_half(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * Selects the maximum share of a channel's total capacity which will be sent over a channel,
+ * as a power of 1/2. A higher value prefers to send the payment using more MPP parts whereas
+ * a lower value prefers to send larger MPP parts, potentially saturating channels and
+ * increasing failure probability for those paths.
+ *
+ * Note that this restriction will be relaxed during pathfinding after paths which meet this
+ * restriction have been found. While paths which meet this criteria will be searched for, it
+ * is ultimately up to the scorer to select them over other paths.
+ *
+ * A value of 0 will allow payments up to and including a channel's total announced usable
+ * capacity, a value of one will only use up to half its capacity, two 1/4, etc.
+ *
+ * Default value: 2
+ */
+void PaymentParameters_set_max_channel_saturation_power_of_half(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+
+/**
+ * A list of SCIDs which this payment was previously attempted over and which caused the
+ * payment to fail. Future attempts for the same payment shouldn't be relayed through any of
+ * these SCIDs.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u64Z PaymentParameters_get_previously_failed_channels(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A list of SCIDs which this payment was previously attempted over and which caused the
+ * payment to fail. Future attempts for the same payment shouldn't be relayed through any of
+ * these SCIDs.
+ */
+void PaymentParameters_set_previously_failed_channels(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+
+/**
+ * A list of indices corresponding to blinded paths in [`Payee::Blinded::route_hints`] which this
+ * payment was previously attempted over and which caused the payment to fail. Future attempts
+ * for the same payment shouldn't be relayed through any of these blinded paths.
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u64Z PaymentParameters_get_previously_failed_blinded_path_idxs(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A list of indices corresponding to blinded paths in [`Payee::Blinded::route_hints`] which this
+ * payment was previously attempted over and which caused the payment to fail. Future attempts
+ * for the same payment shouldn't be relayed through any of these blinded paths.
+ */
+void PaymentParameters_set_previously_failed_blinded_path_idxs(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+
+/**
+ * Constructs a new PaymentParameters given each field
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_new(struct LDKPayee payee_arg, struct LDKCOption_u64Z expiry_time_arg, uint32_t max_total_cltv_expiry_delta_arg, uint8_t max_path_count_arg, uint8_t max_channel_saturation_power_of_half_arg, struct LDKCVec_u64Z previously_failed_channels_arg, struct LDKCVec_u64Z previously_failed_blinded_path_idxs_arg);
+
+/**
+ * Creates a copy of the PaymentParameters
+ */
+struct LDKPaymentParameters PaymentParameters_clone(const struct LDKPaymentParameters *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the PaymentParameters.
+ */
+uint64_t PaymentParameters_hash(const struct LDKPaymentParameters *NONNULL_PTR o);
+
+/**
+ * Checks if two PaymentParameterss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool PaymentParameters_eq(const struct LDKPaymentParameters *NONNULL_PTR a, const struct LDKPaymentParameters *NONNULL_PTR b);
+
+/**
+ * Serialize the PaymentParameters object into a byte array which can be read by PaymentParameters_read
+ */
+struct LDKCVec_u8Z PaymentParameters_write(const struct LDKPaymentParameters *NONNULL_PTR obj);
+
+/**
+ * Read a PaymentParameters from a byte array, created by PaymentParameters_write
+ */
+struct LDKCResult_PaymentParametersDecodeErrorZ PaymentParameters_read(struct LDKu8slice ser, uint32_t arg);
+
+/**
+ * Creates a payee with the node id of the given `pubkey`.
+ *
+ * The `final_cltv_expiry_delta` should match the expected final CLTV delta the recipient has
+ * provided.
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_from_node_id(struct LDKPublicKey payee_pubkey, uint32_t final_cltv_expiry_delta);
+
+/**
+ * Creates a payee with the node id of the given `pubkey` to use for keysend payments.
+ *
+ * The `final_cltv_expiry_delta` should match the expected final CLTV delta the recipient has
+ * provided.
+ *
+ * Note that MPP keysend is not widely supported yet. The `allow_mpp` lets you choose
+ * whether your router will be allowed to find a multi-part route for this payment. If you
+ * set `allow_mpp` to true, you should ensure a payment secret is set on send, likely via
+ * [`RecipientOnionFields::secret_only`].
+ *
+ * [`RecipientOnionFields::secret_only`]: crate::ln::channelmanager::RecipientOnionFields::secret_only
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_for_keysend(struct LDKPublicKey payee_pubkey, uint32_t final_cltv_expiry_delta, bool allow_mpp);
+
+/**
+ * Creates parameters for paying to a blinded payee from the provided invoice. Sets
+ * [`Payee::Blinded::route_hints`], [`Payee::Blinded::features`], and
+ * [`PaymentParameters::expiry_time`].
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_from_bolt12_invoice(const struct LDKBolt12Invoice *NONNULL_PTR invoice);
+
+/**
+ * Creates parameters for paying to a blinded payee from the provided blinded route hints.
+ */
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_blinded(struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ blinded_route_hints);
+
+/**
+ * Frees any resources used by the Payee
+ */
+void Payee_free(struct LDKPayee this_ptr);
+
+/**
+ * Creates a copy of the Payee
+ */
+struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Blinded-variant Payee
+ */
+struct LDKPayee Payee_blinded(struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ route_hints, struct LDKBolt12InvoiceFeatures features);
+
+/**
+ * Utility method to constructs a new Clear-variant Payee
+ */
+struct LDKPayee Payee_clear(struct LDKPublicKey node_id, struct LDKCVec_RouteHintZ route_hints, struct LDKBolt11InvoiceFeatures features, uint32_t final_cltv_expiry_delta);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the Payee.
+ */
+uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
+
+/**
+ * Checks if two Payees contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ */
+bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
+
+/**
+ * Frees any resources used by the RouteHint, if is_owned is set and inner is non-NULL.
+ */
+void RouteHint_free(struct LDKRouteHint this_obj);
+
+struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+
+void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
+
+/**
+ * Constructs a new RouteHint given each field
+ */
+MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
+
+/**
+ * Creates a copy of the RouteHint
+ */
+struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RouteHint.
+ */
+uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
+
+/**
+ * Checks if two RouteHints contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
+
+/**
+ * Serialize the RouteHint object into a byte array which can be read by RouteHint_read
+ */
+struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
+
+/**
+ * Read a RouteHint from a byte array, created by RouteHint_write
+ */
+struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the RouteHintHop, if is_owned is set and inner is non-NULL.
+ */
+void RouteHintHop_free(struct LDKRouteHintHop this_obj);
+
+/**
+ * The node_id of the non-target end of the route
+ */
+struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The node_id of the non-target end of the route
+ */
+void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The short_channel_id of this channel
+ */
+uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The short_channel_id of this channel
+ */
+void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The fees which must be paid to use this channel
+ */
+struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The fees which must be paid to use this channel
+ */
+void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
+
+/**
+ * The difference in CLTV values between this node and the next node.
+ */
+uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The difference in CLTV values between this node and the next node.
+ */
+void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
+
+/**
+ * The minimum value, in msat, which must be relayed to the next hop.
+ */
+struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The minimum value, in msat, which must be relayed to the next hop.
+ */
+void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * The maximum value in msat available for routing with a single HTLC.
+ */
+struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum value in msat available for routing with a single HTLC.
+ */
+void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+
+/**
+ * Constructs a new RouteHintHop given each field
+ */
+MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+
+/**
+ * Creates a copy of the RouteHintHop
+ */
+struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
+
+/**
+ * Generates a non-cryptographic 64-bit hash of the RouteHintHop.
+ */
+uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
+
+/**
+ * Checks if two RouteHintHops contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
+ */
+bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
+
+/**
+ * Serialize the RouteHintHop object into a byte array which can be read by RouteHintHop_read
+ */
+struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
+
+/**
+ * Read a RouteHintHop from a byte array, created by RouteHintHop_write
+ */
+struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the FirstHopCandidate, if is_owned is set and inner is non-NULL.
+ */
+void FirstHopCandidate_free(struct LDKFirstHopCandidate this_obj);
+
+/**
+ * Creates a copy of the FirstHopCandidate
+ */
+struct LDKFirstHopCandidate FirstHopCandidate_clone(const struct LDKFirstHopCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the PublicHopCandidate, if is_owned is set and inner is non-NULL.
+ */
+void PublicHopCandidate_free(struct LDKPublicHopCandidate this_obj);
+
+/**
+ * The short channel ID of the channel, i.e. the identifier by which we refer to this
+ * channel.
+ */
+uint64_t PublicHopCandidate_get_short_channel_id(const struct LDKPublicHopCandidate *NONNULL_PTR this_ptr);
+
+/**
+ * The short channel ID of the channel, i.e. the identifier by which we refer to this
+ * channel.
+ */
+void PublicHopCandidate_set_short_channel_id(struct LDKPublicHopCandidate *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Creates a copy of the PublicHopCandidate
+ */
+struct LDKPublicHopCandidate PublicHopCandidate_clone(const struct LDKPublicHopCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the PrivateHopCandidate, if is_owned is set and inner is non-NULL.
+ */
+void PrivateHopCandidate_free(struct LDKPrivateHopCandidate this_obj);
+
+/**
+ * Creates a copy of the PrivateHopCandidate
+ */
+struct LDKPrivateHopCandidate PrivateHopCandidate_clone(const struct LDKPrivateHopCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the BlindedPathCandidate, if is_owned is set and inner is non-NULL.
+ */
+void BlindedPathCandidate_free(struct LDKBlindedPathCandidate this_obj);
+
+/**
+ * Creates a copy of the BlindedPathCandidate
+ */
+struct LDKBlindedPathCandidate BlindedPathCandidate_clone(const struct LDKBlindedPathCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the OneHopBlindedPathCandidate, if is_owned is set and inner is non-NULL.
+ */
+void OneHopBlindedPathCandidate_free(struct LDKOneHopBlindedPathCandidate this_obj);
+
+/**
+ * Creates a copy of the OneHopBlindedPathCandidate
+ */
+struct LDKOneHopBlindedPathCandidate OneHopBlindedPathCandidate_clone(const struct LDKOneHopBlindedPathCandidate *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the CandidateRouteHop
+ */
+void CandidateRouteHop_free(struct LDKCandidateRouteHop this_ptr);
+
+/**
+ * Creates a copy of the CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_clone(const struct LDKCandidateRouteHop *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new FirstHop-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_first_hop(struct LDKFirstHopCandidate a);
+
+/**
+ * Utility method to constructs a new PublicHop-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_public_hop(struct LDKPublicHopCandidate a);
+
+/**
+ * Utility method to constructs a new PrivateHop-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_private_hop(struct LDKPrivateHopCandidate a);
+
+/**
+ * Utility method to constructs a new Blinded-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_blinded(struct LDKBlindedPathCandidate a);
+
+/**
+ * Utility method to constructs a new OneHopBlinded-variant CandidateRouteHop
+ */
+struct LDKCandidateRouteHop CandidateRouteHop_one_hop_blinded(struct LDKOneHopBlindedPathCandidate a);
+
+/**
+ * Returns the globally unique short channel ID for this hop, if one is known.
+ *
+ * This only returns `Some` if the channel is public (either our own, or one we've learned
+ * from the public network graph), and thus the short channel ID we have for this channel is
+ * globally unique and identifies this channel in a global namespace.
+ */
+MUST_USE_RES struct LDKCOption_u64Z CandidateRouteHop_globally_unique_short_channel_id(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the required difference in HTLC CLTV expiry between the [`Self::source`] and the
+ * next-hop for an HTLC taking this hop.
+ *
+ * This is the time that the node(s) in this hop have to claim the HTLC on-chain if the
+ * next-hop goes on chain with a payment preimage.
+ */
+MUST_USE_RES uint32_t CandidateRouteHop_cltv_expiry_delta(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the minimum amount that can be sent over this hop, in millisatoshis.
+ */
+MUST_USE_RES uint64_t CandidateRouteHop_htlc_minimum_msat(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the fees that must be paid to route an HTLC over this channel.
+ */
+MUST_USE_RES struct LDKRoutingFees CandidateRouteHop_fees(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the source node id of current hop.
+ *
+ * Source node id refers to the node forwarding the HTLC through this hop.
+ *
+ * For [`Self::FirstHop`] we return payer's node id.
+ */
+MUST_USE_RES struct LDKNodeId CandidateRouteHop_source(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Returns the target node id of this hop, if known.
+ *
+ * Target node id refers to the node receiving the HTLC after this hop.
+ *
+ * For [`Self::Blinded`] we return `None` because the ultimate destination after the blinded
+ * path is unknown.
+ *
+ * For [`Self::OneHopBlinded`] we return `None` because the target is the same as the source,
+ * and such a return value would be somewhat nonsensical.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+MUST_USE_RES struct LDKNodeId CandidateRouteHop_target(const struct LDKCandidateRouteHop *NONNULL_PTR this_arg);
+
+/**
+ * Finds a route from us (payer) to the given target node (payee).
+ *
+ * If the payee provided features in their invoice, they should be provided via the `payee` field
+ * in the given [`RouteParameters::payment_params`].
+ * Without this, MPP will only be used if the payee's features are available in the network graph.
+ *
+ * Private routing paths between a public node and the target may be included in the `payee` field
+ * of [`RouteParameters::payment_params`].
+ *
+ * If some channels aren't announced, it may be useful to fill in `first_hops` with the results
+ * from [`ChannelManager::list_usable_channels`]. If it is filled in, the view of these channels
+ * from `network_graph` will be ignored, and only those in `first_hops` will be used.
+ *
+ * The fees on channels from us to the next hop are ignored as they are assumed to all be equal.
+ * However, the enabled/disabled bit on such channels as well as the `htlc_minimum_msat` /
+ * `htlc_maximum_msat` *are* checked as they may change based on the receiving node.
+ *
+ * # Panics
+ *
+ * Panics if first_hops contains channels without `short_channel_id`s;
+ * [`ChannelManager::list_usable_channels`] will never include such channels.
+ *
+ * [`ChannelManager::list_usable_channels`]: crate::ln::channelmanager::ChannelManager::list_usable_channels
+ * [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed
+ * [`NetworkGraph`]: crate::routing::gossip::NetworkGraph
+ *
+ * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR route_params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScoreLookUp *NONNULL_PTR scorer, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR score_params, const uint8_t (*random_seed_bytes)[32]);
+
+/**
+ * Construct a route from us (payer) to the target node (payee) via the given hops (which should
+ * exclude the payer, but include the payee). This may be useful, e.g., for probing the chosen path.
+ *
+ * Re-uses logic from `find_route`, so the restrictions described there also apply here.
+ */
+struct LDKCResult_RouteLightningErrorZ build_route_from_hops(struct LDKPublicKey our_node_pubkey, struct LDKCVec_PublicKeyZ hops, const struct LDKRouteParameters *NONNULL_PTR route_params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, const uint8_t (*random_seed_bytes)[32]);
+
+/**
+ * Calls the free function if one is set
+ */
+void ScoreLookUp_free(struct LDKScoreLookUp this_ptr);
+
+/**
+ * Calls the free function if one is set
+ */
+void ScoreUpdate_free(struct LDKScoreUpdate this_ptr);
+
+/**
+ * Calls the free function if one is set
+ */
+void Score_free(struct LDKScore this_ptr);
+
+/**
+ * Calls the free function if one is set
+ */
+void LockableScore_free(struct LDKLockableScore this_ptr);
+
+/**
+ * Calls the free function if one is set
+ */
+void WriteableScore_free(struct LDKWriteableScore this_ptr);
+
+/**
+ * Frees any resources used by the MultiThreadedLockableScore, if is_owned is set and inner is non-NULL.
+ */
+void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
+
+/**
+ * Constructs a new LockableScore which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned LockableScore must be freed before this_arg is
+ */
+struct LDKLockableScore MultiThreadedLockableScore_as_LockableScore(const struct LDKMultiThreadedLockableScore *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the MultiThreadedLockableScore object into a byte array which can be read by MultiThreadedLockableScore_read
+ */
+struct LDKCVec_u8Z MultiThreadedLockableScore_write(const struct LDKMultiThreadedLockableScore *NONNULL_PTR obj);
+
+/**
+ * Constructs a new WriteableScore which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned WriteableScore must be freed before this_arg is
+ */
+struct LDKWriteableScore MultiThreadedLockableScore_as_WriteableScore(const struct LDKMultiThreadedLockableScore *NONNULL_PTR this_arg);
+
+/**
+ * Creates a new [`MultiThreadedLockableScore`] given an underlying [`Score`].
+ */
+MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
+
+/**
+ * Frees any resources used by the MultiThreadedScoreLockRead, if is_owned is set and inner is non-NULL.
+ */
+void MultiThreadedScoreLockRead_free(struct LDKMultiThreadedScoreLockRead this_obj);
+
+/**
+ * Frees any resources used by the MultiThreadedScoreLockWrite, if is_owned is set and inner is non-NULL.
+ */
+void MultiThreadedScoreLockWrite_free(struct LDKMultiThreadedScoreLockWrite this_obj);
+
+/**
+ * Constructs a new ScoreLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreLookUp must be freed before this_arg is
+ */
+struct LDKScoreLookUp MultiThreadedScoreLockRead_as_ScoreLookUp(const struct LDKMultiThreadedScoreLockRead *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the MultiThreadedScoreLockWrite object into a byte array which can be read by MultiThreadedScoreLockWrite_read
+ */
+struct LDKCVec_u8Z MultiThreadedScoreLockWrite_write(const struct LDKMultiThreadedScoreLockWrite *NONNULL_PTR obj);
+
+/**
+ * Constructs a new ScoreUpdate which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreUpdate must be freed before this_arg is
+ */
+struct LDKScoreUpdate MultiThreadedScoreLockWrite_as_ScoreUpdate(const struct LDKMultiThreadedScoreLockWrite *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the ChannelUsage, if is_owned is set and inner is non-NULL.
+ */
+void ChannelUsage_free(struct LDKChannelUsage this_obj);
+
+/**
+ * The amount to send through the channel, denominated in millisatoshis.
+ */
+uint64_t ChannelUsage_get_amount_msat(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+
+/**
+ * The amount to send through the channel, denominated in millisatoshis.
+ */
+void ChannelUsage_set_amount_msat(struct LDKChannelUsage *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * Total amount, denominated in millisatoshis, already allocated to send through the channel
+ * as part of a multi-path payment.
+ */
+uint64_t ChannelUsage_get_inflight_htlc_msat(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+
+/**
+ * Total amount, denominated in millisatoshis, already allocated to send through the channel
+ * as part of a multi-path payment.
+ */
+void ChannelUsage_set_inflight_htlc_msat(struct LDKChannelUsage *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * The effective capacity of the channel.
+ */
+struct LDKEffectiveCapacity ChannelUsage_get_effective_capacity(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+
+/**
+ * The effective capacity of the channel.
+ */
+void ChannelUsage_set_effective_capacity(struct LDKChannelUsage *NONNULL_PTR this_ptr, struct LDKEffectiveCapacity val);
+
+/**
+ * Constructs a new ChannelUsage given each field
+ */
+MUST_USE_RES struct LDKChannelUsage ChannelUsage_new(uint64_t amount_msat_arg, uint64_t inflight_htlc_msat_arg, struct LDKEffectiveCapacity effective_capacity_arg);
+
+/**
+ * Creates a copy of the ChannelUsage
+ */
+struct LDKChannelUsage ChannelUsage_clone(const struct LDKChannelUsage *NONNULL_PTR orig);
+
+/**
+ * Frees any resources used by the FixedPenaltyScorer, if is_owned is set and inner is non-NULL.
+ */
+void FixedPenaltyScorer_free(struct LDKFixedPenaltyScorer this_obj);
+
+/**
+ * Creates a copy of the FixedPenaltyScorer
+ */
+struct LDKFixedPenaltyScorer FixedPenaltyScorer_clone(const struct LDKFixedPenaltyScorer *NONNULL_PTR orig);
+
+/**
+ * Creates a new scorer using `penalty_msat`.
+ */
+MUST_USE_RES struct LDKFixedPenaltyScorer FixedPenaltyScorer_with_penalty(uint64_t penalty_msat);
+
+/**
+ * Constructs a new ScoreLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreLookUp must be freed before this_arg is
+ */
+struct LDKScoreLookUp FixedPenaltyScorer_as_ScoreLookUp(const struct LDKFixedPenaltyScorer *NONNULL_PTR this_arg);
+
+/**
+ * Constructs a new ScoreUpdate which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreUpdate must be freed before this_arg is
+ */
+struct LDKScoreUpdate FixedPenaltyScorer_as_ScoreUpdate(const struct LDKFixedPenaltyScorer *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the FixedPenaltyScorer object into a byte array which can be read by FixedPenaltyScorer_read
+ */
+struct LDKCVec_u8Z FixedPenaltyScorer_write(const struct LDKFixedPenaltyScorer *NONNULL_PTR obj);
+
+/**
+ * Read a FixedPenaltyScorer from a byte array, created by FixedPenaltyScorer_write
+ */
+struct LDKCResult_FixedPenaltyScorerDecodeErrorZ FixedPenaltyScorer_read(struct LDKu8slice ser, uint64_t arg);
+
+/**
+ * Frees any resources used by the ProbabilisticScorer, if is_owned is set and inner is non-NULL.
+ */
+void ProbabilisticScorer_free(struct LDKProbabilisticScorer this_obj);
+
+/**
+ * Frees any resources used by the ProbabilisticScoringFeeParameters, if is_owned is set and inner is non-NULL.
+ */
+void ProbabilisticScoringFeeParameters_free(struct LDKProbabilisticScoringFeeParameters this_obj);
+
+/**
+ * A fixed penalty in msats to apply to each channel.
+ *
+ * Default value: 500 msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_base_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A fixed penalty in msats to apply to each channel.
+ *
+ * Default value: 500 msat
+ */
+void ProbabilisticScoringFeeParameters_set_base_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used with the total amount flowing over a channel to calculate a fixed penalty
+ * applied to each channel, in excess of the [`base_penalty_msat`].
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
+ * fees plus penalty) for large payments. The penalty is computed as the product of this
+ * multiplier and `2^30`ths of the total amount flowing over a channel (i.e. the payment
+ * amount plus the amount of any other HTLCs flowing we sent over the same channel).
+ *
+ * ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
+ *
+ * Default value: 8,192 msat
+ *
+ * [`base_penalty_msat`]: Self::base_penalty_msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_base_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used with the total amount flowing over a channel to calculate a fixed penalty
+ * applied to each channel, in excess of the [`base_penalty_msat`].
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
+ * fees plus penalty) for large payments. The penalty is computed as the product of this
+ * multiplier and `2^30`ths of the total amount flowing over a channel (i.e. the payment
+ * amount plus the amount of any other HTLCs flowing we sent over the same channel).
+ *
+ * ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
+ *
+ * Default value: 8,192 msat
+ *
+ * [`base_penalty_msat`]: Self::base_penalty_msat
+ */
+void ProbabilisticScoringFeeParameters_set_base_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for a payment, as determined by our latest estimates of the channel's
+ * liquidity, to determine the liquidity penalty.
+ *
+ * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
+ * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
+ * penalty is effectively limited to `2 * liquidity_penalty_multiplier_msat` (corresponding to
+ * lower bounding the success probability to `0.01`) when the amount falls within the
+ * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
+ * result in a `u64::max_value` penalty, however.
+ *
+ * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+ *
+ * Default value: 30,000 msat
+ *
+ * [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for a payment, as determined by our latest estimates of the channel's
+ * liquidity, to determine the liquidity penalty.
+ *
+ * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
+ * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
+ * penalty is effectively limited to `2 * liquidity_penalty_multiplier_msat` (corresponding to
+ * lower bounding the success probability to `0.01`) when the amount falls within the
+ * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
+ * result in a `u64::max_value` penalty, however.
+ *
+ * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
+ *
+ * Default value: 30,000 msat
+ *
+ * [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
+ */
+void ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used in conjunction with the total amount flowing over a channel and the
+ * negative `log10` of the channel's success probability for the payment, as determined by our
+ * latest estimates of the channel's liquidity, to determine the amount penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
+ * fees plus penalty) for large payments. The penalty is computed as the product of this
+ * multiplier and `2^20`ths of the amount flowing over this channel, weighted by the negative
+ * `log10` of the success probability.
+ *
+ * `-log10(success_probability) * liquidity_penalty_amount_multiplier_msat * amount_msat / 2^20`
+ *
+ * In practice, this means for 0.1 success probability (`-log10(0.1) == 1`) each `2^20`th of
+ * the amount will result in a penalty of the multiplier. And, as the success probability
+ * decreases, the negative `log10` weighting will increase dramatically. For higher success
+ * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
+ * fall below `1`.
+ *
+ * Default value: 192 msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used in conjunction with the total amount flowing over a channel and the
+ * negative `log10` of the channel's success probability for the payment, as determined by our
+ * latest estimates of the channel's liquidity, to determine the amount penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
+ * fees plus penalty) for large payments. The penalty is computed as the product of this
+ * multiplier and `2^20`ths of the amount flowing over this channel, weighted by the negative
+ * `log10` of the success probability.
+ *
+ * `-log10(success_probability) * liquidity_penalty_amount_multiplier_msat * amount_msat / 2^20`
+ *
+ * In practice, this means for 0.1 success probability (`-log10(0.1) == 1`) each `2^20`th of
+ * the amount will result in a penalty of the multiplier. And, as the success probability
+ * decreases, the negative `log10` weighting will increase dramatically. For higher success
+ * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
+ * fall below `1`.
+ *
+ * Default value: 192 msat
+ */
+void ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for the payment, as determined based on the history of our estimates of the
+ * channel's available liquidity, to determine a penalty.
+ *
+ * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+ * only our latest estimate for the current liquidity available in the channel, it estimates
+ * success probability based on the estimated liquidity available in the channel through
+ * history. Specifically, every time we update our liquidity bounds on a given channel, we
+ * track which of several buckets those bounds fall into, exponentially decaying the
+ * probability of each bucket as new samples are added.
+ *
+ * Default value: 10,000 msat
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used in conjunction with the negative `log10` of the channel's success
+ * probability for the payment, as determined based on the history of our estimates of the
+ * channel's available liquidity, to determine a penalty.
+ *
+ * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
+ * only our latest estimate for the current liquidity available in the channel, it estimates
+ * success probability based on the estimated liquidity available in the channel through
+ * history. Specifically, every time we update our liquidity bounds on a given channel, we
+ * track which of several buckets those bounds fall into, exponentially decaying the
+ * probability of each bucket as new samples are added.
+ *
+ * Default value: 10,000 msat
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ */
+void ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * A multiplier used in conjunction with the total amount flowing over a channel and the
+ * negative `log10` of the channel's success probability for the payment, as determined based
+ * on the history of our estimates of the channel's available liquidity, to determine a
+ * penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+ * large payments. The penalty is computed as the product of this multiplier and `2^20`ths
+ * of the amount flowing over this channel, weighted by the negative `log10` of the success
+ * probability.
+ *
+ * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+ * of using only our latest estimate for the current liquidity available in the channel, it
+ * estimates success probability based on the estimated liquidity available in the channel
+ * through history. Specifically, every time we update our liquidity bounds on a given
+ * channel, we track which of several buckets those bounds fall into, exponentially decaying
+ * the probability of each bucket as new samples are added.
+ *
+ * Default value: 64 msat
+ *
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * A multiplier used in conjunction with the total amount flowing over a channel and the
+ * negative `log10` of the channel's success probability for the payment, as determined based
+ * on the history of our estimates of the channel's available liquidity, to determine a
+ * penalty.
+ *
+ * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
+ * large payments. The penalty is computed as the product of this multiplier and `2^20`ths
+ * of the amount flowing over this channel, weighted by the negative `log10` of the success
+ * probability.
+ *
+ * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
+ * of using only our latest estimate for the current liquidity available in the channel, it
+ * estimates success probability based on the estimated liquidity available in the channel
+ * through history. Specifically, every time we update our liquidity bounds on a given
+ * channel, we track which of several buckets those bounds fall into, exponentially decaying
+ * the probability of each bucket as new samples are added.
+ *
+ * Default value: 64 msat
+ *
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ */
+void ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
+ * channel's capacity, (ie. htlc_maximum_msat >= 0.5 * channel_capacity) which makes us
+ * prefer nodes with a smaller `htlc_maximum_msat`. We treat such nodes preferentially
+ * as this makes balance discovery attacks harder to execute, thereby creating an incentive
+ * to restrict `htlc_maximum_msat` and improve privacy.
+ *
+ * Default value: 250 msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
+ * channel's capacity, (ie. htlc_maximum_msat >= 0.5 * channel_capacity) which makes us
+ * prefer nodes with a smaller `htlc_maximum_msat`. We treat such nodes preferentially
+ * as this makes balance discovery attacks harder to execute, thereby creating an incentive
+ * to restrict `htlc_maximum_msat` and improve privacy.
+ *
+ * Default value: 250 msat
+ */
+void ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * This penalty is applied when the total amount flowing over a channel exceeds our current
+ * estimate of the channel's available liquidity. The total amount is the amount of the
+ * current HTLC plus any HTLCs which we've sent over the same channel.
+ *
+ * Note that in this case all other penalties, including the
+ * [`liquidity_penalty_multiplier_msat`] and [`liquidity_penalty_amount_multiplier_msat`]-based
+ * penalties, as well as the [`base_penalty_msat`] and the [`anti_probing_penalty_msat`], if
+ * applicable, are still included in the overall penalty.
+ *
+ * If you wish to avoid creating paths with such channels entirely, setting this to a value of
+ * `u64::max_value()` will guarantee that.
+ *
+ * Default value: 1_0000_0000_000 msat (1 Bitcoin)
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ * [`base_penalty_msat`]: Self::base_penalty_msat
+ * [`anti_probing_penalty_msat`]: Self::anti_probing_penalty_msat
+ */
+uint64_t ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * This penalty is applied when the total amount flowing over a channel exceeds our current
+ * estimate of the channel's available liquidity. The total amount is the amount of the
+ * current HTLC plus any HTLCs which we've sent over the same channel.
+ *
+ * Note that in this case all other penalties, including the
+ * [`liquidity_penalty_multiplier_msat`] and [`liquidity_penalty_amount_multiplier_msat`]-based
+ * penalties, as well as the [`base_penalty_msat`] and the [`anti_probing_penalty_msat`], if
+ * applicable, are still included in the overall penalty.
+ *
+ * If you wish to avoid creating paths with such channels entirely, setting this to a value of
+ * `u64::max_value()` will guarantee that.
+ *
+ * Default value: 1_0000_0000_000 msat (1 Bitcoin)
+ *
+ * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ * [`base_penalty_msat`]: Self::base_penalty_msat
+ * [`anti_probing_penalty_msat`]: Self::anti_probing_penalty_msat
+ */
+void ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+
+/**
+ * In order to calculate most of the scores above, we must first convert a lower and upper
+ * bound on the available liquidity in a channel into the probability that we think a payment
+ * will succeed. That probability is derived from a Probability Density Function for where we
+ * think the liquidity in a channel likely lies, given such bounds.
+ *
+ * If this flag is set, that PDF is simply a constant - we assume that the actual available
+ * liquidity in a channel is just as likely to be at any point between our lower and upper
+ * bounds.
+ *
+ * If this flag is *not* set, that PDF is `(x - 0.5*capacity) ^ 2`. That is, we use an
+ * exponential curve which expects the liquidity of a channel to lie \"at the edges\". This
+ * matches experimental results - most routing nodes do not aggressively rebalance their
+ * channels and flows in the network are often unbalanced, leaving liquidity usually
+ * unavailable.
+ *
+ * Thus, for the \"best\" routes, leave this flag `false`. However, the flag does imply a number
+ * of floating-point multiplications in the hottest routing code, which may lead to routing
+ * performance degradation on some machines.
+ *
+ * Default value: false
+ */
+bool ProbabilisticScoringFeeParameters_get_linear_success_probability(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+
+/**
+ * In order to calculate most of the scores above, we must first convert a lower and upper
+ * bound on the available liquidity in a channel into the probability that we think a payment
+ * will succeed. That probability is derived from a Probability Density Function for where we
+ * think the liquidity in a channel likely lies, given such bounds.
+ *
+ * If this flag is set, that PDF is simply a constant - we assume that the actual available
+ * liquidity in a channel is just as likely to be at any point between our lower and upper
+ * bounds.
+ *
+ * If this flag is *not* set, that PDF is `(x - 0.5*capacity) ^ 2`. That is, we use an
+ * exponential curve which expects the liquidity of a channel to lie \"at the edges\". This
+ * matches experimental results - most routing nodes do not aggressively rebalance their
+ * channels and flows in the network are often unbalanced, leaving liquidity usually
+ * unavailable.
+ *
+ * Thus, for the \"best\" routes, leave this flag `false`. However, the flag does imply a number
+ * of floating-point multiplications in the hottest routing code, which may lead to routing
+ * performance degradation on some machines.
+ *
+ * Default value: false
+ */
+void ProbabilisticScoringFeeParameters_set_linear_success_probability(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, bool val);
+
+/**
+ * Creates a copy of the ProbabilisticScoringFeeParameters
+ */
+struct LDKProbabilisticScoringFeeParameters ProbabilisticScoringFeeParameters_clone(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR orig);
+
+/**
+ * Creates a "default" ProbabilisticScoringFeeParameters. See struct and individual field documentaiton for details on which values are used.
+ */
+MUST_USE_RES struct LDKProbabilisticScoringFeeParameters ProbabilisticScoringFeeParameters_default(void);
+
+/**
+ * Marks the node with the given `node_id` as banned,
+ * i.e it will be avoided during path finding.
+ */
+void ProbabilisticScoringFeeParameters_add_banned(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Marks all nodes in the given list as banned, i.e.,
+ * they will be avoided during path finding.
+ */
+void ProbabilisticScoringFeeParameters_add_banned_from_list(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, struct LDKCVec_NodeIdZ node_ids);
+
+/**
+ * Removes the node with the given `node_id` from the list of nodes to avoid.
+ */
+void ProbabilisticScoringFeeParameters_remove_banned(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Sets a manual penalty for the given node.
+ */
+void ProbabilisticScoringFeeParameters_set_manual_penalty(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id, uint64_t penalty);
+
+/**
+ * Removes the node with the given `node_id` from the list of manual penalties.
+ */
+void ProbabilisticScoringFeeParameters_remove_manual_penalty(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Clears the list of manual penalties that are applied during path finding.
+ */
+void ProbabilisticScoringFeeParameters_clear_manual_penalties(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg);
+
+/**
+ * Frees any resources used by the ProbabilisticScoringDecayParameters, if is_owned is set and inner is non-NULL.
+ */
+void ProbabilisticScoringDecayParameters_free(struct LDKProbabilisticScoringDecayParameters this_obj);
+
+/**
+ * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+ * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+ * seen a liquidity estimate update for this amount of time, the historical datapoints are
+ * decayed by half.
+ * For an example of historical_no_updates_half_life being used see [`historical_estimated_channel_liquidity_probabilities`]
+ *
+ * Note that after 16 or more half lives all historical data will be completely gone.
+ *
+ * Default value: 14 days
+ *
+ * [`historical_estimated_channel_liquidity_probabilities`]: ProbabilisticScorer::historical_estimated_channel_liquidity_probabilities
+ */
+uint64_t ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life(const struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr);
+
+/**
+ * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
+ * tracking can simply live on with increasingly stale data. Instead, when a channel has not
+ * seen a liquidity estimate update for this amount of time, the historical datapoints are
+ * decayed by half.
+ * For an example of historical_no_updates_half_life being used see [`historical_estimated_channel_liquidity_probabilities`]
+ *
+ * Note that after 16 or more half lives all historical data will be completely gone.
+ *
+ * Default value: 14 days
+ *
+ * [`historical_estimated_channel_liquidity_probabilities`]: ProbabilisticScorer::historical_estimated_channel_liquidity_probabilities
+ */
+void ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life(struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Constructs a new NodeAlias given each field
+ * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+ * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+ * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+ * capacity.
+ *
+ * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+ * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+ * struct documentation for more info on the way the liquidity bounds are used.
+ *
+ * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+ * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+ * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
+ *
+ * Default value: 6 hours
+ *
+ * # Note
+ *
+ * When built with the `no-std` feature, time will never elapse. Therefore, the channel
+ * liquidity knowledge will never decay except when the bounds cross.
  */
-MUST_USE_RES struct LDKNodeAlias NodeAlias_new(struct LDKThirtyTwoBytes a_arg);
+uint64_t ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life(const struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr);
 
 /**
- * Creates a copy of the NodeAlias
+ * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
+ * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
+ * the available liquidity is halved and the upper-bound moves half-way to the channel's total
+ * capacity.
+ *
+ * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
+ * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
+ * struct documentation for more info on the way the liquidity bounds are used.
+ *
+ * For example, if the channel's capacity is 1 million sats, and the current upper and lower
+ * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
+ * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
+ *
+ * Default value: 6 hours
+ *
+ * # Note
+ *
+ * When built with the `no-std` feature, time will never elapse. Therefore, the channel
+ * liquidity knowledge will never decay except when the bounds cross.
  */
-struct LDKNodeAlias NodeAlias_clone(const struct LDKNodeAlias *NONNULL_PTR orig);
+void ProbabilisticScoringDecayParameters_set_liquidity_offset_half_life(struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Checks if two NodeAliass contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Constructs a new ProbabilisticScoringDecayParameters given each field
  */
-bool NodeAlias_eq(const struct LDKNodeAlias *NONNULL_PTR a, const struct LDKNodeAlias *NONNULL_PTR b);
+MUST_USE_RES struct LDKProbabilisticScoringDecayParameters ProbabilisticScoringDecayParameters_new(uint64_t historical_no_updates_half_life_arg, uint64_t liquidity_offset_half_life_arg);
 
 /**
- * Serialize the NodeAlias object into a byte array which can be read by NodeAlias_read
+ * Creates a copy of the ProbabilisticScoringDecayParameters
  */
-struct LDKCVec_u8Z NodeAlias_write(const struct LDKNodeAlias *NONNULL_PTR obj);
+struct LDKProbabilisticScoringDecayParameters ProbabilisticScoringDecayParameters_clone(const struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR orig);
 
 /**
- * Read a NodeAlias from a byte array, created by NodeAlias_write
+ * Creates a "default" ProbabilisticScoringDecayParameters. See struct and individual field documentaiton for details on which values are used.
  */
-struct LDKCResult_NodeAliasDecodeErrorZ NodeAlias_read(struct LDKu8slice ser);
+MUST_USE_RES struct LDKProbabilisticScoringDecayParameters ProbabilisticScoringDecayParameters_default(void);
 
 /**
- * Frees any resources used by the NodeInfo, if is_owned is set and inner is non-NULL.
+ * Creates a new scorer using the given scoring parameters for sending payments from a node
+ * through a network graph.
  */
-void NodeInfo_free(struct LDKNodeInfo this_obj);
+MUST_USE_RES struct LDKProbabilisticScorer ProbabilisticScorer_new(struct LDKProbabilisticScoringDecayParameters decay_params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
 
 /**
- * All valid channels a node has announced
+ * Dump the contents of this scorer into the configured logger.
  *
- * Returns a copy of the field.
+ * Note that this writes roughly one line per channel for which we have a liquidity estimate,
+ * which may be a substantial amount of log output.
  */
-struct LDKCVec_u64Z NodeInfo_get_channels(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+void ProbabilisticScorer_debug_log_liquidity_stats(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
 
 /**
- * All valid channels a node has announced
+ * Query the estimated minimum and maximum liquidity available for sending a payment over the
+ * channel with `scid` towards the given `target` node.
  */
-void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+MUST_USE_RES struct LDKCOption_C2Tuple_u64u64ZZ ProbabilisticScorer_estimated_channel_liquidity_range(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target);
 
 /**
- * More information about a node from node_announcement.
- * Optional because we store a Node entry after learning about it from
- * a channel announcement, but before receiving a node announcement.
+ * Query the historical estimated minimum and maximum liquidity available for sending a
+ * payment over the channel with `scid` towards the given `target` node.
  *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Returns two sets of 32 buckets. The first set describes the lower-bound liquidity history,
+ * the second set describes the upper-bound liquidity history. Each bucket describes the
+ * relative frequency at which we've seen a liquidity bound in the bucket's range relative to
+ * the channel's total capacity, on an arbitrary scale. Because the values are slowly decayed,
+ * more recent data points are weighted more heavily than older datapoints.
+ *
+ * Note that the range of each bucket varies by its location to provide more granular results
+ * at the edges of a channel's capacity, where it is more likely to sit.
+ *
+ * When scoring, the estimated probability that an upper-/lower-bound lies in a given bucket
+ * is calculated by dividing that bucket's value with the total value of all buckets.
+ *
+ * For example, using a lower bucket count for illustrative purposes, a value of
+ * `[0, 0, 0, ..., 0, 32]` indicates that we believe the probability of a bound being very
+ * close to the channel's capacity to be 100%, and have never (recently) seen it in any other
+ * bucket. A value of `[31, 0, 0, ..., 0, 0, 32]` indicates we've seen the bound being both
+ * in the top and bottom bucket, and roughly with similar (recent) frequency.
+ *
+ * Because the datapoints are decayed slowly over time, values will eventually return to
+ * `Some(([0; 32], [0; 32]))` or `None` if no data remains for a channel.
+ *
+ * In order to fetch a single success probability from the buckets provided here, as used in
+ * the scoring model, see [`Self::historical_estimated_payment_success_probability`].
  */
-struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKCOption_C2Tuple_ThirtyTwoU16sThirtyTwoU16sZZ ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target);
 
 /**
- * More information about a node from node_announcement.
- * Optional because we store a Node entry after learning about it from
- * a channel announcement, but before receiving a node announcement.
+ * Query the probability of payment success sending the given `amount_msat` over the channel
+ * with `scid` towards the given `target` node, based on the historical estimated liquidity
+ * bounds.
  *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * These are the same bounds as returned by
+ * [`Self::historical_estimated_channel_liquidity_probabilities`] (but not those returned by
+ * [`Self::estimated_channel_liquidity_range`]).
  */
-void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
+MUST_USE_RES struct LDKCOption_f64Z ProbabilisticScorer_historical_estimated_payment_success_probability(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target, uint64_t amount_msat, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR params);
 
 /**
- * Constructs a new NodeInfo given each field
+ * Constructs a new ScoreLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreLookUp must be freed before this_arg is
  */
-MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
+struct LDKScoreLookUp ProbabilisticScorer_as_ScoreLookUp(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the NodeInfo
+ * Constructs a new ScoreUpdate which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ScoreUpdate must be freed before this_arg is
  */
-struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
+struct LDKScoreUpdate ProbabilisticScorer_as_ScoreUpdate(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
 
 /**
- * Checks if two NodeInfos contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Constructs a new Score which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is
  */
-bool NodeInfo_eq(const struct LDKNodeInfo *NONNULL_PTR a, const struct LDKNodeInfo *NONNULL_PTR b);
+struct LDKScore ProbabilisticScorer_as_Score(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
 
 /**
- * Serialize the NodeInfo object into a byte array which can be read by NodeInfo_read
+ * Serialize the ProbabilisticScorer object into a byte array which can be read by ProbabilisticScorer_read
  */
-struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
+struct LDKCVec_u8Z ProbabilisticScorer_write(const struct LDKProbabilisticScorer *NONNULL_PTR obj);
 
 /**
- * Read a NodeInfo from a byte array, created by NodeInfo_write
+ * Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write
  */
-struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
+struct LDKCResult_ProbabilisticScorerDecodeErrorZ ProbabilisticScorer_read(struct LDKu8slice ser, struct LDKProbabilisticScoringDecayParameters arg_a, const struct LDKNetworkGraph *NONNULL_PTR arg_b, struct LDKLogger arg_c);
 
 /**
- * Serialize the NetworkGraph object into a byte array which can be read by NetworkGraph_read
+ * Frees any resources used by the DelayedPaymentOutputDescriptor, if is_owned is set and inner is non-NULL.
  */
-struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
+void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
 
 /**
- * Read a NetworkGraph from a byte array, created by NetworkGraph_write
+ * The outpoint which is spendable.
  */
-struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser, struct LDKLogger arg);
+struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Creates a new, empty, network graph.
+ * The outpoint which is spendable.
  */
-MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(enum LDKNetwork network, struct LDKLogger logger);
+void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
 
 /**
- * Returns a read-only view of the network graph.
+ * Per commitment point to derive the delayed payment key by key holder.
  */
-MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * The unix timestamp provided by the most recent rapid gossip sync.
- * It will be set by the rapid sync process after every sync completion.
+ * Per commitment point to derive the delayed payment key by key holder.
  */
-MUST_USE_RES struct LDKCOption_u32Z NetworkGraph_get_last_rapid_gossip_sync_timestamp(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * Update the unix timestamp provided by the most recent rapid gossip sync.
- * This should be done automatically by the rapid sync process after every sync completion.
+ * The `nSequence` value which must be set in the spending input to satisfy the `OP_CSV` in
+ * the witness_script.
  */
-void NetworkGraph_set_last_rapid_gossip_sync_timestamp(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint32_t last_rapid_gossip_sync_timestamp);
+uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * For an already known node (from channel announcements), update its stored properties from a
- * given node announcement.
- *
- * You probably don't want to call this directly, instead relying on a P2PGossipSync's
- * RoutingMessageHandler implementation to call it indirectly. This may be useful to accept
- * routing messages from a source using a protocol other than the lightning P2P protocol.
+ * The `nSequence` value which must be set in the spending input to satisfy the `OP_CSV` in
+ * the witness_script.
  */
-MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * For an already known node (from channel announcements), update its stored properties from a
- * given node announcement without verifying the associated signatures. Because we aren't
- * given the associated signatures here we cannot relay the node announcement to any of our
- * peers.
+ * The output which is referenced by the given outpoint.
  */
-MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
+struct LDKTxOut DelayedPaymentOutputDescriptor_get_output(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Store or update channel info from a channel announcement.
- *
- * You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
- * [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
- * routing messages from a source using a protocol other than the lightning P2P protocol.
- *
- * If a [`UtxoLookup`] object is provided via `utxo_lookup`, it will be called to verify
- * the corresponding UTXO exists on chain and is correctly-formatted.
+ * The output which is referenced by the given outpoint.
  */
-MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
 
 /**
- * Store or update channel info from a channel announcement.
- *
- * You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
- * [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
- * routing messages from a source using a protocol other than the lightning P2P protocol.
- *
- * This will skip verification of if the channel is actually on-chain.
+ * The revocation point specific to the commitment transaction which was broadcast. Used to
+ * derive the witnessScript for this output.
  */
-MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement_no_lookup(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg);
+struct LDKRevocationKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Store or update channel info from a channel announcement without verifying the associated
- * signatures. Because we aren't given the associated signatures here we cannot relay the
- * channel announcement to any of our peers.
- *
- * If a [`UtxoLookup`] object is provided via `utxo_lookup`, it will be called to verify
- * the corresponding UTXO exists on chain and is correctly-formatted.
+ * The revocation point specific to the commitment transaction which was broadcast. Used to
+ * derive the witnessScript for this output.
  */
-MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_UtxoLookupZ utxo_lookup);
+void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKRevocationKey val);
 
 /**
- * Update channel from partial announcement data received via rapid gossip sync
- *
- * `timestamp: u64`: Timestamp emulating the backdated original announcement receipt (by the
- * rapid gossip sync server)
- *
- * All other parameters as used in [`msgs::UnsignedChannelAnnouncement`] fields.
+ * Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].
+ * This may be useful in re-deriving keys used in the channel to spend the output.
  */
-MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_add_channel_from_partial_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, uint64_t timestamp, struct LDKChannelFeatures features, struct LDKPublicKey node_id_1, struct LDKPublicKey node_id_2);
+const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
 
 /**
- * Marks a channel in the graph as failed permanently.
- *
- * The channel and any node for which this was their last channel are removed from the graph.
+ * Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].
+ * This may be useful in re-deriving keys used in the channel to spend the output.
  */
-void NetworkGraph_channel_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id);
+void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * Marks a node in the graph as permanently failed, effectively removing it and its channels
- * from local storage.
+ * The value of the channel which this output originated from, possibly indirectly.
  */
-void NetworkGraph_node_failed_permanent(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey node_id);
+uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Removes information about channels that we haven't heard any updates about in some time.
- * This can be used regularly to prune the network graph of channels that likely no longer
- * exist.
- *
- * While there is no formal requirement that nodes regularly re-broadcast their channel
- * updates every two weeks, the non-normative section of BOLT 7 currently suggests that
- * pruning occur for updates which are at least two weeks old, which we implement here.
- *
- * Note that for users of the `lightning-background-processor` crate this method may be
- * automatically called regularly for you.
- *
- * This method will also cause us to stop tracking removed nodes and channels if they have been
- * in the map for a while so that these can be resynced from gossip in the future.
- *
- * This method is only available with the `std` feature. See
- * [`NetworkGraph::remove_stale_channels_and_tracking_with_time`] for `no-std` use.
+ * The value of the channel which this output originated from, possibly indirectly.
  */
-void NetworkGraph_remove_stale_channels_and_tracking(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
+void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Removes information about channels that we haven't heard any updates about in some time.
- * This can be used regularly to prune the network graph of channels that likely no longer
- * exist.
- *
- * While there is no formal requirement that nodes regularly re-broadcast their channel
- * updates every two weeks, the non-normative section of BOLT 7 currently suggests that
- * pruning occur for updates which are at least two weeks old, which we implement here.
+ * The channel public keys and other parameters needed to generate a spending transaction or
+ * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`].
  *
- * This method will also cause us to stop tracking removed nodes and channels if they have been
- * in the map for a while so that these can be resynced from gossip in the future.
+ * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later.
  *
- * This function takes the current unix time as an argument. For users with the `std` feature
- * enabled, [`NetworkGraph::remove_stale_channels_and_tracking`] may be preferable.
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void NetworkGraph_remove_stale_channels_and_tracking_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
+struct LDKChannelTransactionParameters DelayedPaymentOutputDescriptor_get_channel_transaction_parameters(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * For an already known (from announcement) channel, update info about one of the directions
- * of the channel.
+ * The channel public keys and other parameters needed to generate a spending transaction or
+ * to provide to a re-derived signer through [`ChannelSigner::provide_channel_parameters`].
  *
- * You probably don't want to call this directly, instead relying on a P2PGossipSync's
- * RoutingMessageHandler implementation to call it indirectly. This may be useful to accept
- * routing messages from a source using a protocol other than the lightning P2P protocol.
+ * Added as optional, but always `Some` if the descriptor was produced in v0.0.123 or later.
  *
- * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
- * materially in the future will be rejected.
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
+void DelayedPaymentOutputDescriptor_set_channel_transaction_parameters(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val);
 
 /**
- * For an already known (from announcement) channel, update info about one of the directions
- * of the channel without verifying the associated signatures. Because we aren't given the
- * associated signatures here we cannot relay the channel update to any of our peers.
+ * Constructs a new DelayedPaymentOutputDescriptor given each field
  *
- * If built with `no-std`, any updates with a timestamp more than two weeks in the past or
- * materially in the future will be rejected.
+ * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
+MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKRevocationKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg, struct LDKChannelTransactionParameters channel_transaction_parameters_arg);
 
 /**
- * Returns information on a channel with the given id.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Creates a copy of the DelayedPaymentOutputDescriptor
  */
-MUST_USE_RES struct LDKChannelInfo ReadOnlyNetworkGraph_channel(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id);
+struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
 
 /**
- * Returns the list of channels in the graph
+ * Generates a non-cryptographic 64-bit hash of the DelayedPaymentOutputDescriptor.
  */
-MUST_USE_RES struct LDKCVec_u64Z ReadOnlyNetworkGraph_list_channels(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+uint64_t DelayedPaymentOutputDescriptor_hash(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR o);
 
 /**
- * Returns information on a node with the given id.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Checks if two DelayedPaymentOutputDescriptors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-MUST_USE_RES struct LDKNodeInfo ReadOnlyNetworkGraph_node(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+bool DelayedPaymentOutputDescriptor_eq(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR b);
 
 /**
- * Returns the list of nodes in the graph
+ * Serialize the DelayedPaymentOutputDescriptor object into a byte array which can be read by DelayedPaymentOutputDescriptor_read
  */
-MUST_USE_RES struct LDKCVec_NodeIdZ ReadOnlyNetworkGraph_list_nodes(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg);
+struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
 
 /**
- * Get network addresses by node id.
- * Returns None if the requested node is completely unknown,
- * or if node announcement for the node was never received.
+ * Read a DelayedPaymentOutputDescriptor from a byte array, created by DelayedPaymentOutputDescriptor_write
  */
-MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
+struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
 
 /**
- * Frees any resources used by the DefaultRouter, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the StaticPaymentOutputDescriptor, if is_owned is set and inner is non-NULL.
  */
-void DefaultRouter_free(struct LDKDefaultRouter this_obj);
+void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
 
 /**
- * Creates a new router.
+ * The outpoint which is spendable.
  */
-MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, struct LDKThirtyTwoBytes random_seed_bytes, struct LDKLockableScore scorer, struct LDKProbabilisticScoringFeeParameters score_params);
+struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a new Router which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned Router must be freed before this_arg is
+ * The outpoint which is spendable.
  */
-struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
+void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
 
 /**
- * Calls the free function if one is set
+ * The output which is referenced by the given outpoint.
  */
-void Router_free(struct LDKRouter this_ptr);
+struct LDKTxOut StaticPaymentOutputDescriptor_get_output(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the ScorerAccountingForInFlightHtlcs, if is_owned is set and inner is non-NULL.
+ * The output which is referenced by the given outpoint.
  */
-void ScorerAccountingForInFlightHtlcs_free(struct LDKScorerAccountingForInFlightHtlcs this_obj);
+void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
 
 /**
- * Initialize a new `ScorerAccountingForInFlightHtlcs`.
+ * Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].
+ * This may be useful in re-deriving keys used in the channel to spend the output.
  */
-MUST_USE_RES struct LDKScorerAccountingForInFlightHtlcs ScorerAccountingForInFlightHtlcs_new(struct LDKScore scorer, const struct LDKInFlightHtlcs *NONNULL_PTR inflight_htlcs);
+const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
 
 /**
- * Serialize the ScorerAccountingForInFlightHtlcs object into a byte array which can be read by ScorerAccountingForInFlightHtlcs_read
+ * Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].
+ * This may be useful in re-deriving keys used in the channel to spend the output.
  */
-struct LDKCVec_u8Z ScorerAccountingForInFlightHtlcs_write(const struct LDKScorerAccountingForInFlightHtlcs *NONNULL_PTR obj);
+void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * Constructs a new Score which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is
+ * The value of the channel which this transactions spends.
  */
-struct LDKScore ScorerAccountingForInFlightHtlcs_as_Score(const struct LDKScorerAccountingForInFlightHtlcs *NONNULL_PTR this_arg);
+uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the InFlightHtlcs, if is_owned is set and inner is non-NULL.
+ * The value of the channel which this transactions spends.
  */
-void InFlightHtlcs_free(struct LDKInFlightHtlcs this_obj);
+void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Creates a copy of the InFlightHtlcs
+ * The necessary channel parameters that need to be provided to the re-derived signer through
+ * [`ChannelSigner::provide_channel_parameters`].
+ *
+ * Added as optional, but always `Some` if the descriptor was produced in v0.0.117 or later.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKInFlightHtlcs InFlightHtlcs_clone(const struct LDKInFlightHtlcs *NONNULL_PTR orig);
+struct LDKChannelTransactionParameters StaticPaymentOutputDescriptor_get_channel_transaction_parameters(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Constructs an empty `InFlightHtlcs`.
+ * The necessary channel parameters that need to be provided to the re-derived signer through
+ * [`ChannelSigner::provide_channel_parameters`].
+ *
+ * Added as optional, but always `Some` if the descriptor was produced in v0.0.117 or later.
+ *
+ * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKInFlightHtlcs InFlightHtlcs_new(void);
+void StaticPaymentOutputDescriptor_set_channel_transaction_parameters(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val);
 
 /**
- * Takes in a path with payer's node id and adds the path's details to `InFlightHtlcs`.
+ * Constructs a new StaticPaymentOutputDescriptor given each field
+ *
+ * Note that channel_transaction_parameters_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void InFlightHtlcs_process_path(struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKPath *NONNULL_PTR path, struct LDKPublicKey payer_node_id);
+MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg, struct LDKChannelTransactionParameters channel_transaction_parameters_arg);
 
 /**
- * Adds a known HTLC given the public key of the HTLC source, target, and short channel
- * id.
+ * Creates a copy of the StaticPaymentOutputDescriptor
  */
-void InFlightHtlcs_add_inflight_htlc(struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target, uint64_t channel_scid, uint64_t used_msat);
+struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
 
 /**
- * Returns liquidity in msat given the public key of the HTLC source, target, and short channel
- * id.
+ * Generates a non-cryptographic 64-bit hash of the StaticPaymentOutputDescriptor.
  */
-MUST_USE_RES struct LDKCOption_u64Z InFlightHtlcs_used_liquidity_msat(const struct LDKInFlightHtlcs *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target, uint64_t channel_scid);
+uint64_t StaticPaymentOutputDescriptor_hash(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR o);
 
 /**
- * Serialize the InFlightHtlcs object into a byte array which can be read by InFlightHtlcs_read
+ * Checks if two StaticPaymentOutputDescriptors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-struct LDKCVec_u8Z InFlightHtlcs_write(const struct LDKInFlightHtlcs *NONNULL_PTR obj);
+bool StaticPaymentOutputDescriptor_eq(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR b);
 
 /**
- * Read a InFlightHtlcs from a byte array, created by InFlightHtlcs_write
+ * Returns the `witness_script` of the spendable output.
+ *
+ * Note that this will only return `Some` for [`StaticPaymentOutputDescriptor`]s that
+ * originated from an anchor outputs channel, as they take the form of a P2WSH script.
  */
-struct LDKCResult_InFlightHtlcsDecodeErrorZ InFlightHtlcs_read(struct LDKu8slice ser);
+MUST_USE_RES struct LDKCOption_CVec_u8ZZ StaticPaymentOutputDescriptor_witness_script(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the RouteHop, if is_owned is set and inner is non-NULL.
+ * The maximum length a well-formed witness spending one of these should have.
+ * Note: If you have the grind_signatures feature enabled, this will be at least 1 byte
+ * shorter.
  */
-void RouteHop_free(struct LDKRouteHop this_obj);
+MUST_USE_RES uint64_t StaticPaymentOutputDescriptor_max_witness_length(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_arg);
 
 /**
- * The node_id of the node at this hop.
+ * Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read
  */
-struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
 
 /**
- * The node_id of the node at this hop.
+ * Read a StaticPaymentOutputDescriptor from a byte array, created by StaticPaymentOutputDescriptor_write
  */
-void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
 
 /**
- * The node_announcement features of the node at this hop. For the last hop, these may be
- * amended to match the features present in the invoice this node generated.
+ * Frees any resources used by the SpendableOutputDescriptor
  */
-struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
 
 /**
- * The node_announcement features of the node at this hop. For the last hop, these may be
- * amended to match the features present in the invoice this node generated.
+ * Creates a copy of the SpendableOutputDescriptor
  */
-void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
+struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
 
 /**
- * The channel that should be used from the previous hop to reach this node.
+ * Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor
  */
-uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output, struct LDKThirtyTwoBytes channel_keys_id);
 
 /**
- * The channel that should be used from the previous hop to reach this node.
+ * Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptor
  */
-void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
 
 /**
- * The channel_announcement features of the channel that should be used from the previous hop
- * to reach this node.
+ * Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptor
  */
-struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
 
 /**
- * The channel_announcement features of the channel that should be used from the previous hop
- * to reach this node.
+ * Generates a non-cryptographic 64-bit hash of the SpendableOutputDescriptor.
  */
-void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
+uint64_t SpendableOutputDescriptor_hash(const struct LDKSpendableOutputDescriptor *NONNULL_PTR o);
 
 /**
- * The fee taken on this hop (for paying for the use of the *next* channel in the path).
- * If this is the last hop in [`Path::hops`]:
- * * if we're sending to a [`BlindedPath`], this is the fee paid for use of the entire blinded path
- * * otherwise, this is the full value of this [`Path`]'s part of the payment
- *
- * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * Checks if two SpendableOutputDescriptors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+bool SpendableOutputDescriptor_eq(const struct LDKSpendableOutputDescriptor *NONNULL_PTR a, const struct LDKSpendableOutputDescriptor *NONNULL_PTR b);
 
 /**
- * The fee taken on this hop (for paying for the use of the *next* channel in the path).
- * If this is the last hop in [`Path::hops`]:
- * * if we're sending to a [`BlindedPath`], this is the fee paid for use of the entire blinded path
- * * otherwise, this is the full value of this [`Path`]'s part of the payment
- *
- * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
  */
-void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
 
 /**
- * The CLTV delta added for this hop.
- * If this is the last hop in [`Path::hops`]:
- * * if we're sending to a [`BlindedPath`], this is the CLTV delta for the entire blinded path
- * * otherwise, this is the CLTV delta expected at the destination
- *
- * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * Read a SpendableOutputDescriptor from a byte array, created by SpendableOutputDescriptor_write
  */
-uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
+struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
 
 /**
- * The CLTV delta added for this hop.
- * If this is the last hop in [`Path::hops`]:
- * * if we're sending to a [`BlindedPath`], this is the CLTV delta for the entire blinded path
- * * otherwise, this is the CLTV delta expected at the destination
+ * Creates an unsigned [`PartiallySignedTransaction`] which spends the given descriptors to
+ * the given outputs, plus an output to the given change destination (if sufficient
+ * change value remains). The PSBT will have a feerate, at least, of the given value.
  *
- * [`BlindedPath`]: crate::blinded_path::BlindedPath
- */
-void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
-
-/**
- * Constructs a new RouteHop given each field
- */
-MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg);
-
-/**
- * Creates a copy of the RouteHop
- */
-struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
-
-/**
- * Generates a non-cryptographic 64-bit hash of the RouteHop.
- */
-uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
-
-/**
- * Checks if two RouteHops contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * The `locktime` argument is used to set the transaction's locktime. If `None`, the
+ * transaction will have a locktime of 0. It it recommended to set this to the current block
+ * height to avoid fee sniping, unless you have some specific reason to use a different
+ * locktime.
+ *
+ * Returns the PSBT and expected max transaction weight.
+ *
+ * Returns `Err(())` if the output value is greater than the input value minus required fee,
+ * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
+ * does not match the one we can spend.
+ *
+ * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
  */
-bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
+MUST_USE_RES struct LDKCResult_C2Tuple_CVec_u8Zu64ZNoneZ SpendableOutputDescriptor_create_spendable_outputs_psbt(struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_u32Z locktime);
 
 /**
- * Serialize the RouteHop object into a byte array which can be read by RouteHop_read
+ * Frees any resources used by the ChannelDerivationParameters, if is_owned is set and inner is non-NULL.
  */
-struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
+void ChannelDerivationParameters_free(struct LDKChannelDerivationParameters this_obj);
 
 /**
- * Read a RouteHop from a byte array, created by RouteHop_write
+ * The value in satoshis of the channel we're attempting to spend the anchor output of.
  */
-struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
+uint64_t ChannelDerivationParameters_get_value_satoshis(const struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the BlindedTail, if is_owned is set and inner is non-NULL.
+ * The value in satoshis of the channel we're attempting to spend the anchor output of.
  */
-void BlindedTail_free(struct LDKBlindedTail this_obj);
+void ChannelDerivationParameters_set_value_satoshis(struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * The hops of the [`BlindedPath`] provided by the recipient.
- *
- * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * The unique identifier to re-derive the signer for the associated channel.
  */
-struct LDKCVec_BlindedHopZ BlindedTail_get_hops(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+const uint8_t (*ChannelDerivationParameters_get_keys_id(const struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr))[32];
 
 /**
- * The hops of the [`BlindedPath`] provided by the recipient.
- *
- * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * The unique identifier to re-derive the signer for the associated channel.
  */
-void BlindedTail_set_hops(struct LDKBlindedTail *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val);
+void ChannelDerivationParameters_set_keys_id(struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * The blinding point of the [`BlindedPath`] provided by the recipient.
- *
- * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * The necessary channel parameters that need to be provided to the re-derived signer through
+ * [`ChannelSigner::provide_channel_parameters`].
  */
-struct LDKPublicKey BlindedTail_get_blinding_point(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+struct LDKChannelTransactionParameters ChannelDerivationParameters_get_transaction_parameters(const struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr);
 
 /**
- * The blinding point of the [`BlindedPath`] provided by the recipient.
- *
- * [`BlindedPath`]: crate::blinded_path::BlindedPath
+ * The necessary channel parameters that need to be provided to the re-derived signer through
+ * [`ChannelSigner::provide_channel_parameters`].
  */
-void BlindedTail_set_blinding_point(struct LDKBlindedTail *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void ChannelDerivationParameters_set_transaction_parameters(struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val);
 
 /**
- * Excess CLTV delta added to the recipient's CLTV expiry to deter intermediate nodes from
- * inferring the destination. May be 0.
+ * Constructs a new ChannelDerivationParameters given each field
  */
-uint32_t BlindedTail_get_excess_final_cltv_expiry_delta(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKChannelDerivationParameters ChannelDerivationParameters_new(uint64_t value_satoshis_arg, struct LDKThirtyTwoBytes keys_id_arg, struct LDKChannelTransactionParameters transaction_parameters_arg);
 
 /**
- * Excess CLTV delta added to the recipient's CLTV expiry to deter intermediate nodes from
- * inferring the destination. May be 0.
+ * Creates a copy of the ChannelDerivationParameters
  */
-void BlindedTail_set_excess_final_cltv_expiry_delta(struct LDKBlindedTail *NONNULL_PTR this_ptr, uint32_t val);
+struct LDKChannelDerivationParameters ChannelDerivationParameters_clone(const struct LDKChannelDerivationParameters *NONNULL_PTR orig);
 
 /**
- * The total amount paid on this [`Path`], excluding the fees.
+ * Checks if two ChannelDerivationParameterss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-uint64_t BlindedTail_get_final_value_msat(const struct LDKBlindedTail *NONNULL_PTR this_ptr);
+bool ChannelDerivationParameters_eq(const struct LDKChannelDerivationParameters *NONNULL_PTR a, const struct LDKChannelDerivationParameters *NONNULL_PTR b);
 
 /**
- * The total amount paid on this [`Path`], excluding the fees.
+ * Serialize the ChannelDerivationParameters object into a byte array which can be read by ChannelDerivationParameters_read
  */
-void BlindedTail_set_final_value_msat(struct LDKBlindedTail *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKCVec_u8Z ChannelDerivationParameters_write(const struct LDKChannelDerivationParameters *NONNULL_PTR obj);
 
 /**
- * Constructs a new BlindedTail given each field
+ * Read a ChannelDerivationParameters from a byte array, created by ChannelDerivationParameters_write
  */
-MUST_USE_RES struct LDKBlindedTail BlindedTail_new(struct LDKCVec_BlindedHopZ hops_arg, struct LDKPublicKey blinding_point_arg, uint32_t excess_final_cltv_expiry_delta_arg, uint64_t final_value_msat_arg);
+struct LDKCResult_ChannelDerivationParametersDecodeErrorZ ChannelDerivationParameters_read(struct LDKu8slice ser);
 
 /**
- * Creates a copy of the BlindedTail
+ * Frees any resources used by the HTLCDescriptor, if is_owned is set and inner is non-NULL.
  */
-struct LDKBlindedTail BlindedTail_clone(const struct LDKBlindedTail *NONNULL_PTR orig);
+void HTLCDescriptor_free(struct LDKHTLCDescriptor this_obj);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the BlindedTail.
+ * The parameters required to derive the signer for the HTLC input.
  */
-uint64_t BlindedTail_hash(const struct LDKBlindedTail *NONNULL_PTR o);
+struct LDKChannelDerivationParameters HTLCDescriptor_get_channel_derivation_parameters(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Checks if two BlindedTails contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * The parameters required to derive the signer for the HTLC input.
  */
-bool BlindedTail_eq(const struct LDKBlindedTail *NONNULL_PTR a, const struct LDKBlindedTail *NONNULL_PTR b);
+void HTLCDescriptor_set_channel_derivation_parameters(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKChannelDerivationParameters val);
 
 /**
- * Serialize the BlindedTail object into a byte array which can be read by BlindedTail_read
+ * The txid of the commitment transaction in which the HTLC output lives.
  */
-struct LDKCVec_u8Z BlindedTail_write(const struct LDKBlindedTail *NONNULL_PTR obj);
+const uint8_t (*HTLCDescriptor_get_commitment_txid(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr))[32];
 
 /**
- * Read a BlindedTail from a byte array, created by BlindedTail_write
+ * The txid of the commitment transaction in which the HTLC output lives.
  */
-struct LDKCResult_BlindedTailDecodeErrorZ BlindedTail_read(struct LDKu8slice ser);
+void HTLCDescriptor_set_commitment_txid(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * Frees any resources used by the Path, if is_owned is set and inner is non-NULL.
+ * The number of the commitment transaction in which the HTLC output lives.
  */
-void Path_free(struct LDKPath this_obj);
+uint64_t HTLCDescriptor_get_per_commitment_number(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * The list of unblinded hops in this [`Path`]. Must be at least length one.
+ * The number of the commitment transaction in which the HTLC output lives.
  */
-struct LDKCVec_RouteHopZ Path_get_hops(const struct LDKPath *NONNULL_PTR this_ptr);
+void HTLCDescriptor_set_per_commitment_number(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * The list of unblinded hops in this [`Path`]. Must be at least length one.
+ * The key tweak corresponding to the number of the commitment transaction in which the HTLC
+ * output lives. This tweak is applied to all the basepoints for both parties in the channel to
+ * arrive at unique keys per commitment.
+ *
+ * See <https://github.com/lightning/bolts/blob/master/03-transactions.md#keys> for more info.
  */
-void Path_set_hops(struct LDKPath *NONNULL_PTR this_ptr, struct LDKCVec_RouteHopZ val);
+struct LDKPublicKey HTLCDescriptor_get_per_commitment_point(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * The blinded path at which this path terminates, if we're sending to one, and its metadata.
+ * The key tweak corresponding to the number of the commitment transaction in which the HTLC
+ * output lives. This tweak is applied to all the basepoints for both parties in the channel to
+ * arrive at unique keys per commitment.
  *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * See <https://github.com/lightning/bolts/blob/master/03-transactions.md#keys> for more info.
  */
-struct LDKBlindedTail Path_get_blinded_tail(const struct LDKPath *NONNULL_PTR this_ptr);
+void HTLCDescriptor_set_per_commitment_point(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The blinded path at which this path terminates, if we're sending to one, and its metadata.
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * The feerate to use on the HTLC claiming transaction. This is always `0` for HTLCs
+ * originating from a channel supporting anchor outputs, otherwise it is the channel's
+ * negotiated feerate at the time the commitment transaction was built.
  */
-void Path_set_blinded_tail(struct LDKPath *NONNULL_PTR this_ptr, struct LDKBlindedTail val);
+uint32_t HTLCDescriptor_get_feerate_per_kw(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a new Path given each field
+ * The feerate to use on the HTLC claiming transaction. This is always `0` for HTLCs
+ * originating from a channel supporting anchor outputs, otherwise it is the channel's
+ * negotiated feerate at the time the commitment transaction was built.
  */
-MUST_USE_RES struct LDKPath Path_new(struct LDKCVec_RouteHopZ hops_arg, struct LDKBlindedTail blinded_tail_arg);
+void HTLCDescriptor_set_feerate_per_kw(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * Creates a copy of the Path
+ * The details of the HTLC as it appears in the commitment transaction.
  */
-struct LDKPath Path_clone(const struct LDKPath *NONNULL_PTR orig);
+struct LDKHTLCOutputInCommitment HTLCDescriptor_get_htlc(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the Path.
+ * The details of the HTLC as it appears in the commitment transaction.
  */
-uint64_t Path_hash(const struct LDKPath *NONNULL_PTR o);
+void HTLCDescriptor_set_htlc(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKHTLCOutputInCommitment val);
 
 /**
- * Checks if two Paths contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * The preimage, if `Some`, to claim the HTLC output with. If `None`, the timeout path must be
+ * taken.
  */
-bool Path_eq(const struct LDKPath *NONNULL_PTR a, const struct LDKPath *NONNULL_PTR b);
+struct LDKCOption_ThirtyTwoBytesZ HTLCDescriptor_get_preimage(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Gets the fees for a given path, excluding any excess paid to the recipient.
+ * The preimage, if `Some`, to claim the HTLC output with. If `None`, the timeout path must be
+ * taken.
  */
-MUST_USE_RES uint64_t Path_fee_msat(const struct LDKPath *NONNULL_PTR this_arg);
+void HTLCDescriptor_set_preimage(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKCOption_ThirtyTwoBytesZ val);
 
 /**
- * Gets the total amount paid on this [`Path`], excluding the fees.
+ * The counterparty's signature required to spend the HTLC output.
  */
-MUST_USE_RES uint64_t Path_final_value_msat(const struct LDKPath *NONNULL_PTR this_arg);
+struct LDKECDSASignature HTLCDescriptor_get_counterparty_sig(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
 
 /**
- * Gets the final hop's CLTV expiry delta.
+ * The counterparty's signature required to spend the HTLC output.
  */
-MUST_USE_RES struct LDKCOption_u32Z Path_final_cltv_expiry_delta(const struct LDKPath *NONNULL_PTR this_arg);
+void HTLCDescriptor_set_counterparty_sig(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKECDSASignature val);
 
 /**
- * Frees any resources used by the Route, if is_owned is set and inner is non-NULL.
+ * Constructs a new HTLCDescriptor given each field
  */
-void Route_free(struct LDKRoute this_obj);
+MUST_USE_RES struct LDKHTLCDescriptor HTLCDescriptor_new(struct LDKChannelDerivationParameters channel_derivation_parameters_arg, struct LDKThirtyTwoBytes commitment_txid_arg, uint64_t per_commitment_number_arg, struct LDKPublicKey per_commitment_point_arg, uint32_t feerate_per_kw_arg, struct LDKHTLCOutputInCommitment htlc_arg, struct LDKCOption_ThirtyTwoBytesZ preimage_arg, struct LDKECDSASignature counterparty_sig_arg);
 
 /**
- * The list of [`Path`]s taken for a single (potentially-)multi-part payment. If no
- * [`BlindedTail`]s are present, then the pubkey of the last [`RouteHop`] in each path must be
- * the same.
+ * Creates a copy of the HTLCDescriptor
  */
-struct LDKCVec_PathZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
+struct LDKHTLCDescriptor HTLCDescriptor_clone(const struct LDKHTLCDescriptor *NONNULL_PTR orig);
 
 /**
- * The list of [`Path`]s taken for a single (potentially-)multi-part payment. If no
- * [`BlindedTail`]s are present, then the pubkey of the last [`RouteHop`] in each path must be
- * the same.
+ * Checks if two HTLCDescriptors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_PathZ val);
+bool HTLCDescriptor_eq(const struct LDKHTLCDescriptor *NONNULL_PTR a, const struct LDKHTLCDescriptor *NONNULL_PTR b);
 
 /**
- * The `payment_params` parameter passed via [`RouteParameters`] to [`find_route`].
- *
- * This is used by `ChannelManager` to track information which may be required for retries.
- *
- * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Serialize the HTLCDescriptor object into a byte array which can be read by HTLCDescriptor_read
  */
-struct LDKPaymentParameters Route_get_payment_params(const struct LDKRoute *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z HTLCDescriptor_write(const struct LDKHTLCDescriptor *NONNULL_PTR obj);
 
 /**
- * The `payment_params` parameter passed via [`RouteParameters`] to [`find_route`].
- *
- * This is used by `ChannelManager` to track information which may be required for retries.
- *
- * Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Read a HTLCDescriptor from a byte array, created by HTLCDescriptor_write
  */
-void Route_set_payment_params(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPaymentParameters val);
+struct LDKCResult_HTLCDescriptorDecodeErrorZ HTLCDescriptor_read(struct LDKu8slice ser);
 
 /**
- * Constructs a new Route given each field
+ * Returns the outpoint of the HTLC output in the commitment transaction. This is the outpoint
+ * being spent by the HTLC input in the HTLC transaction.
  */
-MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_PathZ paths_arg, struct LDKPaymentParameters payment_params_arg);
+MUST_USE_RES struct LDKOutPoint HTLCDescriptor_outpoint(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the Route
+ * Returns the UTXO to be spent by the HTLC input, which can be obtained via
+ * [`Self::unsigned_tx_input`].
  */
-struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
+MUST_USE_RES struct LDKTxOut HTLCDescriptor_previous_utxo(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the Route.
+ * Returns the unsigned transaction input spending the HTLC output in the commitment
+ * transaction.
  */
-uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
+MUST_USE_RES struct LDKTxIn HTLCDescriptor_unsigned_tx_input(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
 
 /**
- * Checks if two Routes contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Returns the delayed output created as a result of spending the HTLC output in the commitment
+ * transaction.
  */
-bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
+MUST_USE_RES struct LDKTxOut HTLCDescriptor_tx_output(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
 
 /**
- * Returns the total amount of fees paid on this [`Route`].
- *
- * This doesn't include any extra payment made to the recipient, which can happen in excess of
- * the amount passed to [`find_route`]'s `route_params.final_value_msat`.
+ * Returns the witness script of the HTLC output in the commitment transaction.
  */
-MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCVec_u8Z HTLCDescriptor_witness_script(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
 
 /**
- * Returns the total amount paid on this [`Route`], excluding the fees. Might be more than
- * requested if we had to reach htlc_minimum_msat.
+ * Returns the fully signed witness required to spend the HTLC output in the commitment
+ * transaction.
  */
-MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKWitness HTLCDescriptor_tx_input_witness(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg, struct LDKECDSASignature signature, struct LDKu8slice witness_script);
 
 /**
- * Serialize the Route object into a byte array which can be read by Route_read
+ * Derives the channel signer required to sign the HTLC input.
  */
-struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
+MUST_USE_RES struct LDKWriteableEcdsaChannelSigner HTLCDescriptor_derive_channel_signer(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg, const struct LDKSignerProvider *NONNULL_PTR signer_provider);
 
 /**
- * Read a Route from a byte array, created by Route_write
+ * Calls the free function if one is set
  */
-struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
+void ChannelSigner_free(struct LDKChannelSigner this_ptr);
 
 /**
- * Frees any resources used by the RouteParameters, if is_owned is set and inner is non-NULL.
+ * Creates a copy of the Recipient
  */
-void RouteParameters_free(struct LDKRouteParameters this_obj);
+enum LDKRecipient Recipient_clone(const enum LDKRecipient *NONNULL_PTR orig);
 
 /**
- * The parameters of the failed payment path.
+ * Utility method to constructs a new Node-variant Recipient
  */
-struct LDKPaymentParameters RouteParameters_get_payment_params(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+enum LDKRecipient Recipient_node(void);
 
 /**
- * The parameters of the failed payment path.
+ * Utility method to constructs a new PhantomNode-variant Recipient
  */
-void RouteParameters_set_payment_params(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPaymentParameters val);
+enum LDKRecipient Recipient_phantom_node(void);
 
 /**
- * The amount in msats sent on the failed payment path.
+ * Calls the free function if one is set
  */
-uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
+void EntropySource_free(struct LDKEntropySource this_ptr);
 
 /**
- * The amount in msats sent on the failed payment path.
+ * Calls the free function if one is set
  */
-void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
+void NodeSigner_free(struct LDKNodeSigner this_ptr);
 
 /**
- * Constructs a new RouteParameters given each field
+ * Calls the free function if one is set
  */
-MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPaymentParameters payment_params_arg, uint64_t final_value_msat_arg);
+void OutputSpender_free(struct LDKOutputSpender this_ptr);
 
 /**
- * Creates a copy of the RouteParameters
+ * Calls the free function if one is set
  */
-struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
+void SignerProvider_free(struct LDKSignerProvider this_ptr);
 
 /**
- * Checks if two RouteParameterss contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Calls the free function if one is set
  */
-bool RouteParameters_eq(const struct LDKRouteParameters *NONNULL_PTR a, const struct LDKRouteParameters *NONNULL_PTR b);
+void ChangeDestinationSource_free(struct LDKChangeDestinationSource this_ptr);
 
 /**
- * Serialize the RouteParameters object into a byte array which can be read by RouteParameters_read
+ * Frees any resources used by the InMemorySigner, if is_owned is set and inner is non-NULL.
  */
-struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
+void InMemorySigner_free(struct LDKInMemorySigner this_obj);
 
 /**
- * Read a RouteParameters from a byte array, created by RouteParameters_write
+ * Holder secret key in the 2-of-2 multisig script of a channel. This key also backs the
+ * holder's anchor output in a commitment transaction, if one is present.
  */
-struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
+const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
 
 /**
- * Frees any resources used by the PaymentParameters, if is_owned is set and inner is non-NULL.
+ * Holder secret key in the 2-of-2 multisig script of a channel. This key also backs the
+ * holder's anchor output in a commitment transaction, if one is present.
  */
-void PaymentParameters_free(struct LDKPaymentParameters this_obj);
+void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
 
 /**
- * Information about the payee, such as their features and route hints for their channels.
+ * Holder secret key for blinded revocation pubkey.
  */
-struct LDKPayee PaymentParameters_get_payee(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
 
 /**
- * Information about the payee, such as their features and route hints for their channels.
+ * Holder secret key for blinded revocation pubkey.
  */
-void PaymentParameters_set_payee(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
+void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
 
 /**
- * Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
+ * Holder secret key used for our balance in counterparty-broadcasted commitment transactions.
  */
-struct LDKCOption_u64Z PaymentParameters_get_expiry_time(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
 
 /**
- * Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
+ * Holder secret key used for our balance in counterparty-broadcasted commitment transactions.
  */
-void PaymentParameters_set_expiry_time(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
 
 /**
- * The maximum total CLTV delta we accept for the route.
- * Defaults to [`DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA`].
+ * Holder secret key used in an HTLC transaction.
  */
-uint32_t PaymentParameters_get_max_total_cltv_expiry_delta(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
 
 /**
- * The maximum total CLTV delta we accept for the route.
- * Defaults to [`DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA`].
+ * Holder secret key used in an HTLC transaction.
  */
-void PaymentParameters_set_max_total_cltv_expiry_delta(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint32_t val);
+void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
 
 /**
- * The maximum number of paths that may be used by (MPP) payments.
- * Defaults to [`DEFAULT_MAX_PATH_COUNT`].
+ * Holder HTLC secret key used in commitment transaction HTLC outputs.
  */
-uint8_t PaymentParameters_get_max_path_count(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
 
 /**
- * The maximum number of paths that may be used by (MPP) payments.
- * Defaults to [`DEFAULT_MAX_PATH_COUNT`].
+ * Holder HTLC secret key used in commitment transaction HTLC outputs.
  */
-void PaymentParameters_set_max_path_count(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
 
 /**
- * Selects the maximum share of a channel's total capacity which will be sent over a channel,
- * as a power of 1/2. A higher value prefers to send the payment using more MPP parts whereas
- * a lower value prefers to send larger MPP parts, potentially saturating channels and
- * increasing failure probability for those paths.
- *
- * Note that this restriction will be relaxed during pathfinding after paths which meet this
- * restriction have been found. While paths which meet this criteria will be searched for, it
- * is ultimately up to the scorer to select them over other paths.
- *
- * A value of 0 will allow payments up to and including a channel's total announced usable
- * capacity, a value of one will only use up to half its capacity, two 1/4, etc.
- *
- * Default value: 2
+ * Commitment seed.
  */
-uint8_t PaymentParameters_get_max_channel_saturation_power_of_half(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
 
 /**
- * Selects the maximum share of a channel's total capacity which will be sent over a channel,
- * as a power of 1/2. A higher value prefers to send the payment using more MPP parts whereas
- * a lower value prefers to send larger MPP parts, potentially saturating channels and
- * increasing failure probability for those paths.
- *
- * Note that this restriction will be relaxed during pathfinding after paths which meet this
- * restriction have been found. While paths which meet this criteria will be searched for, it
- * is ultimately up to the scorer to select them over other paths.
- *
- * A value of 0 will allow payments up to and including a channel's total announced usable
- * capacity, a value of one will only use up to half its capacity, two 1/4, etc.
- *
- * Default value: 2
+ * Commitment seed.
  */
-void PaymentParameters_set_max_channel_saturation_power_of_half(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * A list of SCIDs which this payment was previously attempted over and which caused the
- * payment to fail. Future attempts for the same payment shouldn't be relayed through any of
- * these SCIDs.
- *
- * Returns a copy of the field.
+ * Creates a copy of the InMemorySigner
  */
-struct LDKCVec_u64Z PaymentParameters_get_previously_failed_channels(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
 
 /**
- * A list of SCIDs which this payment was previously attempted over and which caused the
- * payment to fail. Future attempts for the same payment shouldn't be relayed through any of
- * these SCIDs.
+ * Creates a new [`InMemorySigner`].
  */
-void PaymentParameters_set_previously_failed_channels(struct LDKPaymentParameters *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
+MUST_USE_RES struct LDKInMemorySigner InMemorySigner_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id, struct LDKThirtyTwoBytes rand_bytes_unique_start);
 
 /**
- * Constructs a new PaymentParameters given each field
+ * Returns the counterparty's pubkeys.
+ *
+ * Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
+ * In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKPaymentParameters PaymentParameters_new(struct LDKPayee payee_arg, struct LDKCOption_u64Z expiry_time_arg, uint32_t max_total_cltv_expiry_delta_arg, uint8_t max_path_count_arg, uint8_t max_channel_saturation_power_of_half_arg, struct LDKCVec_u64Z previously_failed_channels_arg);
+MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the PaymentParameters
+ * Returns the `contest_delay` value specified by our counterparty and applied on holder-broadcastable
+ * transactions, i.e., the amount of time that we have to wait to recover our funds if we
+ * broadcast a transaction.
+ *
+ * Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
+ * In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
  */
-struct LDKPaymentParameters PaymentParameters_clone(const struct LDKPaymentParameters *NONNULL_PTR orig);
+MUST_USE_RES struct LDKCOption_u16Z InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the PaymentParameters.
+ * Returns the `contest_delay` value specified by us and applied on transactions broadcastable
+ * by our counterparty, i.e., the amount of time that they have to wait to recover their funds
+ * if they broadcast a transaction.
+ *
+ * Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
+ * In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
  */
-uint64_t PaymentParameters_hash(const struct LDKPaymentParameters *NONNULL_PTR o);
+MUST_USE_RES struct LDKCOption_u16Z InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Checks if two PaymentParameterss contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Returns whether the holder is the initiator.
+ *
+ * Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
+ * In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
  */
-bool PaymentParameters_eq(const struct LDKPaymentParameters *NONNULL_PTR a, const struct LDKPaymentParameters *NONNULL_PTR b);
+MUST_USE_RES struct LDKCOption_boolZ InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Serialize the PaymentParameters object into a byte array which can be read by PaymentParameters_read
+ * Funding outpoint
+ *
+ * Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
+ * In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKCVec_u8Z PaymentParameters_write(const struct LDKPaymentParameters *NONNULL_PTR obj);
+MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Read a PaymentParameters from a byte array, created by PaymentParameters_write
+ * Returns a [`ChannelTransactionParameters`] for this channel, to be used when verifying or
+ * building transactions.
+ *
+ * Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
+ * In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-struct LDKCResult_PaymentParametersDecodeErrorZ PaymentParameters_read(struct LDKu8slice ser, uint32_t arg);
+MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Creates a payee with the node id of the given `pubkey`.
+ * Returns the channel type features of the channel parameters. Should be helpful for
+ * determining a channel's category, i. e. legacy/anchors/taproot/etc.
  *
- * The `final_cltv_expiry_delta` should match the expected final CLTV delta the recipient has
- * provided.
+ * Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
+ * In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKPaymentParameters PaymentParameters_from_node_id(struct LDKPublicKey payee_pubkey, uint32_t final_cltv_expiry_delta);
+MUST_USE_RES struct LDKChannelTypeFeatures InMemorySigner_channel_type_features(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Creates a payee with the node id of the given `pubkey` to use for keysend payments.
- *
- * The `final_cltv_expiry_delta` should match the expected final CLTV delta the recipient has
- * provided.
+ * Sign the single input of `spend_tx` at index `input_idx`, which spends the output described
+ * by `descriptor`, returning the witness stack for the input.
  *
- * Note that MPP keysend is not widely supported yet. The `allow_mpp` lets you choose
- * whether your router will be allowed to find a multi-part route for this payment. If you
- * set `allow_mpp` to true, you should ensure a payment secret is set on send, likely via
- * [`RecipientOnionFields::secret_only`].
+ * Returns an error if the input at `input_idx` does not exist, has a non-empty `script_sig`,
+ * is not spending the outpoint described by [`descriptor.outpoint`],
+ * or if an output descriptor `script_pubkey` does not match the one we can spend.
  *
- * [`RecipientOnionFields::secret_only`]: crate::ln::channelmanager::RecipientOnionFields::secret_only
+ * [`descriptor.outpoint`]: StaticPaymentOutputDescriptor::outpoint
  */
-MUST_USE_RES struct LDKPaymentParameters PaymentParameters_for_keysend(struct LDKPublicKey payee_pubkey, uint32_t final_cltv_expiry_delta, bool allow_mpp);
+MUST_USE_RES struct LDKCResult_WitnessNoneZ InMemorySigner_sign_counterparty_payment_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
 
 /**
- * Creates parameters for paying to a blinded payee from the provided invoice. Sets
- * [`Payee::Blinded::route_hints`], [`Payee::Blinded::features`], and
- * [`PaymentParameters::expiry_time`].
+ * Sign the single input of `spend_tx` at index `input_idx` which spends the output
+ * described by `descriptor`, returning the witness stack for the input.
+ *
+ * Returns an error if the input at `input_idx` does not exist, has a non-empty `script_sig`,
+ * is not spending the outpoint described by [`descriptor.outpoint`], does not have a
+ * sequence set to [`descriptor.to_self_delay`], or if an output descriptor
+ * `script_pubkey` does not match the one we can spend.
+ *
+ * [`descriptor.outpoint`]: DelayedPaymentOutputDescriptor::outpoint
+ * [`descriptor.to_self_delay`]: DelayedPaymentOutputDescriptor::to_self_delay
  */
-MUST_USE_RES struct LDKPaymentParameters PaymentParameters_from_bolt12_invoice(const struct LDKBolt12Invoice *NONNULL_PTR invoice);
+MUST_USE_RES struct LDKCResult_WitnessNoneZ InMemorySigner_sign_dynamic_p2wsh_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
 
 /**
- * Frees any resources used by the Payee
+ * Constructs a new EntropySource which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
  */
-void Payee_free(struct LDKPayee this_ptr);
+struct LDKEntropySource InMemorySigner_as_EntropySource(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Creates a copy of the Payee
+ * Constructs a new ChannelSigner which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned ChannelSigner must be freed before this_arg is
  */
-struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
+struct LDKChannelSigner InMemorySigner_as_ChannelSigner(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new Blinded-variant Payee
+ * Constructs a new EcdsaChannelSigner which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned EcdsaChannelSigner must be freed before this_arg is
  */
-struct LDKPayee Payee_blinded(struct LDKCVec_C2Tuple_BlindedPayInfoBlindedPathZZ route_hints, struct LDKBolt12InvoiceFeatures features);
+struct LDKEcdsaChannelSigner InMemorySigner_as_EcdsaChannelSigner(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Utility method to constructs a new Clear-variant Payee
+ * Constructs a new WriteableEcdsaChannelSigner which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned WriteableEcdsaChannelSigner must be freed before this_arg is
  */
-struct LDKPayee Payee_clear(struct LDKPublicKey node_id, struct LDKCVec_RouteHintZ route_hints, struct LDKBolt11InvoiceFeatures features, uint32_t final_cltv_expiry_delta);
+struct LDKWriteableEcdsaChannelSigner InMemorySigner_as_WriteableEcdsaChannelSigner(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the Payee.
+ * Serialize the InMemorySigner object into a byte array which can be read by InMemorySigner_read
  */
-uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
+struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
 
 /**
- * Checks if two Payees contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Read a InMemorySigner from a byte array, created by InMemorySigner_write
  */
-bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
+struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser, struct LDKEntropySource arg);
 
 /**
- * Frees any resources used by the RouteHint, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the KeysManager, if is_owned is set and inner is non-NULL.
  */
-void RouteHint_free(struct LDKRouteHint this_obj);
+void KeysManager_free(struct LDKKeysManager this_obj);
 
-struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
+/**
+ * Constructs a [`KeysManager`] from a 32-byte seed. If the seed is in some way biased (e.g.,
+ * your CSRNG is busted) this may panic (but more importantly, you will possibly lose funds).
+ * `starting_time` isn't strictly required to actually be a time, but it must absolutely,
+ * without a doubt, be unique to this instance. ie if you start multiple times with the same
+ * `seed`, `starting_time` must be unique to each run. Thus, the easiest way to achieve this
+ * is to simply use the current time (with very high precision).
+ *
+ * The `seed` MUST be backed up safely prior to use so that the keys can be re-created, however,
+ * obviously, `starting_time` should be unique every time you reload the library - it is only
+ * used to generate new ephemeral key data (which will be stored by the individual channel if
+ * necessary).
+ *
+ * Note that the seed is required to recover certain on-chain funds independent of
+ * [`ChannelMonitor`] data, though a current copy of [`ChannelMonitor`] data is also required
+ * for any channel, and some on-chain during-closing funds.
+ *
+ * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+ */
+MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
 
-void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
+/**
+ * Gets the \"node_id\" secret key used to sign gossip announcements, decode onion data, etc.
+ */
+MUST_USE_RES struct LDKSecretKey KeysManager_get_node_secret_key(const struct LDKKeysManager *NONNULL_PTR this_arg);
 
 /**
- * Constructs a new RouteHint given each field
+ * Derive an old [`WriteableEcdsaChannelSigner`] containing per-channel secrets based on a key derivation parameters.
  */
-MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
+MUST_USE_RES struct LDKInMemorySigner KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
 
 /**
- * Creates a copy of the RouteHint
+ * Signs the given [`PartiallySignedTransaction`] which spends the given [`SpendableOutputDescriptor`]s.
+ * The resulting inputs will be finalized and the PSBT will be ready for broadcast if there
+ * are no other inputs that need signing.
+ *
+ * Returns `Err(())` if the PSBT is missing a descriptor or if we fail to sign.
+ *
+ * May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used
+ * this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`].
  */
-struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+MUST_USE_RES struct LDKCResult_CVec_u8ZNoneZ KeysManager_sign_spendable_outputs_psbt(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_u8Z psbt);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the RouteHint.
+ * Constructs a new EntropySource which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
  */
-uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
+struct LDKEntropySource KeysManager_as_EntropySource(const struct LDKKeysManager *NONNULL_PTR this_arg);
 
 /**
- * Checks if two RouteHints contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Constructs a new NodeSigner which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned NodeSigner must be freed before this_arg is
  */
-bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
+struct LDKNodeSigner KeysManager_as_NodeSigner(const struct LDKKeysManager *NONNULL_PTR this_arg);
 
 /**
- * Serialize the RouteHint object into a byte array which can be read by RouteHint_read
+ * Constructs a new OutputSpender which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is
  */
-struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
+struct LDKOutputSpender KeysManager_as_OutputSpender(const struct LDKKeysManager *NONNULL_PTR this_arg);
 
 /**
- * Read a RouteHint from a byte array, created by RouteHint_write
+ * Constructs a new SignerProvider which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is
  */
-struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
+struct LDKSignerProvider KeysManager_as_SignerProvider(const struct LDKKeysManager *NONNULL_PTR this_arg);
 
 /**
- * Frees any resources used by the RouteHintHop, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the PhantomKeysManager, if is_owned is set and inner is non-NULL.
  */
-void RouteHintHop_free(struct LDKRouteHintHop this_obj);
+void PhantomKeysManager_free(struct LDKPhantomKeysManager this_obj);
 
 /**
- * The node_id of the non-target end of the route
+ * Constructs a new EntropySource which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
  */
-struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+struct LDKEntropySource PhantomKeysManager_as_EntropySource(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
 
 /**
- * The node_id of the non-target end of the route
+ * Constructs a new NodeSigner which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned NodeSigner must be freed before this_arg is
  */
-void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+struct LDKNodeSigner PhantomKeysManager_as_NodeSigner(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
 
 /**
- * The short_channel_id of this channel
+ * Constructs a new OutputSpender which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OutputSpender must be freed before this_arg is
  */
-uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+struct LDKOutputSpender PhantomKeysManager_as_OutputSpender(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
 
 /**
- * The short_channel_id of this channel
+ * Constructs a new SignerProvider which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is
  */
-void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
 
 /**
- * The fees which must be paid to use this channel
+ * Constructs a [`PhantomKeysManager`] given a 32-byte seed and an additional `cross_node_seed`
+ * that is shared across all nodes that intend to participate in [phantom node payments]
+ * together.
+ *
+ * See [`KeysManager::new`] for more information on `seed`, `starting_time_secs`, and
+ * `starting_time_nanos`.
+ *
+ * `cross_node_seed` must be the same across all phantom payment-receiving nodes and also the
+ * same across restarts, or else inbound payments may fail.
+ *
+ * [phantom node payments]: PhantomKeysManager
  */
-struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]);
 
 /**
- * The fees which must be paid to use this channel
+ * See [`KeysManager::derive_channel_keys`] for documentation on this method.
  */
-void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
+MUST_USE_RES struct LDKInMemorySigner PhantomKeysManager_derive_channel_keys(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
 
 /**
- * The difference in CLTV values between this node and the next node.
+ * Gets the \"node_id\" secret key used to sign gossip announcements, decode onion data, etc.
  */
-uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
 
 /**
- * The difference in CLTV values between this node and the next node.
+ * Gets the \"node_id\" secret key of the phantom node used to sign invoices, decode the
+ * last-hop onion data, etc.
  */
-void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
+MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_phantom_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
 
 /**
- * The minimum value, in msat, which must be relayed to the next hop.
+ * Frees any resources used by the RandomBytes, if is_owned is set and inner is non-NULL.
  */
-struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+void RandomBytes_free(struct LDKRandomBytes this_obj);
 
 /**
- * The minimum value, in msat, which must be relayed to the next hop.
+ * Creates a new instance using the given seed.
  */
-void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+MUST_USE_RES struct LDKRandomBytes RandomBytes_new(struct LDKThirtyTwoBytes seed);
 
 /**
- * The maximum value in msat available for routing with a single HTLC.
+ * Constructs a new EntropySource which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
  */
-struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
+struct LDKEntropySource RandomBytes_as_EntropySource(const struct LDKRandomBytes *NONNULL_PTR this_arg);
 
 /**
- * The maximum value in msat available for routing with a single HTLC.
+ * Calls the free function if one is set
  */
-void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
+void EcdsaChannelSigner_free(struct LDKEcdsaChannelSigner this_ptr);
 
 /**
- * Constructs a new RouteHintHop given each field
+ * Creates a copy of a WriteableEcdsaChannelSigner
  */
-MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
+struct LDKWriteableEcdsaChannelSigner WriteableEcdsaChannelSigner_clone(const struct LDKWriteableEcdsaChannelSigner *NONNULL_PTR orig);
 
 /**
- * Creates a copy of the RouteHintHop
+ * Calls the free function if one is set
  */
-struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
+void WriteableEcdsaChannelSigner_free(struct LDKWriteableEcdsaChannelSigner this_ptr);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the RouteHintHop.
+ * Frees any resources used by the OnionMessenger, if is_owned is set and inner is non-NULL.
  */
-uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
+void OnionMessenger_free(struct LDKOnionMessenger this_obj);
 
 /**
- * Checks if two RouteHintHops contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Calls the free function if one is set
  */
-bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
+void MessageRouter_free(struct LDKMessageRouter this_ptr);
 
 /**
- * Serialize the RouteHintHop object into a byte array which can be read by RouteHintHop_read
+ * Frees any resources used by the DefaultMessageRouter, if is_owned is set and inner is non-NULL.
  */
-struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
+void DefaultMessageRouter_free(struct LDKDefaultMessageRouter this_obj);
 
 /**
- * Read a RouteHintHop from a byte array, created by RouteHintHop_write
+ * Creates a [`DefaultMessageRouter`] using the given [`NetworkGraph`].
  */
-struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
+MUST_USE_RES struct LDKDefaultMessageRouter DefaultMessageRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKEntropySource entropy_source);
 
 /**
- * Finds a route from us (payer) to the given target node (payee).
- *
- * If the payee provided features in their invoice, they should be provided via the `payee` field
- * in the given [`RouteParameters::payment_params`].
- * Without this, MPP will only be used if the payee's features are available in the network graph.
- *
- * Private routing paths between a public node and the target may be included in the `payee` field
- * of [`RouteParameters::payment_params`].
- *
- * If some channels aren't announced, it may be useful to fill in `first_hops` with the results
- * from [`ChannelManager::list_usable_channels`]. If it is filled in, the view of these channels
- * from `network_graph` will be ignored, and only those in `first_hops` will be used.
- *
- * The fees on channels from us to the next hop are ignored as they are assumed to all be equal.
- * However, the enabled/disabled bit on such channels as well as the `htlc_minimum_msat` /
- * `htlc_maximum_msat` *are* checked as they may change based on the receiving node.
- *
- * # Panics
- *
- * Panics if first_hops contains channels without `short_channel_id`s;
- * [`ChannelManager::list_usable_channels`] will never include such channels.
- *
- * [`ChannelManager::list_usable_channels`]: crate::ln::channelmanager::ChannelManager::list_usable_channels
- * [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed
- * [`NetworkGraph`]: crate::routing::gossip::NetworkGraph
- *
- * Note that first_hops (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Constructs a new MessageRouter which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned MessageRouter must be freed before this_arg is
  */
-struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR route_params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer, const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR score_params, const uint8_t (*random_seed_bytes)[32]);
+struct LDKMessageRouter DefaultMessageRouter_as_MessageRouter(const struct LDKDefaultMessageRouter *NONNULL_PTR this_arg);
 
 /**
- * Construct a route from us (payer) to the target node (payee) via the given hops (which should
- * exclude the payer, but include the payee). This may be useful, e.g., for probing the chosen path.
- *
- * Re-uses logic from `find_route`, so the restrictions described there also apply here.
+ * Frees any resources used by the OnionMessagePath, if is_owned is set and inner is non-NULL.
  */
-struct LDKCResult_RouteLightningErrorZ build_route_from_hops(struct LDKPublicKey our_node_pubkey, struct LDKCVec_PublicKeyZ hops, const struct LDKRouteParameters *NONNULL_PTR route_params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, const uint8_t (*random_seed_bytes)[32]);
+void OnionMessagePath_free(struct LDKOnionMessagePath this_obj);
 
 /**
- * Calls the free function if one is set
+ * Nodes on the path between the sender and the destination.
+ *
+ * Returns a copy of the field.
  */
-void Score_free(struct LDKScore this_ptr);
+struct LDKCVec_PublicKeyZ OnionMessagePath_get_intermediate_nodes(const struct LDKOnionMessagePath *NONNULL_PTR this_ptr);
 
 /**
- * Calls the free function if one is set
+ * Nodes on the path between the sender and the destination.
  */
-void LockableScore_free(struct LDKLockableScore this_ptr);
+void OnionMessagePath_set_intermediate_nodes(struct LDKOnionMessagePath *NONNULL_PTR this_ptr, struct LDKCVec_PublicKeyZ val);
 
 /**
- * Calls the free function if one is set
+ * The recipient of the message.
  */
-void WriteableScore_free(struct LDKWriteableScore this_ptr);
+struct LDKDestination OnionMessagePath_get_destination(const struct LDKOnionMessagePath *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the MultiThreadedLockableScore, if is_owned is set and inner is non-NULL.
+ * The recipient of the message.
  */
-void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
+void OnionMessagePath_set_destination(struct LDKOnionMessagePath *NONNULL_PTR this_ptr, struct LDKDestination val);
 
 /**
- * Constructs a new LockableScore which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned LockableScore must be freed before this_arg is
+ * Addresses that may be used to connect to [`OnionMessagePath::first_node`].
+ *
+ * Only needs to be set if a connection to the node is required. [`OnionMessenger`] may use
+ * this to initiate such a connection.
+ *
+ * Returns a copy of the field.
  */
-struct LDKLockableScore MultiThreadedLockableScore_as_LockableScore(const struct LDKMultiThreadedLockableScore *NONNULL_PTR this_arg);
+struct LDKCOption_CVec_SocketAddressZZ OnionMessagePath_get_first_node_addresses(const struct LDKOnionMessagePath *NONNULL_PTR this_ptr);
 
 /**
- * Serialize the MultiThreadedLockableScore object into a byte array which can be read by MultiThreadedLockableScore_read
+ * Addresses that may be used to connect to [`OnionMessagePath::first_node`].
+ *
+ * Only needs to be set if a connection to the node is required. [`OnionMessenger`] may use
+ * this to initiate such a connection.
  */
-struct LDKCVec_u8Z MultiThreadedLockableScore_write(const struct LDKMultiThreadedLockableScore *NONNULL_PTR obj);
+void OnionMessagePath_set_first_node_addresses(struct LDKOnionMessagePath *NONNULL_PTR this_ptr, struct LDKCOption_CVec_SocketAddressZZ val);
 
 /**
- * Constructs a new WriteableScore which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned WriteableScore must be freed before this_arg is
+ * Constructs a new OnionMessagePath given each field
  */
-struct LDKWriteableScore MultiThreadedLockableScore_as_WriteableScore(const struct LDKMultiThreadedLockableScore *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKOnionMessagePath OnionMessagePath_new(struct LDKCVec_PublicKeyZ intermediate_nodes_arg, struct LDKDestination destination_arg, struct LDKCOption_CVec_SocketAddressZZ first_node_addresses_arg);
 
 /**
- * Creates a new [`MultiThreadedLockableScore`] given an underlying [`Score`].
+ * Creates a copy of the OnionMessagePath
  */
-MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
+struct LDKOnionMessagePath OnionMessagePath_clone(const struct LDKOnionMessagePath *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the MultiThreadedScoreLock, if is_owned is set and inner is non-NULL.
+ * Returns the first node in the path.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void MultiThreadedScoreLock_free(struct LDKMultiThreadedScoreLock this_obj);
+MUST_USE_RES struct LDKPublicKey OnionMessagePath_first_node(const struct LDKOnionMessagePath *NONNULL_PTR this_arg);
 
 /**
- * Serialize the MultiThreadedScoreLock object into a byte array which can be read by MultiThreadedScoreLock_read
+ * Frees any resources used by the Destination
  */
-struct LDKCVec_u8Z MultiThreadedScoreLock_write(const struct LDKMultiThreadedScoreLock *NONNULL_PTR obj);
+void Destination_free(struct LDKDestination this_ptr);
 
 /**
- * Constructs a new Score which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is
+ * Creates a copy of the Destination
  */
-struct LDKScore MultiThreadedScoreLock_as_Score(const struct LDKMultiThreadedScoreLock *NONNULL_PTR this_arg);
+struct LDKDestination Destination_clone(const struct LDKDestination *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the ChannelUsage, if is_owned is set and inner is non-NULL.
+ * Utility method to constructs a new Node-variant Destination
  */
-void ChannelUsage_free(struct LDKChannelUsage this_obj);
+struct LDKDestination Destination_node(struct LDKPublicKey a);
 
 /**
- * The amount to send through the channel, denominated in millisatoshis.
+ * Utility method to constructs a new BlindedPath-variant Destination
  */
-uint64_t ChannelUsage_get_amount_msat(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+struct LDKDestination Destination_blinded_path(struct LDKBlindedPath a);
 
 /**
- * The amount to send through the channel, denominated in millisatoshis.
+ * Generates a non-cryptographic 64-bit hash of the Destination.
  */
-void ChannelUsage_set_amount_msat(struct LDKChannelUsage *NONNULL_PTR this_ptr, uint64_t val);
+uint64_t Destination_hash(const struct LDKDestination *NONNULL_PTR o);
 
 /**
- * Total amount, denominated in millisatoshis, already allocated to send through the channel
- * as part of a multi-path payment.
+ * Checks if two Destinations contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-uint64_t ChannelUsage_get_inflight_htlc_msat(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+bool Destination_eq(const struct LDKDestination *NONNULL_PTR a, const struct LDKDestination *NONNULL_PTR b);
 
 /**
- * Total amount, denominated in millisatoshis, already allocated to send through the channel
- * as part of a multi-path payment.
+ * Attempts to resolve the [`IntroductionNode::DirectedShortChannelId`] of a
+ * [`Destination::BlindedPath`] to a [`IntroductionNode::NodeId`], if applicable, using the
+ * provided [`ReadOnlyNetworkGraph`].
  */
-void ChannelUsage_set_inflight_htlc_msat(struct LDKChannelUsage *NONNULL_PTR this_ptr, uint64_t val);
+void Destination_resolve(struct LDKDestination *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph);
 
 /**
- * The effective capacity of the channel.
+ * Frees any resources used by the SendSuccess
  */
-struct LDKEffectiveCapacity ChannelUsage_get_effective_capacity(const struct LDKChannelUsage *NONNULL_PTR this_ptr);
+void SendSuccess_free(struct LDKSendSuccess this_ptr);
 
 /**
- * The effective capacity of the channel.
+ * Creates a copy of the SendSuccess
  */
-void ChannelUsage_set_effective_capacity(struct LDKChannelUsage *NONNULL_PTR this_ptr, struct LDKEffectiveCapacity val);
+struct LDKSendSuccess SendSuccess_clone(const struct LDKSendSuccess *NONNULL_PTR orig);
 
 /**
- * Constructs a new ChannelUsage given each field
+ * Utility method to constructs a new Buffered-variant SendSuccess
  */
-MUST_USE_RES struct LDKChannelUsage ChannelUsage_new(uint64_t amount_msat_arg, uint64_t inflight_htlc_msat_arg, struct LDKEffectiveCapacity effective_capacity_arg);
+struct LDKSendSuccess SendSuccess_buffered(void);
 
 /**
- * Creates a copy of the ChannelUsage
+ * Utility method to constructs a new BufferedAwaitingConnection-variant SendSuccess
  */
-struct LDKChannelUsage ChannelUsage_clone(const struct LDKChannelUsage *NONNULL_PTR orig);
+struct LDKSendSuccess SendSuccess_buffered_awaiting_connection(struct LDKPublicKey a);
 
 /**
- * Frees any resources used by the FixedPenaltyScorer, if is_owned is set and inner is non-NULL.
+ * Generates a non-cryptographic 64-bit hash of the SendSuccess.
  */
-void FixedPenaltyScorer_free(struct LDKFixedPenaltyScorer this_obj);
+uint64_t SendSuccess_hash(const struct LDKSendSuccess *NONNULL_PTR o);
 
 /**
- * Creates a copy of the FixedPenaltyScorer
+ * Checks if two SendSuccesss contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-struct LDKFixedPenaltyScorer FixedPenaltyScorer_clone(const struct LDKFixedPenaltyScorer *NONNULL_PTR orig);
+bool SendSuccess_eq(const struct LDKSendSuccess *NONNULL_PTR a, const struct LDKSendSuccess *NONNULL_PTR b);
 
 /**
- * Creates a new scorer using `penalty_msat`.
+ * Frees any resources used by the SendError
  */
-MUST_USE_RES struct LDKFixedPenaltyScorer FixedPenaltyScorer_with_penalty(uint64_t penalty_msat);
+void SendError_free(struct LDKSendError this_ptr);
 
 /**
- * Constructs a new Score which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is
+ * Creates a copy of the SendError
  */
-struct LDKScore FixedPenaltyScorer_as_Score(const struct LDKFixedPenaltyScorer *NONNULL_PTR this_arg);
+struct LDKSendError SendError_clone(const struct LDKSendError *NONNULL_PTR orig);
 
 /**
- * Serialize the FixedPenaltyScorer object into a byte array which can be read by FixedPenaltyScorer_read
+ * Utility method to constructs a new Secp256k1-variant SendError
  */
-struct LDKCVec_u8Z FixedPenaltyScorer_write(const struct LDKFixedPenaltyScorer *NONNULL_PTR obj);
+struct LDKSendError SendError_secp256k1(enum LDKSecp256k1Error a);
 
 /**
- * Read a FixedPenaltyScorer from a byte array, created by FixedPenaltyScorer_write
+ * Utility method to constructs a new TooBigPacket-variant SendError
  */
-struct LDKCResult_FixedPenaltyScorerDecodeErrorZ FixedPenaltyScorer_read(struct LDKu8slice ser, uint64_t arg);
+struct LDKSendError SendError_too_big_packet(void);
 
 /**
- * Frees any resources used by the ProbabilisticScorer, if is_owned is set and inner is non-NULL.
+ * Utility method to constructs a new TooFewBlindedHops-variant SendError
  */
-void ProbabilisticScorer_free(struct LDKProbabilisticScorer this_obj);
+struct LDKSendError SendError_too_few_blinded_hops(void);
 
 /**
- * Frees any resources used by the ProbabilisticScoringFeeParameters, if is_owned is set and inner is non-NULL.
+ * Utility method to constructs a new InvalidFirstHop-variant SendError
  */
-void ProbabilisticScoringFeeParameters_free(struct LDKProbabilisticScoringFeeParameters this_obj);
+struct LDKSendError SendError_invalid_first_hop(struct LDKPublicKey a);
 
 /**
- * A fixed penalty in msats to apply to each channel.
- *
- * Default value: 500 msat
+ * Utility method to constructs a new PathNotFound-variant SendError
  */
-uint64_t ProbabilisticScoringFeeParameters_get_base_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+struct LDKSendError SendError_path_not_found(void);
 
 /**
- * A fixed penalty in msats to apply to each channel.
- *
- * Default value: 500 msat
+ * Utility method to constructs a new InvalidMessage-variant SendError
  */
-void ProbabilisticScoringFeeParameters_set_base_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKSendError SendError_invalid_message(void);
 
 /**
- * A multiplier used with the payment amount to calculate a fixed penalty applied to each
- * channel, in excess of the [`base_penalty_msat`].
- *
- * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
- * fees plus penalty) for large payments. The penalty is computed as the product of this
- * multiplier and `2^30`ths of the payment amount.
- *
- * ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
- *
- * Default value: 8,192 msat
- *
- * [`base_penalty_msat`]: Self::base_penalty_msat
+ * Utility method to constructs a new BufferFull-variant SendError
  */
-uint64_t ProbabilisticScoringFeeParameters_get_base_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+struct LDKSendError SendError_buffer_full(void);
 
 /**
- * A multiplier used with the payment amount to calculate a fixed penalty applied to each
- * channel, in excess of the [`base_penalty_msat`].
- *
- * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
- * fees plus penalty) for large payments. The penalty is computed as the product of this
- * multiplier and `2^30`ths of the payment amount.
- *
- * ie `base_penalty_amount_multiplier_msat * amount_msat / 2^30`
- *
- * Default value: 8,192 msat
- *
- * [`base_penalty_msat`]: Self::base_penalty_msat
+ * Utility method to constructs a new GetNodeIdFailed-variant SendError
  */
-void ProbabilisticScoringFeeParameters_set_base_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKSendError SendError_get_node_id_failed(void);
 
 /**
- * A multiplier used in conjunction with the negative `log10` of the channel's success
- * probability for a payment, as determined by our latest estimates of the channel's
- * liquidity, to determine the liquidity penalty.
- *
- * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
- * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
- * penalty is effectively limited to `2 * liquidity_penalty_multiplier_msat` (corresponding to
- * lower bounding the success probability to `0.01`) when the amount falls within the
- * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
- * result in a `u64::max_value` penalty, however.
- *
- * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
- *
- * Default value: 30,000 msat
- *
- * [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
+ * Utility method to constructs a new UnresolvedIntroductionNode-variant SendError
  */
-uint64_t ProbabilisticScoringFeeParameters_get_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+struct LDKSendError SendError_unresolved_introduction_node(void);
 
 /**
- * A multiplier used in conjunction with the negative `log10` of the channel's success
- * probability for a payment, as determined by our latest estimates of the channel's
- * liquidity, to determine the liquidity penalty.
- *
- * The penalty is based in part on the knowledge learned from prior successful and unsuccessful
- * payments. This knowledge is decayed over time based on [`liquidity_offset_half_life`]. The
- * penalty is effectively limited to `2 * liquidity_penalty_multiplier_msat` (corresponding to
- * lower bounding the success probability to `0.01`) when the amount falls within the
- * uncertainty bounds of the channel liquidity balance. Amounts above the upper bound will
- * result in a `u64::max_value` penalty, however.
- *
- * `-log10(success_probability) * liquidity_penalty_multiplier_msat`
- *
- * Default value: 30,000 msat
- *
- * [`liquidity_offset_half_life`]: ProbabilisticScoringDecayParameters::liquidity_offset_half_life
+ * Utility method to constructs a new BlindedPathAdvanceFailed-variant SendError
  */
-void ProbabilisticScoringFeeParameters_set_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKSendError SendError_blinded_path_advance_failed(void);
 
 /**
- * A multiplier used in conjunction with a payment amount and the negative `log10` of the
- * channel's success probability for the payment, as determined by our latest estimates of the
- * channel's liquidity, to determine the amount penalty.
- *
- * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
- * fees plus penalty) for large payments. The penalty is computed as the product of this
- * multiplier and `2^20`ths of the payment amount, weighted by the negative `log10` of the
- * success probability.
- *
- * `-log10(success_probability) * liquidity_penalty_amount_multiplier_msat * amount_msat / 2^20`
- *
- * In practice, this means for 0.1 success probability (`-log10(0.1) == 1`) each `2^20`th of
- * the amount will result in a penalty of the multiplier. And, as the success probability
- * decreases, the negative `log10` weighting will increase dramatically. For higher success
- * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
- * fall below `1`.
- *
- * Default value: 192 msat
+ * Generates a non-cryptographic 64-bit hash of the SendError.
  */
-uint64_t ProbabilisticScoringFeeParameters_get_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+uint64_t SendError_hash(const struct LDKSendError *NONNULL_PTR o);
 
 /**
- * A multiplier used in conjunction with a payment amount and the negative `log10` of the
- * channel's success probability for the payment, as determined by our latest estimates of the
- * channel's liquidity, to determine the amount penalty.
- *
- * The purpose of the amount penalty is to avoid having fees dominate the channel cost (i.e.,
- * fees plus penalty) for large payments. The penalty is computed as the product of this
- * multiplier and `2^20`ths of the payment amount, weighted by the negative `log10` of the
- * success probability.
- *
- * `-log10(success_probability) * liquidity_penalty_amount_multiplier_msat * amount_msat / 2^20`
- *
- * In practice, this means for 0.1 success probability (`-log10(0.1) == 1`) each `2^20`th of
- * the amount will result in a penalty of the multiplier. And, as the success probability
- * decreases, the negative `log10` weighting will increase dramatically. For higher success
- * probabilities, the multiplier will have a decreasing effect as the negative `log10` will
- * fall below `1`.
- *
- * Default value: 192 msat
+ * Checks if two SendErrors contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-void ProbabilisticScoringFeeParameters_set_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b);
 
 /**
- * A multiplier used in conjunction with the negative `log10` of the channel's success
- * probability for the payment, as determined based on the history of our estimates of the
- * channel's available liquidity, to determine a penalty.
- *
- * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
- * only our latest estimate for the current liquidity available in the channel, it estimates
- * success probability based on the estimated liquidity available in the channel through
- * history. Specifically, every time we update our liquidity bounds on a given channel, we
- * track which of several buckets those bounds fall into, exponentially decaying the
- * probability of each bucket as new samples are added.
- *
- * Default value: 10,000 msat
- *
- * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ * Calls the free function if one is set
  */
-uint64_t ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
 
 /**
- * A multiplier used in conjunction with the negative `log10` of the channel's success
- * probability for the payment, as determined based on the history of our estimates of the
- * channel's available liquidity, to determine a penalty.
- *
- * This penalty is similar to [`liquidity_penalty_multiplier_msat`], however, instead of using
- * only our latest estimate for the current liquidity available in the channel, it estimates
- * success probability based on the estimated liquidity available in the channel through
- * history. Specifically, every time we update our liquidity bounds on a given channel, we
- * track which of several buckets those bounds fall into, exponentially decaying the
- * probability of each bucket as new samples are added.
- *
- * Default value: 10,000 msat
- *
- * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
+ * Frees any resources used by the PeeledOnion
  */
-void ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+void PeeledOnion_free(struct LDKPeeledOnion this_ptr);
 
 /**
- * A multiplier used in conjunction with the payment amount and the negative `log10` of the
- * channel's success probability for the payment, as determined based on the history of our
- * estimates of the channel's available liquidity, to determine a penalty.
- *
- * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
- * large payments. The penalty is computed as the product of this multiplier and the `2^20`ths
- * of the payment amount, weighted by the negative `log10` of the success probability.
- *
- * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
- * of using only our latest estimate for the current liquidity available in the channel, it
- * estimates success probability based on the estimated liquidity available in the channel
- * through history. Specifically, every time we update our liquidity bounds on a given
- * channel, we track which of several buckets those bounds fall into, exponentially decaying
- * the probability of each bucket as new samples are added.
- *
- * Default value: 64 msat
- *
- * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ * Creates a copy of the PeeledOnion
  */
-uint64_t ProbabilisticScoringFeeParameters_get_historical_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+struct LDKPeeledOnion PeeledOnion_clone(const struct LDKPeeledOnion *NONNULL_PTR orig);
 
 /**
- * A multiplier used in conjunction with the payment amount and the negative `log10` of the
- * channel's success probability for the payment, as determined based on the history of our
- * estimates of the channel's available liquidity, to determine a penalty.
- *
- * The purpose of the amount penalty is to avoid having fees dominate the channel cost for
- * large payments. The penalty is computed as the product of this multiplier and the `2^20`ths
- * of the payment amount, weighted by the negative `log10` of the success probability.
- *
- * This penalty is similar to [`liquidity_penalty_amount_multiplier_msat`], however, instead
- * of using only our latest estimate for the current liquidity available in the channel, it
- * estimates success probability based on the estimated liquidity available in the channel
- * through history. Specifically, every time we update our liquidity bounds on a given
- * channel, we track which of several buckets those bounds fall into, exponentially decaying
- * the probability of each bucket as new samples are added.
- *
- * Default value: 64 msat
- *
- * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
+ * Utility method to constructs a new Forward-variant PeeledOnion
  */
-void ProbabilisticScoringFeeParameters_set_historical_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKPeeledOnion PeeledOnion_forward(struct LDKNextMessageHop a, struct LDKOnionMessage b);
 
 /**
- * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
- * channel's capacity, (ie. htlc_maximum_msat â‰¥ 0.5 * channel_capacity) which makes us
- * prefer nodes with a smaller `htlc_maximum_msat`. We treat such nodes preferentially
- * as this makes balance discovery attacks harder to execute, thereby creating an incentive
- * to restrict `htlc_maximum_msat` and improve privacy.
- *
- * Default value: 250 msat
+ * Utility method to constructs a new Receive-variant PeeledOnion
  */
-uint64_t ProbabilisticScoringFeeParameters_get_anti_probing_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+struct LDKPeeledOnion PeeledOnion_receive(struct LDKParsedOnionMessageContents a, struct LDKThirtyTwoBytes b, struct LDKBlindedPath c);
 
 /**
- * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
- * channel's capacity, (ie. htlc_maximum_msat â‰¥ 0.5 * channel_capacity) which makes us
- * prefer nodes with a smaller `htlc_maximum_msat`. We treat such nodes preferentially
- * as this makes balance discovery attacks harder to execute, thereby creating an incentive
- * to restrict `htlc_maximum_msat` and improve privacy.
+ * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
+ * `path`, first calling [`Destination::resolve`] on `path.destination` with the given
+ * [`ReadOnlyNetworkGraph`].
  *
- * Default value: 250 msat
+ * Returns the node id of the peer to send the message to, the message itself, and any addresses
+ * needed to connect to the first node.
+ *
+ * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-void ProbabilisticScoringFeeParameters_set_anti_probing_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message_resolving_destination(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
 
 /**
- * This penalty is applied when the amount we're attempting to send over a channel exceeds our
- * current estimate of the channel's available liquidity.
- *
- * Note that in this case all other penalties, including the
- * [`liquidity_penalty_multiplier_msat`] and [`liquidity_penalty_amount_multiplier_msat`]-based
- * penalties, as well as the [`base_penalty_msat`] and the [`anti_probing_penalty_msat`], if
- * applicable, are still included in the overall penalty.
+ * Creates an [`OnionMessage`] with the given `contents` for sending to the destination of
+ * `path`.
  *
- * If you wish to avoid creating paths with such channels entirely, setting this to a value of
- * `u64::max_value()` will guarantee that.
+ * Returns the node id of the peer to send the message to, the message itself, and any addresses
+ * needed to connect to the first node.
  *
- * Default value: 1_0000_0000_000 msat (1 Bitcoin)
+ * Returns [`SendError::UnresolvedIntroductionNode`] if:
+ * - `destination` contains a blinded path with an [`IntroductionNode::DirectedShortChannelId`],
+ * - unless it can be resolved by [`NodeIdLookUp::next_node_id`].
+ * Use [`create_onion_message_resolving_destination`] instead to resolve the introduction node
+ * first with a [`ReadOnlyNetworkGraph`].
  *
- * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
- * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
- * [`base_penalty_msat`]: Self::base_penalty_msat
- * [`anti_probing_penalty_msat`]: Self::anti_probing_penalty_msat
+ * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-uint64_t ProbabilisticScoringFeeParameters_get_considered_impossible_penalty_msat(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr);
+struct LDKCResult_C3Tuple_PublicKeyOnionMessageCOption_CVec_SocketAddressZZZSendErrorZ create_onion_message(const struct LDKEntropySource *NONNULL_PTR entropy_source, const struct LDKNodeSigner *NONNULL_PTR node_signer, const struct LDKNodeIdLookUp *NONNULL_PTR node_id_lookup, struct LDKOnionMessagePath path, struct LDKOnionMessageContents contents, struct LDKBlindedPath reply_path);
 
 /**
- * This penalty is applied when the amount we're attempting to send over a channel exceeds our
- * current estimate of the channel's available liquidity.
- *
- * Note that in this case all other penalties, including the
- * [`liquidity_penalty_multiplier_msat`] and [`liquidity_penalty_amount_multiplier_msat`]-based
- * penalties, as well as the [`base_penalty_msat`] and the [`anti_probing_penalty_msat`], if
- * applicable, are still included in the overall penalty.
- *
- * If you wish to avoid creating paths with such channels entirely, setting this to a value of
- * `u64::max_value()` will guarantee that.
- *
- * Default value: 1_0000_0000_000 msat (1 Bitcoin)
+ * Decode one layer of an incoming [`OnionMessage`].
  *
- * [`liquidity_penalty_multiplier_msat`]: Self::liquidity_penalty_multiplier_msat
- * [`liquidity_penalty_amount_multiplier_msat`]: Self::liquidity_penalty_amount_multiplier_msat
- * [`base_penalty_msat`]: Self::base_penalty_msat
- * [`anti_probing_penalty_msat`]: Self::anti_probing_penalty_msat
+ * Returns either the next layer of the onion for forwarding or the decrypted content for the
+ * receiver.
  */
-void ProbabilisticScoringFeeParameters_set_considered_impossible_penalty_msat(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKCResult_PeeledOnionNoneZ peel_onion_message(const struct LDKOnionMessage *NONNULL_PTR msg, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKCustomOnionMessageHandler custom_handler);
 
 /**
- * Creates a copy of the ProbabilisticScoringFeeParameters
+ * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
+ * their respective handlers.
  */
-struct LDKProbabilisticScoringFeeParameters ProbabilisticScoringFeeParameters_clone(const struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR orig);
+MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKNodeIdLookUp node_id_lookup, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler);
 
 /**
- * Creates a "default" ProbabilisticScoringFeeParameters. See struct and individual field documentaiton for details on which values are used.
+ * Sends an [`OnionMessage`] with the given `contents` to `destination`.
+ *
+ * See [`OnionMessenger`] for example usage.
+ *
+ * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKProbabilisticScoringFeeParameters ProbabilisticScoringFeeParameters_default(void);
+MUST_USE_RES struct LDKCResult_SendSuccessSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessageContents contents, struct LDKDestination destination, struct LDKBlindedPath reply_path);
 
 /**
- * Marks the node with the given `node_id` as banned,
- * i.e it will be avoided during path finding.
+ * Constructs a new OnionMessageHandler which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OnionMessageHandler must be freed before this_arg is
  */
-void ProbabilisticScoringFeeParameters_add_banned(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
 
 /**
- * Marks all nodes in the given list as banned, i.e.,
- * they will be avoided during path finding.
+ * Calls the free function if one is set
  */
-void ProbabilisticScoringFeeParameters_add_banned_from_list(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, struct LDKCVec_NodeIdZ node_ids);
+void OffersMessageHandler_free(struct LDKOffersMessageHandler this_ptr);
 
 /**
- * Removes the node with the given `node_id` from the list of nodes to avoid.
+ * Frees any resources used by the OffersMessage
  */
-void ProbabilisticScoringFeeParameters_remove_banned(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+void OffersMessage_free(struct LDKOffersMessage this_ptr);
 
 /**
- * Sets a manual penalty for the given node.
+ * Creates a copy of the OffersMessage
  */
-void ProbabilisticScoringFeeParameters_set_manual_penalty(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id, uint64_t penalty);
+struct LDKOffersMessage OffersMessage_clone(const struct LDKOffersMessage *NONNULL_PTR orig);
 
 /**
- * Removes the node with the given `node_id` from the list of manual penalties.
+ * Utility method to constructs a new InvoiceRequest-variant OffersMessage
  */
-void ProbabilisticScoringFeeParameters_remove_manual_penalty(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+struct LDKOffersMessage OffersMessage_invoice_request(struct LDKInvoiceRequest a);
 
 /**
- * Clears the list of manual penalties that are applied during path finding.
+ * Utility method to constructs a new Invoice-variant OffersMessage
  */
-void ProbabilisticScoringFeeParameters_clear_manual_penalties(struct LDKProbabilisticScoringFeeParameters *NONNULL_PTR this_arg);
+struct LDKOffersMessage OffersMessage_invoice(struct LDKBolt12Invoice a);
 
 /**
- * Frees any resources used by the ProbabilisticScoringDecayParameters, if is_owned is set and inner is non-NULL.
+ * Utility method to constructs a new InvoiceError-variant OffersMessage
  */
-void ProbabilisticScoringDecayParameters_free(struct LDKProbabilisticScoringDecayParameters this_obj);
+struct LDKOffersMessage OffersMessage_invoice_error(struct LDKInvoiceError a);
 
 /**
- * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
- * tracking can simply live on with increasingly stale data. Instead, when a channel has not
- * seen a liquidity estimate update for this amount of time, the historical datapoints are
- * decayed by half.
- * For an example of historical_no_updates_half_life being used see [`historical_estimated_channel_liquidity_probabilities`]
- *
- * Note that after 16 or more half lives all historical data will be completely gone.
- *
- * Default value: 14 days
- *
- * [`historical_estimated_channel_liquidity_probabilities`]: ProbabilisticScorerUsingTime::historical_estimated_channel_liquidity_probabilities
+ * Returns whether `tlv_type` corresponds to a TLV record for Offers.
  */
-uint64_t ProbabilisticScoringDecayParameters_get_historical_no_updates_half_life(const struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr);
+MUST_USE_RES bool OffersMessage_is_known_type(uint64_t tlv_type);
 
 /**
- * If we aren't learning any new datapoints for a channel, the historical liquidity bounds
- * tracking can simply live on with increasingly stale data. Instead, when a channel has not
- * seen a liquidity estimate update for this amount of time, the historical datapoints are
- * decayed by half.
- * For an example of historical_no_updates_half_life being used see [`historical_estimated_channel_liquidity_probabilities`]
- *
- * Note that after 16 or more half lives all historical data will be completely gone.
- *
- * Default value: 14 days
- *
- * [`historical_estimated_channel_liquidity_probabilities`]: ProbabilisticScorerUsingTime::historical_estimated_channel_liquidity_probabilities
+ * Constructs a new OnionMessageContents which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OnionMessageContents must be freed before this_arg is
  */
-void ProbabilisticScoringDecayParameters_set_historical_no_updates_half_life(struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKOnionMessageContents OffersMessage_as_OnionMessageContents(const struct LDKOffersMessage *NONNULL_PTR this_arg);
 
 /**
- * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
- * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
- * the available liquidity is halved and the upper-bound moves half-way to the channel's total
- * capacity.
- *
- * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
- * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
- * struct documentation for more info on the way the liquidity bounds are used.
- *
- * For example, if the channel's capacity is 1 million sats, and the current upper and lower
- * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
- * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
- *
- * Default value: 6 hours
- *
- * # Note
- *
- * When built with the `no-std` feature, time will never elapse. Therefore, the channel
- * liquidity knowledge will never decay except when the bounds cross.
+ * Serialize the OffersMessage object into a byte array which can be read by OffersMessage_read
  */
-uint64_t ProbabilisticScoringDecayParameters_get_liquidity_offset_half_life(const struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z OffersMessage_write(const struct LDKOffersMessage *NONNULL_PTR obj);
 
 /**
- * Whenever this amount of time elapses since the last update to a channel's liquidity bounds,
- * the distance from the bounds to \"zero\" is cut in half. In other words, the lower-bound on
- * the available liquidity is halved and the upper-bound moves half-way to the channel's total
- * capacity.
- *
- * Because halving the liquidity bounds grows the uncertainty on the channel's liquidity,
- * the penalty for an amount within the new bounds may change. See the [`ProbabilisticScorer`]
- * struct documentation for more info on the way the liquidity bounds are used.
- *
- * For example, if the channel's capacity is 1 million sats, and the current upper and lower
- * liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
- * and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
- *
- * Default value: 6 hours
- *
- * # Note
- *
- * When built with the `no-std` feature, time will never elapse. Therefore, the channel
- * liquidity knowledge will never decay except when the bounds cross.
+ * Read a OffersMessage from a byte array, created by OffersMessage_write
  */
-void ProbabilisticScoringDecayParameters_set_liquidity_offset_half_life(struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKCResult_OffersMessageDecodeErrorZ OffersMessage_read(struct LDKu8slice ser, uint64_t arg_a, const struct LDKLogger *NONNULL_PTR arg_b);
 
 /**
- * Constructs a new ProbabilisticScoringDecayParameters given each field
+ * Frees any resources used by the Packet, if is_owned is set and inner is non-NULL.
  */
-MUST_USE_RES struct LDKProbabilisticScoringDecayParameters ProbabilisticScoringDecayParameters_new(uint64_t historical_no_updates_half_life_arg, uint64_t liquidity_offset_half_life_arg);
+void Packet_free(struct LDKPacket this_obj);
 
 /**
- * Creates a copy of the ProbabilisticScoringDecayParameters
+ * Bolt 04 version number
  */
-struct LDKProbabilisticScoringDecayParameters ProbabilisticScoringDecayParameters_clone(const struct LDKProbabilisticScoringDecayParameters *NONNULL_PTR orig);
+uint8_t Packet_get_version(const struct LDKPacket *NONNULL_PTR this_ptr);
 
 /**
- * Creates a "default" ProbabilisticScoringDecayParameters. See struct and individual field documentaiton for details on which values are used.
+ * Bolt 04 version number
  */
-MUST_USE_RES struct LDKProbabilisticScoringDecayParameters ProbabilisticScoringDecayParameters_default(void);
+void Packet_set_version(struct LDKPacket *NONNULL_PTR this_ptr, uint8_t val);
 
 /**
- * Creates a new scorer using the given scoring parameters for sending payments from a node
- * through a network graph.
+ * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data
  */
-MUST_USE_RES struct LDKProbabilisticScorer ProbabilisticScorer_new(struct LDKProbabilisticScoringDecayParameters decay_params, const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
+struct LDKPublicKey Packet_get_public_key(const struct LDKPacket *NONNULL_PTR this_ptr);
 
 /**
- * Dump the contents of this scorer into the configured logger.
- *
- * Note that this writes roughly one line per channel for which we have a liquidity estimate,
- * which may be a substantial amount of log output.
+ * A random sepc256k1 point, used to build the ECDH shared secret to decrypt hop_data
  */
-void ProbabilisticScorer_debug_log_liquidity_stats(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
+void Packet_set_public_key(struct LDKPacket *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * Query the estimated minimum and maximum liquidity available for sending a payment over the
- * channel with `scid` towards the given `target` node.
+ * Encrypted payload for the next hop
+ *
+ * Returns a copy of the field.
  */
-MUST_USE_RES struct LDKCOption_C2Tuple_u64u64ZZ ProbabilisticScorer_estimated_channel_liquidity_range(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target);
+struct LDKCVec_u8Z Packet_get_hop_data(const struct LDKPacket *NONNULL_PTR this_ptr);
 
 /**
- * Query the historical estimated minimum and maximum liquidity available for sending a
- * payment over the channel with `scid` towards the given `target` node.
- *
- * Returns two sets of 8 buckets. The first set describes the octiles for lower-bound
- * liquidity estimates, the second set describes the octiles for upper-bound liquidity
- * estimates. Each bucket describes the relative frequency at which we've seen a liquidity
- * bound in the octile relative to the channel's total capacity, on an arbitrary scale.
- * Because the values are slowly decayed, more recent data points are weighted more heavily
- * than older datapoints.
- *
- * When scoring, the estimated probability that an upper-/lower-bound lies in a given octile
- * relative to the channel's total capacity is calculated by dividing that bucket's value with
- * the total of all buckets for the given bound.
- *
- * For example, a value of `[0, 0, 0, 0, 0, 0, 32]` indicates that we believe the probability
- * of a bound being in the top octile to be 100%, and have never (recently) seen it in any
- * other octiles. A value of `[31, 0, 0, 0, 0, 0, 0, 32]` indicates we've seen the bound being
- * both in the top and bottom octile, and roughly with similar (recent) frequency.
- *
- * Because the datapoints are decayed slowly over time, values will eventually return to
- * `Some(([0; 8], [0; 8]))`.
+ * Encrypted payload for the next hop
  */
-MUST_USE_RES struct LDKCOption_C2Tuple_EightU16sEightU16sZZ ProbabilisticScorer_historical_estimated_channel_liquidity_probabilities(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg, uint64_t scid, const struct LDKNodeId *NONNULL_PTR target);
+void Packet_set_hop_data(struct LDKPacket *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
 
 /**
- * Constructs a new Score which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is
+ * HMAC to verify the integrity of hop_data
  */
-struct LDKScore ProbabilisticScorer_as_Score(const struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
+const uint8_t (*Packet_get_hmac(const struct LDKPacket *NONNULL_PTR this_ptr))[32];
 
 /**
- * Serialize the ProbabilisticScorer object into a byte array which can be read by ProbabilisticScorer_read
+ * HMAC to verify the integrity of hop_data
  */
-struct LDKCVec_u8Z ProbabilisticScorer_write(const struct LDKProbabilisticScorer *NONNULL_PTR obj);
+void Packet_set_hmac(struct LDKPacket *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * Read a ProbabilisticScorer from a byte array, created by ProbabilisticScorer_write
+ * Constructs a new Packet given each field
  */
-struct LDKCResult_ProbabilisticScorerDecodeErrorZ ProbabilisticScorer_read(struct LDKu8slice ser, struct LDKProbabilisticScoringDecayParameters arg_a, const struct LDKNetworkGraph *NONNULL_PTR arg_b, struct LDKLogger arg_c);
+MUST_USE_RES struct LDKPacket Packet_new(uint8_t version_arg, struct LDKPublicKey public_key_arg, struct LDKCVec_u8Z hop_data_arg, struct LDKThirtyTwoBytes hmac_arg);
 
 /**
- * Frees any resources used by the DelayedPaymentOutputDescriptor, if is_owned is set and inner is non-NULL.
+ * Creates a copy of the Packet
  */
-void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
+struct LDKPacket Packet_clone(const struct LDKPacket *NONNULL_PTR orig);
 
 /**
- * The outpoint which is spendable.
+ * Generates a non-cryptographic 64-bit hash of the Packet.
  */
-struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+uint64_t Packet_hash(const struct LDKPacket *NONNULL_PTR o);
 
 /**
- * The outpoint which is spendable.
+ * Checks if two Packets contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+bool Packet_eq(const struct LDKPacket *NONNULL_PTR a, const struct LDKPacket *NONNULL_PTR b);
 
 /**
- * Per commitment point to derive the delayed payment key by key holder.
+ * Serialize the Packet object into a byte array which can be read by Packet_read
  */
-struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z Packet_write(const struct LDKPacket *NONNULL_PTR obj);
 
 /**
- * Per commitment point to derive the delayed payment key by key holder.
+ * Frees any resources used by the ParsedOnionMessageContents
  */
-void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+void ParsedOnionMessageContents_free(struct LDKParsedOnionMessageContents this_ptr);
 
 /**
- * The `nSequence` value which must be set in the spending input to satisfy the `OP_CSV` in
- * the witness_script.
+ * Creates a copy of the ParsedOnionMessageContents
  */
-uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+struct LDKParsedOnionMessageContents ParsedOnionMessageContents_clone(const struct LDKParsedOnionMessageContents *NONNULL_PTR orig);
 
 /**
- * The `nSequence` value which must be set in the spending input to satisfy the `OP_CSV` in
- * the witness_script.
+ * Utility method to constructs a new Offers-variant ParsedOnionMessageContents
  */
-void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
+struct LDKParsedOnionMessageContents ParsedOnionMessageContents_offers(struct LDKOffersMessage a);
 
 /**
- * The output which is referenced by the given outpoint.
+ * Utility method to constructs a new Custom-variant ParsedOnionMessageContents
  */
-struct LDKTxOut DelayedPaymentOutputDescriptor_get_output(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+struct LDKParsedOnionMessageContents ParsedOnionMessageContents_custom(struct LDKOnionMessageContents a);
 
 /**
- * The output which is referenced by the given outpoint.
+ * Constructs a new OnionMessageContents which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned OnionMessageContents must be freed before this_arg is
  */
-void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
+struct LDKOnionMessageContents ParsedOnionMessageContents_as_OnionMessageContents(const struct LDKParsedOnionMessageContents *NONNULL_PTR this_arg);
 
 /**
- * The revocation point specific to the commitment transaction which was broadcast. Used to
- * derive the witnessScript for this output.
+ * Serialize the ParsedOnionMessageContents object into a byte array which can be read by ParsedOnionMessageContents_read
  */
-struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+struct LDKCVec_u8Z ParsedOnionMessageContents_write(const struct LDKParsedOnionMessageContents *NONNULL_PTR obj);
 
 /**
- * The revocation point specific to the commitment transaction which was broadcast. Used to
- * derive the witnessScript for this output.
+ * Creates a copy of a OnionMessageContents
  */
-void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+struct LDKOnionMessageContents OnionMessageContents_clone(const struct LDKOnionMessageContents *NONNULL_PTR orig);
 
 /**
- * Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].
- * This may be useful in re-deriving keys used in the channel to spend the output.
+ * Calls the free function if one is set
  */
-const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
+void OnionMessageContents_free(struct LDKOnionMessageContents this_ptr);
 
 /**
- * Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].
- * This may be useful in re-deriving keys used in the channel to spend the output.
+ * Frees any resources used by the NextMessageHop
  */
-void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void NextMessageHop_free(struct LDKNextMessageHop this_ptr);
 
 /**
- * The value of the channel which this output originated from, possibly indirectly.
+ * Creates a copy of the NextMessageHop
  */
-uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+struct LDKNextMessageHop NextMessageHop_clone(const struct LDKNextMessageHop *NONNULL_PTR orig);
 
 /**
- * The value of the channel which this output originated from, possibly indirectly.
+ * Utility method to constructs a new NodeId-variant NextMessageHop
  */
-void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
+struct LDKNextMessageHop NextMessageHop_node_id(struct LDKPublicKey a);
 
 /**
- * Constructs a new DelayedPaymentOutputDescriptor given each field
+ * Utility method to constructs a new ShortChannelId-variant NextMessageHop
  */
-MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKPublicKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
+struct LDKNextMessageHop NextMessageHop_short_channel_id(uint64_t a);
 
 /**
- * Creates a copy of the DelayedPaymentOutputDescriptor
+ * Generates a non-cryptographic 64-bit hash of the NextMessageHop.
  */
-struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
+uint64_t NextMessageHop_hash(const struct LDKNextMessageHop *NONNULL_PTR o);
 
 /**
- * Checks if two DelayedPaymentOutputDescriptors contain equal inner contents.
+ * Checks if two NextMessageHops contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
  */
-bool DelayedPaymentOutputDescriptor_eq(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR b);
+bool NextMessageHop_eq(const struct LDKNextMessageHop *NONNULL_PTR a, const struct LDKNextMessageHop *NONNULL_PTR b);
 
 /**
- * Serialize the DelayedPaymentOutputDescriptor object into a byte array which can be read by DelayedPaymentOutputDescriptor_read
+ * Frees any resources used by the BlindedPath, if is_owned is set and inner is non-NULL.
  */
-struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
+void BlindedPath_free(struct LDKBlindedPath this_obj);
 
 /**
- * Read a DelayedPaymentOutputDescriptor from a byte array, created by DelayedPaymentOutputDescriptor_write
+ * To send to a blinded path, the sender first finds a route to the unblinded
+ * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion
+ * message or payment's next hop and forward it along.
+ *
+ * [`encrypted_payload`]: BlindedHop::encrypted_payload
  */
-struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
+struct LDKIntroductionNode BlindedPath_get_introduction_node(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the StaticPaymentOutputDescriptor, if is_owned is set and inner is non-NULL.
+ * To send to a blinded path, the sender first finds a route to the unblinded
+ * `introduction_node`, which can unblind its [`encrypted_payload`] to find out the onion
+ * message or payment's next hop and forward it along.
+ *
+ * [`encrypted_payload`]: BlindedHop::encrypted_payload
  */
-void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
+void BlindedPath_set_introduction_node(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKIntroductionNode val);
 
 /**
- * The outpoint which is spendable.
+ * Used by the introduction node to decrypt its [`encrypted_payload`] to forward the onion
+ * message or payment.
+ *
+ * [`encrypted_payload`]: BlindedHop::encrypted_payload
  */
-struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+struct LDKPublicKey BlindedPath_get_blinding_point(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
 
 /**
- * The outpoint which is spendable.
+ * Used by the introduction node to decrypt its [`encrypted_payload`] to forward the onion
+ * message or payment.
+ *
+ * [`encrypted_payload`]: BlindedHop::encrypted_payload
  */
-void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+void BlindedPath_set_blinding_point(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * The output which is referenced by the given outpoint.
+ * The hops composing the blinded path.
  */
-struct LDKTxOut StaticPaymentOutputDescriptor_get_output(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+struct LDKCVec_BlindedHopZ BlindedPath_get_blinded_hops(const struct LDKBlindedPath *NONNULL_PTR this_ptr);
 
 /**
- * The output which is referenced by the given outpoint.
+ * The hops composing the blinded path.
  */
-void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
+void BlindedPath_set_blinded_hops(struct LDKBlindedPath *NONNULL_PTR this_ptr, struct LDKCVec_BlindedHopZ val);
 
 /**
- * Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].
- * This may be useful in re-deriving keys used in the channel to spend the output.
+ * Constructs a new BlindedPath given each field
  */
-const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
+MUST_USE_RES struct LDKBlindedPath BlindedPath_new(struct LDKIntroductionNode introduction_node_arg, struct LDKPublicKey blinding_point_arg, struct LDKCVec_BlindedHopZ blinded_hops_arg);
 
 /**
- * Arbitrary identification information returned by a call to [`ChannelSigner::channel_keys_id`].
- * This may be useful in re-deriving keys used in the channel to spend the output.
+ * Creates a copy of the BlindedPath
  */
-void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+struct LDKBlindedPath BlindedPath_clone(const struct LDKBlindedPath *NONNULL_PTR orig);
 
 /**
- * The value of the channel which this transactions spends.
+ * Generates a non-cryptographic 64-bit hash of the BlindedPath.
  */
-uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+uint64_t BlindedPath_hash(const struct LDKBlindedPath *NONNULL_PTR o);
 
 /**
- * The value of the channel which this transactions spends.
+ * Checks if two BlindedPaths contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
+bool BlindedPath_eq(const struct LDKBlindedPath *NONNULL_PTR a, const struct LDKBlindedPath *NONNULL_PTR b);
 
 /**
- * Constructs a new StaticPaymentOutputDescriptor given each field
+ * Frees any resources used by the IntroductionNode
  */
-MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
+void IntroductionNode_free(struct LDKIntroductionNode this_ptr);
 
 /**
- * Creates a copy of the StaticPaymentOutputDescriptor
+ * Creates a copy of the IntroductionNode
  */
-struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
+struct LDKIntroductionNode IntroductionNode_clone(const struct LDKIntroductionNode *NONNULL_PTR orig);
 
 /**
- * Checks if two StaticPaymentOutputDescriptors contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Utility method to constructs a new NodeId-variant IntroductionNode
  */
-bool StaticPaymentOutputDescriptor_eq(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR a, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR b);
+struct LDKIntroductionNode IntroductionNode_node_id(struct LDKPublicKey a);
 
 /**
- * Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read
+ * Utility method to constructs a new DirectedShortChannelId-variant IntroductionNode
  */
-struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
+struct LDKIntroductionNode IntroductionNode_directed_short_channel_id(enum LDKDirection a, uint64_t b);
 
 /**
- * Read a StaticPaymentOutputDescriptor from a byte array, created by StaticPaymentOutputDescriptor_write
+ * Generates a non-cryptographic 64-bit hash of the IntroductionNode.
  */
-struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
+uint64_t IntroductionNode_hash(const struct LDKIntroductionNode *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the SpendableOutputDescriptor
+ * Checks if two IntroductionNodes contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
+bool IntroductionNode_eq(const struct LDKIntroductionNode *NONNULL_PTR a, const struct LDKIntroductionNode *NONNULL_PTR b);
 
 /**
- * Creates a copy of the SpendableOutputDescriptor
+ * Creates a copy of the Direction
  */
-struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
+enum LDKDirection Direction_clone(const enum LDKDirection *NONNULL_PTR orig);
 
 /**
- * Utility method to constructs a new StaticOutput-variant SpendableOutputDescriptor
+ * Utility method to constructs a new NodeOne-variant Direction
  */
-struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
+enum LDKDirection Direction_node_one(void);
 
 /**
- * Utility method to constructs a new DelayedPaymentOutput-variant SpendableOutputDescriptor
+ * Utility method to constructs a new NodeTwo-variant Direction
  */
-struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
+enum LDKDirection Direction_node_two(void);
 
 /**
- * Utility method to constructs a new StaticPaymentOutput-variant SpendableOutputDescriptor
+ * Generates a non-cryptographic 64-bit hash of the Direction.
  */
-struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
+uint64_t Direction_hash(const enum LDKDirection *NONNULL_PTR o);
 
 /**
- * Checks if two SpendableOutputDescriptors contain equal inner contents.
+ * Checks if two Directions contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-bool SpendableOutputDescriptor_eq(const struct LDKSpendableOutputDescriptor *NONNULL_PTR a, const struct LDKSpendableOutputDescriptor *NONNULL_PTR b);
+bool Direction_eq(const enum LDKDirection *NONNULL_PTR a, const enum LDKDirection *NONNULL_PTR b);
 
 /**
- * Serialize the SpendableOutputDescriptor object into a byte array which can be read by SpendableOutputDescriptor_read
+ * Calls the free function if one is set
  */
-struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
+void NodeIdLookUp_free(struct LDKNodeIdLookUp this_ptr);
 
 /**
- * Read a SpendableOutputDescriptor from a byte array, created by SpendableOutputDescriptor_write
+ * Frees any resources used by the EmptyNodeIdLookUp, if is_owned is set and inner is non-NULL.
  */
-struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
+void EmptyNodeIdLookUp_free(struct LDKEmptyNodeIdLookUp this_obj);
 
 /**
- * Creates an unsigned [`PartiallySignedTransaction`] which spends the given descriptors to
- * the given outputs, plus an output to the given change destination (if sufficient
- * change value remains). The PSBT will have a feerate, at least, of the given value.
- *
- * The `locktime` argument is used to set the transaction's locktime. If `None`, the
- * transaction will have a locktime of 0. It it recommended to set this to the current block
- * height to avoid fee sniping, unless you have some specific reason to use a different
- * locktime.
- *
- * Returns the PSBT and expected max transaction weight.
- *
- * Returns `Err(())` if the output value is greater than the input value minus required fee,
- * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
- * does not match the one we can spend.
- *
- * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
+ * Constructs a new EmptyNodeIdLookUp given each field
  */
-MUST_USE_RES struct LDKCResult_C2Tuple_PartiallySignedTransactionusizeZNoneZ SpendableOutputDescriptor_create_spendable_outputs_psbt(struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_PackedLockTimeZ locktime);
+MUST_USE_RES struct LDKEmptyNodeIdLookUp EmptyNodeIdLookUp_new(void);
 
 /**
- * Calls the free function if one is set
+ * Constructs a new NodeIdLookUp which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned NodeIdLookUp must be freed before this_arg is
  */
-void ChannelSigner_free(struct LDKChannelSigner this_ptr);
+struct LDKNodeIdLookUp EmptyNodeIdLookUp_as_NodeIdLookUp(const struct LDKEmptyNodeIdLookUp *NONNULL_PTR this_arg);
 
 /**
- * Calls the free function if one is set
+ * Frees any resources used by the BlindedHop, if is_owned is set and inner is non-NULL.
  */
-void EcdsaChannelSigner_free(struct LDKEcdsaChannelSigner this_ptr);
+void BlindedHop_free(struct LDKBlindedHop this_obj);
 
 /**
- * Calls the free function if one is set
+ * The blinded node id of this hop in a [`BlindedPath`].
  */
-void WriteableEcdsaChannelSigner_free(struct LDKWriteableEcdsaChannelSigner this_ptr);
+struct LDKPublicKey BlindedHop_get_blinded_node_id(const struct LDKBlindedHop *NONNULL_PTR this_ptr);
 
 /**
- * Creates a copy of the Recipient
+ * The blinded node id of this hop in a [`BlindedPath`].
  */
-enum LDKRecipient Recipient_clone(const enum LDKRecipient *NONNULL_PTR orig);
+void BlindedHop_set_blinded_node_id(struct LDKBlindedHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * Utility method to constructs a new Node-variant Recipient
+ * The encrypted payload intended for this hop in a [`BlindedPath`].
+ *
+ * Returns a copy of the field.
  */
-enum LDKRecipient Recipient_node(void);
+struct LDKCVec_u8Z BlindedHop_get_encrypted_payload(const struct LDKBlindedHop *NONNULL_PTR this_ptr);
 
 /**
- * Utility method to constructs a new PhantomNode-variant Recipient
+ * The encrypted payload intended for this hop in a [`BlindedPath`].
  */
-enum LDKRecipient Recipient_phantom_node(void);
+void BlindedHop_set_encrypted_payload(struct LDKBlindedHop *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
 
 /**
- * Calls the free function if one is set
+ * Constructs a new BlindedHop given each field
  */
-void EntropySource_free(struct LDKEntropySource this_ptr);
+MUST_USE_RES struct LDKBlindedHop BlindedHop_new(struct LDKPublicKey blinded_node_id_arg, struct LDKCVec_u8Z encrypted_payload_arg);
 
 /**
- * Calls the free function if one is set
+ * Creates a copy of the BlindedHop
  */
-void NodeSigner_free(struct LDKNodeSigner this_ptr);
+struct LDKBlindedHop BlindedHop_clone(const struct LDKBlindedHop *NONNULL_PTR orig);
 
 /**
- * Calls the free function if one is set
+ * Generates a non-cryptographic 64-bit hash of the BlindedHop.
  */
-void SignerProvider_free(struct LDKSignerProvider this_ptr);
+uint64_t BlindedHop_hash(const struct LDKBlindedHop *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the InMemorySigner, if is_owned is set and inner is non-NULL.
+ * Checks if two BlindedHops contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-void InMemorySigner_free(struct LDKInMemorySigner this_obj);
+bool BlindedHop_eq(const struct LDKBlindedHop *NONNULL_PTR a, const struct LDKBlindedHop *NONNULL_PTR b);
 
 /**
- * Holder secret key in the 2-of-2 multisig script of a channel. This key also backs the
- * holder's anchor output in a commitment transaction, if one is present.
+ * Create a one-hop blinded path for a message.
  */
-const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_one_hop_for_message(struct LDKPublicKey recipient_node_id, struct LDKEntropySource entropy_source);
 
 /**
- * Holder secret key in the 2-of-2 multisig script of a channel. This key also backs the
- * holder's anchor output in a commitment transaction, if one is present.
+ * Create a blinded path for an onion message, to be forwarded along `node_pks`. The last node
+ * pubkey in `node_pks` will be the destination node.
+ *
+ * Errors if no hops are provided or if `node_pk`(s) are invalid.
  */
-void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, struct LDKEntropySource entropy_source);
 
 /**
- * Holder secret key for blinded revocation pubkey.
+ * Create a one-hop blinded path for a payment.
  */
-const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_one_hop_for_payment(struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source);
 
 /**
- * Holder secret key for blinded revocation pubkey.
+ * Create a blinded path for a payment, to be forwarded along `intermediate_nodes`.
+ *
+ * Errors if:
+ * * a provided node id is invalid
+ * * [`BlindedPayInfo`] calculation results in an integer overflow
+ * * any unknown features are required in the provided [`ForwardTlvs`]
+ *
+ * [`ForwardTlvs`]: crate::blinded_path::payment::ForwardTlvs
  */
-void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+MUST_USE_RES struct LDKCResult_C2Tuple_BlindedPayInfoBlindedPathZNoneZ BlindedPath_new_for_payment(struct LDKCVec_ForwardNodeZ intermediate_nodes, struct LDKPublicKey payee_node_id, struct LDKReceiveTlvs payee_tlvs, uint64_t htlc_maximum_msat, uint16_t min_final_cltv_expiry_delta, struct LDKEntropySource entropy_source);
 
 /**
- * Holder secret key used for our balance in counterparty-broadcasted commitment transactions.
+ * Returns the introduction [`NodeId`] of the blinded path, if it is publicly reachable (i.e.,
+ * it is found in the network graph).
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+MUST_USE_RES struct LDKNodeId BlindedPath_public_introduction_node_id(const struct LDKBlindedPath *NONNULL_PTR this_arg, const struct LDKReadOnlyNetworkGraph *NONNULL_PTR network_graph);
 
 /**
- * Holder secret key used for our balance in counterparty-broadcasted commitment transactions.
+ * Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read
  */
-void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+struct LDKCVec_u8Z BlindedPath_write(const struct LDKBlindedPath *NONNULL_PTR obj);
 
 /**
- * Holder secret key used in an HTLC transaction.
+ * Read a BlindedPath from a byte array, created by BlindedPath_write
  */
-const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+struct LDKCResult_BlindedPathDecodeErrorZ BlindedPath_read(struct LDKu8slice ser);
 
 /**
- * Holder secret key used in an HTLC transaction.
+ * Serialize the BlindedHop object into a byte array which can be read by BlindedHop_read
  */
-void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+struct LDKCVec_u8Z BlindedHop_write(const struct LDKBlindedHop *NONNULL_PTR obj);
 
 /**
- * Holder HTLC secret key used in commitment transaction HTLC outputs.
+ * Read a BlindedHop from a byte array, created by BlindedHop_write
  */
-const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+struct LDKCResult_BlindedHopDecodeErrorZ BlindedHop_read(struct LDKu8slice ser);
 
 /**
- * Holder HTLC secret key used in commitment transaction HTLC outputs.
+ * Frees any resources used by the ForwardNode, if is_owned is set and inner is non-NULL.
  */
-void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+void ForwardNode_free(struct LDKForwardNode this_obj);
 
 /**
- * Commitment seed.
+ * The TLVs for this node's [`BlindedHop`], where the fee parameters contained within are also
+ * used for [`BlindedPayInfo`] construction.
  */
-const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+struct LDKForwardTlvs ForwardNode_get_tlvs(const struct LDKForwardNode *NONNULL_PTR this_ptr);
 
 /**
- * Commitment seed.
+ * The TLVs for this node's [`BlindedHop`], where the fee parameters contained within are also
+ * used for [`BlindedPayInfo`] construction.
  */
-void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+void ForwardNode_set_tlvs(struct LDKForwardNode *NONNULL_PTR this_ptr, struct LDKForwardTlvs val);
 
 /**
- * Creates a copy of the InMemorySigner
+ * This node's pubkey.
  */
-struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
+struct LDKPublicKey ForwardNode_get_node_id(const struct LDKForwardNode *NONNULL_PTR this_ptr);
 
 /**
- * Creates a new [`InMemorySigner`].
+ * This node's pubkey.
  */
-MUST_USE_RES struct LDKInMemorySigner InMemorySigner_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id, struct LDKThirtyTwoBytes rand_bytes_unique_start);
+void ForwardNode_set_node_id(struct LDKForwardNode *NONNULL_PTR this_ptr, struct LDKPublicKey val);
 
 /**
- * Returns the counterparty's pubkeys.
- *
- * Will panic if [`ChannelSigner::provide_channel_parameters`] has not been called before.
+ * The maximum value, in msat, that may be accepted by this node.
  */
-MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+uint64_t ForwardNode_get_htlc_maximum_msat(const struct LDKForwardNode *NONNULL_PTR this_ptr);
 
 /**
- * Returns the `contest_delay` value specified by our counterparty and applied on holder-broadcastable
- * transactions, i.e., the amount of time that we have to wait to recover our funds if we
- * broadcast a transaction.
- *
- * Will panic if [`ChannelSigner::provide_channel_parameters`] has not been called before.
+ * The maximum value, in msat, that may be accepted by this node.
  */
-MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+void ForwardNode_set_htlc_maximum_msat(struct LDKForwardNode *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Returns the `contest_delay` value specified by us and applied on transactions broadcastable
- * by our counterparty, i.e., the amount of time that they have to wait to recover their funds
- * if they broadcast a transaction.
- *
- * Will panic if [`ChannelSigner::provide_channel_parameters`] has not been called before.
+ * Constructs a new ForwardNode given each field
  */
-MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKForwardNode ForwardNode_new(struct LDKForwardTlvs tlvs_arg, struct LDKPublicKey node_id_arg, uint64_t htlc_maximum_msat_arg);
 
 /**
- * Returns whether the holder is the initiator.
- *
- * Will panic if [`ChannelSigner::provide_channel_parameters`] has not been called before.
+ * Creates a copy of the ForwardNode
  */
-MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+struct LDKForwardNode ForwardNode_clone(const struct LDKForwardNode *NONNULL_PTR orig);
 
 /**
- * Funding outpoint
- *
- * Will panic if [`ChannelSigner::provide_channel_parameters`] has not been called before.
+ * Frees any resources used by the ForwardTlvs, if is_owned is set and inner is non-NULL.
  */
-MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+void ForwardTlvs_free(struct LDKForwardTlvs this_obj);
 
 /**
- * Returns a [`ChannelTransactionParameters`] for this channel, to be used when verifying or
- * building transactions.
- *
- * Will panic if [`ChannelSigner::provide_channel_parameters`] has not been called before.
+ * The short channel id this payment should be forwarded out over.
  */
-MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+uint64_t ForwardTlvs_get_short_channel_id(const struct LDKForwardTlvs *NONNULL_PTR this_ptr);
 
 /**
- * Returns the channel type features of the channel parameters. Should be helpful for
- * determining a channel's category, i. e. legacy/anchors/taproot/etc.
- *
- * Will panic if [`ChannelSigner::provide_channel_parameters`] has not been called before.
+ * The short channel id this payment should be forwarded out over.
  */
-MUST_USE_RES struct LDKChannelTypeFeatures InMemorySigner_channel_type_features(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+void ForwardTlvs_set_short_channel_id(struct LDKForwardTlvs *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Sign the single input of `spend_tx` at index `input_idx`, which spends the output described
- * by `descriptor`, returning the witness stack for the input.
- *
- * Returns an error if the input at `input_idx` does not exist, has a non-empty `script_sig`,
- * is not spending the outpoint described by [`descriptor.outpoint`],
- * or if an output descriptor `script_pubkey` does not match the one we can spend.
- *
- * [`descriptor.outpoint`]: StaticPaymentOutputDescriptor::outpoint
+ * Payment parameters for relaying over [`Self::short_channel_id`].
  */
-MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_counterparty_payment_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
+struct LDKPaymentRelay ForwardTlvs_get_payment_relay(const struct LDKForwardTlvs *NONNULL_PTR this_ptr);
 
 /**
- * Sign the single input of `spend_tx` at index `input_idx` which spends the output
- * described by `descriptor`, returning the witness stack for the input.
- *
- * Returns an error if the input at `input_idx` does not exist, has a non-empty `script_sig`,
- * is not spending the outpoint described by [`descriptor.outpoint`], does not have a
- * sequence set to [`descriptor.to_self_delay`], or if an output descriptor
- * `script_pubkey` does not match the one we can spend.
- *
- * [`descriptor.outpoint`]: DelayedPaymentOutputDescriptor::outpoint
- * [`descriptor.to_self_delay`]: DelayedPaymentOutputDescriptor::to_self_delay
+ * Payment parameters for relaying over [`Self::short_channel_id`].
  */
-MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_dynamic_p2wsh_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
+void ForwardTlvs_set_payment_relay(struct LDKForwardTlvs *NONNULL_PTR this_ptr, struct LDKPaymentRelay val);
 
 /**
- * Constructs a new EntropySource which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
+ * Payment constraints for relaying over [`Self::short_channel_id`].
  */
-struct LDKEntropySource InMemorySigner_as_EntropySource(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+struct LDKPaymentConstraints ForwardTlvs_get_payment_constraints(const struct LDKForwardTlvs *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a new ChannelSigner which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned ChannelSigner must be freed before this_arg is
+ * Payment constraints for relaying over [`Self::short_channel_id`].
  */
-struct LDKChannelSigner InMemorySigner_as_ChannelSigner(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+void ForwardTlvs_set_payment_constraints(struct LDKForwardTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val);
 
 /**
- * Constructs a new EcdsaChannelSigner which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned EcdsaChannelSigner must be freed before this_arg is
+ * Supported and required features when relaying a payment onion containing this object's
+ * corresponding [`BlindedHop::encrypted_payload`].
+ *
+ * [`BlindedHop::encrypted_payload`]: crate::blinded_path::BlindedHop::encrypted_payload
  */
-struct LDKEcdsaChannelSigner InMemorySigner_as_EcdsaChannelSigner(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+struct LDKBlindedHopFeatures ForwardTlvs_get_features(const struct LDKForwardTlvs *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a new WriteableEcdsaChannelSigner which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned WriteableEcdsaChannelSigner must be freed before this_arg is
+ * Supported and required features when relaying a payment onion containing this object's
+ * corresponding [`BlindedHop::encrypted_payload`].
+ *
+ * [`BlindedHop::encrypted_payload`]: crate::blinded_path::BlindedHop::encrypted_payload
  */
-struct LDKWriteableEcdsaChannelSigner InMemorySigner_as_WriteableEcdsaChannelSigner(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+void ForwardTlvs_set_features(struct LDKForwardTlvs *NONNULL_PTR this_ptr, struct LDKBlindedHopFeatures val);
 
 /**
- * Serialize the InMemorySigner object into a byte array which can be read by InMemorySigner_read
+ * Constructs a new ForwardTlvs given each field
  */
-struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
+MUST_USE_RES struct LDKForwardTlvs ForwardTlvs_new(uint64_t short_channel_id_arg, struct LDKPaymentRelay payment_relay_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKBlindedHopFeatures features_arg);
 
 /**
- * Read a InMemorySigner from a byte array, created by InMemorySigner_write
+ * Creates a copy of the ForwardTlvs
  */
-struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser, struct LDKEntropySource arg);
+struct LDKForwardTlvs ForwardTlvs_clone(const struct LDKForwardTlvs *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the KeysManager, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the ReceiveTlvs, if is_owned is set and inner is non-NULL.
  */
-void KeysManager_free(struct LDKKeysManager this_obj);
+void ReceiveTlvs_free(struct LDKReceiveTlvs this_obj);
 
 /**
- * Constructs a [`KeysManager`] from a 32-byte seed. If the seed is in some way biased (e.g.,
- * your CSRNG is busted) this may panic (but more importantly, you will possibly lose funds).
- * `starting_time` isn't strictly required to actually be a time, but it must absolutely,
- * without a doubt, be unique to this instance. ie if you start multiple times with the same
- * `seed`, `starting_time` must be unique to each run. Thus, the easiest way to achieve this
- * is to simply use the current time (with very high precision).
- *
- * The `seed` MUST be backed up safely prior to use so that the keys can be re-created, however,
- * obviously, `starting_time` should be unique every time you reload the library - it is only
- * used to generate new ephemeral key data (which will be stored by the individual channel if
- * necessary).
- *
- * Note that the seed is required to recover certain on-chain funds independent of
- * [`ChannelMonitor`] data, though a current copy of [`ChannelMonitor`] data is also required
- * for any channel, and some on-chain during-closing funds.
- *
- * [`ChannelMonitor`]: crate::chain::channelmonitor::ChannelMonitor
+ * Used to authenticate the sender of a payment to the receiver and tie MPP HTLCs together.
  */
-MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
+const uint8_t (*ReceiveTlvs_get_payment_secret(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr))[32];
 
 /**
- * Gets the \"node_id\" secret key used to sign gossip announcements, decode onion data, etc.
+ * Used to authenticate the sender of a payment to the receiver and tie MPP HTLCs together.
  */
-MUST_USE_RES struct LDKSecretKey KeysManager_get_node_secret_key(const struct LDKKeysManager *NONNULL_PTR this_arg);
+void ReceiveTlvs_set_payment_secret(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
 /**
- * Derive an old [`WriteableEcdsaChannelSigner`] containing per-channel secrets based on a key derivation parameters.
+ * Constraints for the receiver of this payment.
  */
-MUST_USE_RES struct LDKInMemorySigner KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
+struct LDKPaymentConstraints ReceiveTlvs_get_payment_constraints(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr);
 
 /**
- * Signs the given [`PartiallySignedTransaction`] which spends the given [`SpendableOutputDescriptor`]s.
- * The resulting inputs will be finalized and the PSBT will be ready for broadcast if there
- * are no other inputs that need signing.
- *
- * Returns `Err(())` if the PSBT is missing a descriptor or if we fail to sign.
- *
- * May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used
- * this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`].
+ * Constraints for the receiver of this payment.
  */
-MUST_USE_RES struct LDKCResult_PartiallySignedTransactionNoneZ KeysManager_sign_spendable_outputs_psbt(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_u8Z psbt);
+void ReceiveTlvs_set_payment_constraints(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentConstraints val);
 
 /**
- * Creates a [`Transaction`] which spends the given descriptors to the given outputs, plus an
- * output to the given change destination (if sufficient change value remains). The
- * transaction will have a feerate, at least, of the given value.
- *
- * The `locktime` argument is used to set the transaction's locktime. If `None`, the
- * transaction will have a locktime of 0. It it recommended to set this to the current block
- * height to avoid fee sniping, unless you have some specific reason to use a different
- * locktime.
- *
- * Returns `Err(())` if the output value is greater than the input value minus required fee,
- * if a descriptor was duplicated, or if an output descriptor `script_pubkey`
- * does not match the one we can spend.
- *
- * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
- *
- * May panic if the [`SpendableOutputDescriptor`]s were not generated by channels which used
- * this [`KeysManager`] or one of the [`InMemorySigner`] created by this [`KeysManager`].
+ * Context for the receiver of this payment.
  */
-MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_PackedLockTimeZ locktime);
+struct LDKPaymentContext ReceiveTlvs_get_payment_context(const struct LDKReceiveTlvs *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a new EntropySource which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
+ * Context for the receiver of this payment.
  */
-struct LDKEntropySource KeysManager_as_EntropySource(const struct LDKKeysManager *NONNULL_PTR this_arg);
+void ReceiveTlvs_set_payment_context(struct LDKReceiveTlvs *NONNULL_PTR this_ptr, struct LDKPaymentContext val);
 
 /**
- * Constructs a new NodeSigner which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned NodeSigner must be freed before this_arg is
+ * Constructs a new ReceiveTlvs given each field
  */
-struct LDKNodeSigner KeysManager_as_NodeSigner(const struct LDKKeysManager *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKReceiveTlvs ReceiveTlvs_new(struct LDKThirtyTwoBytes payment_secret_arg, struct LDKPaymentConstraints payment_constraints_arg, struct LDKPaymentContext payment_context_arg);
 
 /**
- * Constructs a new SignerProvider which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is
+ * Creates a copy of the ReceiveTlvs
  */
-struct LDKSignerProvider KeysManager_as_SignerProvider(const struct LDKKeysManager *NONNULL_PTR this_arg);
+struct LDKReceiveTlvs ReceiveTlvs_clone(const struct LDKReceiveTlvs *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the PhantomKeysManager, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the PaymentRelay, if is_owned is set and inner is non-NULL.
  */
-void PhantomKeysManager_free(struct LDKPhantomKeysManager this_obj);
+void PaymentRelay_free(struct LDKPaymentRelay this_obj);
 
 /**
- * Constructs a new EntropySource which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned EntropySource must be freed before this_arg is
+ * Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for this [`BlindedHop`].
  */
-struct LDKEntropySource PhantomKeysManager_as_EntropySource(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+uint16_t PaymentRelay_get_cltv_expiry_delta(const struct LDKPaymentRelay *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a new NodeSigner which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned NodeSigner must be freed before this_arg is
+ * Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for this [`BlindedHop`].
  */
-struct LDKNodeSigner PhantomKeysManager_as_NodeSigner(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+void PaymentRelay_set_cltv_expiry_delta(struct LDKPaymentRelay *NONNULL_PTR this_ptr, uint16_t val);
 
 /**
- * Constructs a new SignerProvider which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned SignerProvider must be freed before this_arg is
+ * Liquidity fee charged (in millionths of the amount transferred) for relaying a payment over
+ * this [`BlindedHop`], (i.e., 10,000 is 1%).
  */
-struct LDKSignerProvider PhantomKeysManager_as_SignerProvider(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+uint32_t PaymentRelay_get_fee_proportional_millionths(const struct LDKPaymentRelay *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a [`PhantomKeysManager`] given a 32-byte seed and an additional `cross_node_seed`
- * that is shared across all nodes that intend to participate in [phantom node payments]
- * together.
- *
- * See [`KeysManager::new`] for more information on `seed`, `starting_time_secs`, and
- * `starting_time_nanos`.
- *
- * `cross_node_seed` must be the same across all phantom payment-receiving nodes and also the
- * same across restarts, or else inbound payments may fail.
- *
- * [phantom node payments]: PhantomKeysManager
+ * Liquidity fee charged (in millionths of the amount transferred) for relaying a payment over
+ * this [`BlindedHop`], (i.e., 10,000 is 1%).
  */
-MUST_USE_RES struct LDKPhantomKeysManager PhantomKeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos, const uint8_t (*cross_node_seed)[32]);
+void PaymentRelay_set_fee_proportional_millionths(struct LDKPaymentRelay *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * See [`KeysManager::spend_spendable_outputs`] for documentation on this method.
+ * Base fee charged (in millisatoshi) for relaying a payment over this [`BlindedHop`].
  */
-MUST_USE_RES struct LDKCResult_TransactionNoneZ PhantomKeysManager_spend_spendable_outputs(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight, struct LDKCOption_PackedLockTimeZ locktime);
+uint32_t PaymentRelay_get_fee_base_msat(const struct LDKPaymentRelay *NONNULL_PTR this_ptr);
 
 /**
- * See [`KeysManager::derive_channel_keys`] for documentation on this method.
+ * Base fee charged (in millisatoshi) for relaying a payment over this [`BlindedHop`].
  */
-MUST_USE_RES struct LDKInMemorySigner PhantomKeysManager_derive_channel_keys(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
+void PaymentRelay_set_fee_base_msat(struct LDKPaymentRelay *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * Gets the \"node_id\" secret key used to sign gossip announcements, decode onion data, etc.
+ * Constructs a new PaymentRelay given each field
  */
-MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKPaymentRelay PaymentRelay_new(uint16_t cltv_expiry_delta_arg, uint32_t fee_proportional_millionths_arg, uint32_t fee_base_msat_arg);
 
 /**
- * Gets the \"node_id\" secret key of the phantom node used to sign invoices, decode the
- * last-hop onion data, etc.
+ * Creates a copy of the PaymentRelay
  */
-MUST_USE_RES struct LDKSecretKey PhantomKeysManager_get_phantom_node_secret_key(const struct LDKPhantomKeysManager *NONNULL_PTR this_arg);
+struct LDKPaymentRelay PaymentRelay_clone(const struct LDKPaymentRelay *NONNULL_PTR orig);
 
 /**
- * Frees any resources used by the OnionMessenger, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the PaymentConstraints, if is_owned is set and inner is non-NULL.
  */
-void OnionMessenger_free(struct LDKOnionMessenger this_obj);
+void PaymentConstraints_free(struct LDKPaymentConstraints this_obj);
 
 /**
- * Calls the free function if one is set
+ * The maximum total CLTV that is acceptable when relaying a payment over this [`BlindedHop`].
  */
-void MessageRouter_free(struct LDKMessageRouter this_ptr);
+uint32_t PaymentConstraints_get_max_cltv_expiry(const struct LDKPaymentConstraints *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the DefaultMessageRouter, if is_owned is set and inner is non-NULL.
+ * The maximum total CLTV that is acceptable when relaying a payment over this [`BlindedHop`].
  */
-void DefaultMessageRouter_free(struct LDKDefaultMessageRouter this_obj);
+void PaymentConstraints_set_max_cltv_expiry(struct LDKPaymentConstraints *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * Constructs a new DefaultMessageRouter given each field
+ * The minimum value, in msat, that may be accepted by the node corresponding to this
+ * [`BlindedHop`].
  */
-MUST_USE_RES struct LDKDefaultMessageRouter DefaultMessageRouter_new(void);
+uint64_t PaymentConstraints_get_htlc_minimum_msat(const struct LDKPaymentConstraints *NONNULL_PTR this_ptr);
 
 /**
- * Constructs a new MessageRouter which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned MessageRouter must be freed before this_arg is
+ * The minimum value, in msat, that may be accepted by the node corresponding to this
+ * [`BlindedHop`].
  */
-struct LDKMessageRouter DefaultMessageRouter_as_MessageRouter(const struct LDKDefaultMessageRouter *NONNULL_PTR this_arg);
+void PaymentConstraints_set_htlc_minimum_msat(struct LDKPaymentConstraints *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Frees any resources used by the OnionMessagePath, if is_owned is set and inner is non-NULL.
+ * Constructs a new PaymentConstraints given each field
  */
-void OnionMessagePath_free(struct LDKOnionMessagePath this_obj);
+MUST_USE_RES struct LDKPaymentConstraints PaymentConstraints_new(uint32_t max_cltv_expiry_arg, uint64_t htlc_minimum_msat_arg);
 
 /**
- * Nodes on the path between the sender and the destination.
- *
- * Returns a copy of the field.
+ * Creates a copy of the PaymentConstraints
  */
-struct LDKCVec_PublicKeyZ OnionMessagePath_get_intermediate_nodes(const struct LDKOnionMessagePath *NONNULL_PTR this_ptr);
+struct LDKPaymentConstraints PaymentConstraints_clone(const struct LDKPaymentConstraints *NONNULL_PTR orig);
 
 /**
- * Nodes on the path between the sender and the destination.
+ * Frees any resources used by the PaymentContext
  */
-void OnionMessagePath_set_intermediate_nodes(struct LDKOnionMessagePath *NONNULL_PTR this_ptr, struct LDKCVec_PublicKeyZ val);
+void PaymentContext_free(struct LDKPaymentContext this_ptr);
 
 /**
- * The recipient of the message.
+ * Creates a copy of the PaymentContext
  */
-struct LDKDestination OnionMessagePath_get_destination(const struct LDKOnionMessagePath *NONNULL_PTR this_ptr);
+struct LDKPaymentContext PaymentContext_clone(const struct LDKPaymentContext *NONNULL_PTR orig);
 
 /**
- * The recipient of the message.
+ * Utility method to constructs a new Unknown-variant PaymentContext
  */
-void OnionMessagePath_set_destination(struct LDKOnionMessagePath *NONNULL_PTR this_ptr, struct LDKDestination val);
+struct LDKPaymentContext PaymentContext_unknown(struct LDKUnknownPaymentContext a);
 
 /**
- * Constructs a new OnionMessagePath given each field
+ * Utility method to constructs a new Bolt12Offer-variant PaymentContext
  */
-MUST_USE_RES struct LDKOnionMessagePath OnionMessagePath_new(struct LDKCVec_PublicKeyZ intermediate_nodes_arg, struct LDKDestination destination_arg);
+struct LDKPaymentContext PaymentContext_bolt12_offer(struct LDKBolt12OfferContext a);
 
 /**
- * Creates a copy of the OnionMessagePath
+ * Utility method to constructs a new Bolt12Refund-variant PaymentContext
  */
-struct LDKOnionMessagePath OnionMessagePath_clone(const struct LDKOnionMessagePath *NONNULL_PTR orig);
+struct LDKPaymentContext PaymentContext_bolt12_refund(struct LDKBolt12RefundContext a);
 
 /**
- * Frees any resources used by the Destination
+ * Checks if two PaymentContexts contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-void Destination_free(struct LDKDestination this_ptr);
+bool PaymentContext_eq(const struct LDKPaymentContext *NONNULL_PTR a, const struct LDKPaymentContext *NONNULL_PTR b);
 
 /**
- * Creates a copy of the Destination
+ * Frees any resources used by the UnknownPaymentContext, if is_owned is set and inner is non-NULL.
  */
-struct LDKDestination Destination_clone(const struct LDKDestination *NONNULL_PTR orig);
+void UnknownPaymentContext_free(struct LDKUnknownPaymentContext this_obj);
 
 /**
- * Utility method to constructs a new Node-variant Destination
+ * Creates a copy of the UnknownPaymentContext
  */
-struct LDKDestination Destination_node(struct LDKPublicKey a);
+struct LDKUnknownPaymentContext UnknownPaymentContext_clone(const struct LDKUnknownPaymentContext *NONNULL_PTR orig);
 
 /**
- * Utility method to constructs a new BlindedPath-variant Destination
+ * Checks if two UnknownPaymentContexts contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-struct LDKDestination Destination_blinded_path(struct LDKBlindedPath a);
+bool UnknownPaymentContext_eq(const struct LDKUnknownPaymentContext *NONNULL_PTR a, const struct LDKUnknownPaymentContext *NONNULL_PTR b);
 
 /**
- * Frees any resources used by the SendError
+ * Frees any resources used by the Bolt12OfferContext, if is_owned is set and inner is non-NULL.
  */
-void SendError_free(struct LDKSendError this_ptr);
+void Bolt12OfferContext_free(struct LDKBolt12OfferContext this_obj);
 
 /**
- * Creates a copy of the SendError
+ * The identifier of the [`Offer`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
  */
-struct LDKSendError SendError_clone(const struct LDKSendError *NONNULL_PTR orig);
+struct LDKOfferId Bolt12OfferContext_get_offer_id(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr);
 
 /**
- * Utility method to constructs a new Secp256k1-variant SendError
+ * The identifier of the [`Offer`].
+ *
+ * [`Offer`]: crate::offers::offer::Offer
  */
-struct LDKSendError SendError_secp256k1(enum LDKSecp256k1Error a);
+void Bolt12OfferContext_set_offer_id(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKOfferId val);
 
 /**
- * Utility method to constructs a new TooBigPacket-variant SendError
+ * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
  */
-struct LDKSendError SendError_too_big_packet(void);
+struct LDKInvoiceRequestFields Bolt12OfferContext_get_invoice_request(const struct LDKBolt12OfferContext *NONNULL_PTR this_ptr);
 
 /**
- * Utility method to constructs a new TooFewBlindedHops-variant SendError
+ * Fields from an [`InvoiceRequest`] sent for a [`Bolt12Invoice`].
+ *
+ * [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+ * [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
  */
-struct LDKSendError SendError_too_few_blinded_hops(void);
+void Bolt12OfferContext_set_invoice_request(struct LDKBolt12OfferContext *NONNULL_PTR this_ptr, struct LDKInvoiceRequestFields val);
 
 /**
- * Utility method to constructs a new InvalidFirstHop-variant SendError
+ * Constructs a new Bolt12OfferContext given each field
  */
-struct LDKSendError SendError_invalid_first_hop(void);
+MUST_USE_RES struct LDKBolt12OfferContext Bolt12OfferContext_new(struct LDKOfferId offer_id_arg, struct LDKInvoiceRequestFields invoice_request_arg);
 
 /**
- * Utility method to constructs a new InvalidMessage-variant SendError
+ * Creates a copy of the Bolt12OfferContext
  */
-struct LDKSendError SendError_invalid_message(void);
+struct LDKBolt12OfferContext Bolt12OfferContext_clone(const struct LDKBolt12OfferContext *NONNULL_PTR orig);
 
 /**
- * Utility method to constructs a new BufferFull-variant SendError
+ * Checks if two Bolt12OfferContexts contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-struct LDKSendError SendError_buffer_full(void);
+bool Bolt12OfferContext_eq(const struct LDKBolt12OfferContext *NONNULL_PTR a, const struct LDKBolt12OfferContext *NONNULL_PTR b);
 
 /**
- * Utility method to constructs a new GetNodeIdFailed-variant SendError
+ * Frees any resources used by the Bolt12RefundContext, if is_owned is set and inner is non-NULL.
  */
-struct LDKSendError SendError_get_node_id_failed(void);
+void Bolt12RefundContext_free(struct LDKBolt12RefundContext this_obj);
 
 /**
- * Utility method to constructs a new BlindedPathAdvanceFailed-variant SendError
+ * Constructs a new Bolt12RefundContext given each field
  */
-struct LDKSendError SendError_blinded_path_advance_failed(void);
+MUST_USE_RES struct LDKBolt12RefundContext Bolt12RefundContext_new(void);
 
 /**
- * Checks if two SendErrors contain equal inner contents.
+ * Creates a copy of the Bolt12RefundContext
+ */
+struct LDKBolt12RefundContext Bolt12RefundContext_clone(const struct LDKBolt12RefundContext *NONNULL_PTR orig);
+
+/**
+ * Checks if two Bolt12RefundContexts contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-bool SendError_eq(const struct LDKSendError *NONNULL_PTR a, const struct LDKSendError *NONNULL_PTR b);
+bool Bolt12RefundContext_eq(const struct LDKBolt12RefundContext *NONNULL_PTR a, const struct LDKBolt12RefundContext *NONNULL_PTR b);
 
 /**
- * Calls the free function if one is set
+ * Serialize the ForwardTlvs object into a byte array which can be read by ForwardTlvs_read
  */
-void CustomOnionMessageHandler_free(struct LDKCustomOnionMessageHandler this_ptr);
+struct LDKCVec_u8Z ForwardTlvs_write(const struct LDKForwardTlvs *NONNULL_PTR obj);
 
 /**
- * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
- * their respective handlers.
+ * Serialize the ReceiveTlvs object into a byte array which can be read by ReceiveTlvs_read
  */
-MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, struct LDKMessageRouter message_router, struct LDKOffersMessageHandler offers_handler, struct LDKCustomOnionMessageHandler custom_handler);
+struct LDKCVec_u8Z ReceiveTlvs_write(const struct LDKReceiveTlvs *NONNULL_PTR obj);
 
 /**
- * Send an onion message with contents `message` to the destination of `path`.
- *
- * See [`OnionMessenger`] for example usage.
- *
- * Note that reply_path (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Serialize the PaymentRelay object into a byte array which can be read by PaymentRelay_read
  */
-MUST_USE_RES struct LDKCResult_NoneSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKOnionMessagePath path, struct LDKOnionMessageContents message, struct LDKBlindedPath reply_path);
+struct LDKCVec_u8Z PaymentRelay_write(const struct LDKPaymentRelay *NONNULL_PTR obj);
 
 /**
- * Constructs a new OnionMessageHandler which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned OnionMessageHandler must be freed before this_arg is
+ * Read a PaymentRelay from a byte array, created by PaymentRelay_write
  */
-struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
+struct LDKCResult_PaymentRelayDecodeErrorZ PaymentRelay_read(struct LDKu8slice ser);
 
 /**
- * Constructs a new OnionMessageProvider which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned OnionMessageProvider must be freed before this_arg is
+ * Serialize the PaymentConstraints object into a byte array which can be read by PaymentConstraints_read
  */
-struct LDKOnionMessageProvider OnionMessenger_as_OnionMessageProvider(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
+struct LDKCVec_u8Z PaymentConstraints_write(const struct LDKPaymentConstraints *NONNULL_PTR obj);
 
 /**
- * Calls the free function if one is set
+ * Read a PaymentConstraints from a byte array, created by PaymentConstraints_write
  */
-void OffersMessageHandler_free(struct LDKOffersMessageHandler this_ptr);
+struct LDKCResult_PaymentConstraintsDecodeErrorZ PaymentConstraints_read(struct LDKu8slice ser);
 
 /**
- * Frees any resources used by the OffersMessage
+ * Serialize the PaymentContext object into a byte array which can be read by PaymentContext_read
  */
-void OffersMessage_free(struct LDKOffersMessage this_ptr);
+struct LDKCVec_u8Z PaymentContext_write(const struct LDKPaymentContext *NONNULL_PTR obj);
 
 /**
- * Creates a copy of the OffersMessage
+ * Read a PaymentContext from a byte array, created by PaymentContext_write
  */
-struct LDKOffersMessage OffersMessage_clone(const struct LDKOffersMessage *NONNULL_PTR orig);
+struct LDKCResult_PaymentContextDecodeErrorZ PaymentContext_read(struct LDKu8slice ser);
 
 /**
- * Utility method to constructs a new InvoiceRequest-variant OffersMessage
+ * Serialize the UnknownPaymentContext object into a byte array which can be read by UnknownPaymentContext_read
  */
-struct LDKOffersMessage OffersMessage_invoice_request(struct LDKInvoiceRequest a);
+struct LDKCVec_u8Z UnknownPaymentContext_write(const struct LDKUnknownPaymentContext *NONNULL_PTR obj);
 
 /**
- * Utility method to constructs a new Invoice-variant OffersMessage
+ * Read a UnknownPaymentContext from a byte array, created by UnknownPaymentContext_write
  */
-struct LDKOffersMessage OffersMessage_invoice(struct LDKBolt12Invoice a);
+struct LDKCResult_UnknownPaymentContextDecodeErrorZ UnknownPaymentContext_read(struct LDKu8slice ser);
 
 /**
- * Utility method to constructs a new InvoiceError-variant OffersMessage
+ * Serialize the Bolt12OfferContext object into a byte array which can be read by Bolt12OfferContext_read
  */
-struct LDKOffersMessage OffersMessage_invoice_error(struct LDKInvoiceError a);
+struct LDKCVec_u8Z Bolt12OfferContext_write(const struct LDKBolt12OfferContext *NONNULL_PTR obj);
 
 /**
- * Returns whether `tlv_type` corresponds to a TLV record for Offers.
+ * Read a Bolt12OfferContext from a byte array, created by Bolt12OfferContext_write
  */
-MUST_USE_RES bool OffersMessage_is_known_type(uint64_t tlv_type);
+struct LDKCResult_Bolt12OfferContextDecodeErrorZ Bolt12OfferContext_read(struct LDKu8slice ser);
 
 /**
- * The TLV record type for the message as used in an `onionmsg_tlv` TLV stream.
+ * Serialize the Bolt12RefundContext object into a byte array which can be read by Bolt12RefundContext_read
  */
-MUST_USE_RES uint64_t OffersMessage_tlv_type(const struct LDKOffersMessage *NONNULL_PTR this_arg);
+struct LDKCVec_u8Z Bolt12RefundContext_write(const struct LDKBolt12RefundContext *NONNULL_PTR obj);
 
 /**
- * Serialize the OffersMessage object into a byte array which can be read by OffersMessage_read
+ * Read a Bolt12RefundContext from a byte array, created by Bolt12RefundContext_write
  */
-struct LDKCVec_u8Z OffersMessage_write(const struct LDKOffersMessage *NONNULL_PTR obj);
+struct LDKCResult_Bolt12RefundContextDecodeErrorZ Bolt12RefundContext_read(struct LDKu8slice ser);
 
 /**
- * Read a OffersMessage from a byte array, created by OffersMessage_write
+ * Frees any resources used by the PaymentPurpose
  */
-struct LDKCResult_OffersMessageDecodeErrorZ OffersMessage_read(struct LDKu8slice ser, uint64_t arg_a, const struct LDKLogger *NONNULL_PTR arg_b);
+void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
 
 /**
- * Frees any resources used by the OnionMessageContents
+ * Creates a copy of the PaymentPurpose
  */
-void OnionMessageContents_free(struct LDKOnionMessageContents this_ptr);
+struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
 
 /**
- * Utility method to constructs a new Offers-variant OnionMessageContents
+ * Utility method to constructs a new Bolt11InvoicePayment-variant PaymentPurpose
  */
-struct LDKOnionMessageContents OnionMessageContents_offers(struct LDKOffersMessage a);
+struct LDKPaymentPurpose PaymentPurpose_bolt11_invoice_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret);
 
 /**
- * Utility method to constructs a new Custom-variant OnionMessageContents
+ * Utility method to constructs a new Bolt12OfferPayment-variant PaymentPurpose
  */
-struct LDKOnionMessageContents OnionMessageContents_custom(struct LDKCustomOnionMessageContents a);
+struct LDKPaymentPurpose PaymentPurpose_bolt12_offer_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12OfferContext payment_context);
 
 /**
- * Calls the free function if one is set
+ * Utility method to constructs a new Bolt12RefundPayment-variant PaymentPurpose
  */
-void CustomOnionMessageContents_free(struct LDKCustomOnionMessageContents this_ptr);
+struct LDKPaymentPurpose PaymentPurpose_bolt12_refund_payment(struct LDKCOption_ThirtyTwoBytesZ payment_preimage, struct LDKThirtyTwoBytes payment_secret, struct LDKBolt12RefundContext payment_context);
 
 /**
- * Frees any resources used by the BlindedPath, if is_owned is set and inner is non-NULL.
+ * Utility method to constructs a new SpontaneousPayment-variant PaymentPurpose
  */
-void BlindedPath_free(struct LDKBlindedPath this_obj);
+struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
 
 /**
- * Creates a copy of the BlindedPath
+ * Checks if two PaymentPurposes contain equal inner contents.
+ * This ignores pointers and is_owned flags and looks at the values in fields.
  */
-struct LDKBlindedPath BlindedPath_clone(const struct LDKBlindedPath *NONNULL_PTR orig);
+bool PaymentPurpose_eq(const struct LDKPaymentPurpose *NONNULL_PTR a, const struct LDKPaymentPurpose *NONNULL_PTR b);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the BlindedPath.
+ * Returns the preimage for this payment, if it is known.
  */
-uint64_t BlindedPath_hash(const struct LDKBlindedPath *NONNULL_PTR o);
+MUST_USE_RES struct LDKCOption_ThirtyTwoBytesZ PaymentPurpose_preimage(const struct LDKPaymentPurpose *NONNULL_PTR this_arg);
 
 /**
- * Checks if two BlindedPaths contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * Serialize the PaymentPurpose object into a byte array which can be read by PaymentPurpose_read
  */
-bool BlindedPath_eq(const struct LDKBlindedPath *NONNULL_PTR a, const struct LDKBlindedPath *NONNULL_PTR b);
+struct LDKCVec_u8Z PaymentPurpose_write(const struct LDKPaymentPurpose *NONNULL_PTR obj);
 
 /**
- * Frees any resources used by the BlindedHop, if is_owned is set and inner is non-NULL.
+ * Read a PaymentPurpose from a byte array, created by PaymentPurpose_write
  */
-void BlindedHop_free(struct LDKBlindedHop this_obj);
+struct LDKCResult_PaymentPurposeDecodeErrorZ PaymentPurpose_read(struct LDKu8slice ser);
 
 /**
- * Creates a copy of the BlindedHop
+ * Frees any resources used by the ClaimedHTLC, if is_owned is set and inner is non-NULL.
  */
-struct LDKBlindedHop BlindedHop_clone(const struct LDKBlindedHop *NONNULL_PTR orig);
+void ClaimedHTLC_free(struct LDKClaimedHTLC this_obj);
 
 /**
- * Generates a non-cryptographic 64-bit hash of the BlindedHop.
+ * The `channel_id` of the channel over which the HTLC was received.
  */
-uint64_t BlindedHop_hash(const struct LDKBlindedHop *NONNULL_PTR o);
+struct LDKChannelId ClaimedHTLC_get_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
 
 /**
- * Checks if two BlindedHops contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
+ * The `channel_id` of the channel over which the HTLC was received.
  */
-bool BlindedHop_eq(const struct LDKBlindedHop *NONNULL_PTR a, const struct LDKBlindedHop *NONNULL_PTR b);
+void ClaimedHTLC_set_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKChannelId val);
 
 /**
- * Create a blinded path for an onion message, to be forwarded along `node_pks`. The last node
- * pubkey in `node_pks` will be the destination node.
+ * The `user_channel_id` of the channel over which the HTLC was received. This is the value
+ * passed in to [`ChannelManager::create_channel`] for outbound channels, or to
+ * [`ChannelManager::accept_inbound_channel`] for inbound channels if
+ * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
+ * `user_channel_id` will be randomized for an inbound channel.
  *
- * Errors if less than two hops are provided or if `node_pk`(s) are invalid.
+ * This field will be zero for a payment that was serialized prior to LDK version 0.0.117. (This
+ * should only happen in the case that a payment was claimable prior to LDK version 0.0.117, but
+ * was not actually claimed until after upgrading.)
+ *
+ * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
+ * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
+ * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
  */
-MUST_USE_RES struct LDKCResult_BlindedPathNoneZ BlindedPath_new_for_message(struct LDKCVec_PublicKeyZ node_pks, const struct LDKEntropySource *NONNULL_PTR entropy_source);
+struct LDKU128 ClaimedHTLC_get_user_channel_id(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
 
 /**
- * Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read
+ * The `user_channel_id` of the channel over which the HTLC was received. This is the value
+ * passed in to [`ChannelManager::create_channel`] for outbound channels, or to
+ * [`ChannelManager::accept_inbound_channel`] for inbound channels if
+ * [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
+ * `user_channel_id` will be randomized for an inbound channel.
+ *
+ * This field will be zero for a payment that was serialized prior to LDK version 0.0.117. (This
+ * should only happen in the case that a payment was claimable prior to LDK version 0.0.117, but
+ * was not actually claimed until after upgrading.)
+ *
+ * [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
+ * [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
+ * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
  */
-struct LDKCVec_u8Z BlindedPath_write(const struct LDKBlindedPath *NONNULL_PTR obj);
+void ClaimedHTLC_set_user_channel_id(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, struct LDKU128 val);
 
 /**
- * Read a BlindedPath from a byte array, created by BlindedPath_write
+ * The block height at which this HTLC expires.
  */
-struct LDKCResult_BlindedPathDecodeErrorZ BlindedPath_read(struct LDKu8slice ser);
+uint32_t ClaimedHTLC_get_cltv_expiry(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
 
 /**
- * Serialize the BlindedHop object into a byte array which can be read by BlindedHop_read
+ * The block height at which this HTLC expires.
  */
-struct LDKCVec_u8Z BlindedHop_write(const struct LDKBlindedHop *NONNULL_PTR obj);
+void ClaimedHTLC_set_cltv_expiry(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint32_t val);
 
 /**
- * Read a BlindedHop from a byte array, created by BlindedHop_write
+ * The amount (in msats) of this part of an MPP.
  */
-struct LDKCResult_BlindedHopDecodeErrorZ BlindedHop_read(struct LDKu8slice ser);
+uint64_t ClaimedHTLC_get_value_msat(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
 
 /**
- * Frees any resources used by the PaymentPurpose
+ * The amount (in msats) of this part of an MPP.
  */
-void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
+void ClaimedHTLC_set_value_msat(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Creates a copy of the PaymentPurpose
+ * The extra fee our counterparty skimmed off the top of this HTLC, if any.
+ *
+ * This value will always be 0 for [`ClaimedHTLC`]s serialized with LDK versions prior to
+ * 0.0.119.
  */
-struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
+uint64_t ClaimedHTLC_get_counterparty_skimmed_fee_msat(const struct LDKClaimedHTLC *NONNULL_PTR this_ptr);
 
 /**
- * Utility method to constructs a new InvoicePayment-variant PaymentPurpose
+ * The extra fee our counterparty skimmed off the top of this HTLC, if any.
+ *
+ * This value will always be 0 for [`ClaimedHTLC`]s serialized with LDK versions prior to
+ * 0.0.119.
  */
-struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKCOption_PaymentPreimageZ payment_preimage, struct LDKThirtyTwoBytes payment_secret);
+void ClaimedHTLC_set_counterparty_skimmed_fee_msat(struct LDKClaimedHTLC *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
- * Utility method to constructs a new SpontaneousPayment-variant PaymentPurpose
+ * Constructs a new ClaimedHTLC given each field
  */
-struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
+MUST_USE_RES struct LDKClaimedHTLC ClaimedHTLC_new(struct LDKChannelId channel_id_arg, struct LDKU128 user_channel_id_arg, uint32_t cltv_expiry_arg, uint64_t value_msat_arg, uint64_t counterparty_skimmed_fee_msat_arg);
 
 /**
- * Checks if two PaymentPurposes contain equal inner contents.
+ * Creates a copy of the ClaimedHTLC
+ */
+struct LDKClaimedHTLC ClaimedHTLC_clone(const struct LDKClaimedHTLC *NONNULL_PTR orig);
+
+/**
+ * Checks if two ClaimedHTLCs contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
+ * Two objects with NULL inner values will be considered "equal" here.
  */
-bool PaymentPurpose_eq(const struct LDKPaymentPurpose *NONNULL_PTR a, const struct LDKPaymentPurpose *NONNULL_PTR b);
+bool ClaimedHTLC_eq(const struct LDKClaimedHTLC *NONNULL_PTR a, const struct LDKClaimedHTLC *NONNULL_PTR b);
 
 /**
- * Serialize the PaymentPurpose object into a byte array which can be read by PaymentPurpose_read
+ * Serialize the ClaimedHTLC object into a byte array which can be read by ClaimedHTLC_read
  */
-struct LDKCVec_u8Z PaymentPurpose_write(const struct LDKPaymentPurpose *NONNULL_PTR obj);
+struct LDKCVec_u8Z ClaimedHTLC_write(const struct LDKClaimedHTLC *NONNULL_PTR obj);
 
 /**
- * Read a PaymentPurpose from a byte array, created by PaymentPurpose_write
+ * Read a ClaimedHTLC from a byte array, created by ClaimedHTLC_write
  */
-struct LDKCResult_PaymentPurposeDecodeErrorZ PaymentPurpose_read(struct LDKu8slice ser);
+struct LDKCResult_ClaimedHTLCDecodeErrorZ ClaimedHTLC_read(struct LDKu8slice ser);
 
 /**
  * Frees any resources used by the PathFailure
@@ -40823,9 +54645,19 @@ struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKUntrus
 struct LDKClosureReason ClosureReason_holder_force_closed(void);
 
 /**
- * Utility method to constructs a new CooperativeClosure-variant ClosureReason
+ * Utility method to constructs a new LegacyCooperativeClosure-variant ClosureReason
+ */
+struct LDKClosureReason ClosureReason_legacy_cooperative_closure(void);
+
+/**
+ * Utility method to constructs a new CounterpartyInitiatedCooperativeClosure-variant ClosureReason
+ */
+struct LDKClosureReason ClosureReason_counterparty_initiated_cooperative_closure(void);
+
+/**
+ * Utility method to constructs a new LocallyInitiatedCooperativeClosure-variant ClosureReason
  */
-struct LDKClosureReason ClosureReason_cooperative_closure(void);
+struct LDKClosureReason ClosureReason_locally_initiated_cooperative_closure(void);
 
 /**
  * Utility method to constructs a new CommitmentTxConfirmed-variant ClosureReason
@@ -40857,6 +54689,16 @@ struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
  */
 struct LDKClosureReason ClosureReason_counterparty_coop_closed_unfunded_channel(void);
 
+/**
+ * Utility method to constructs a new FundingBatchClosure-variant ClosureReason
+ */
+struct LDKClosureReason ClosureReason_funding_batch_closure(void);
+
+/**
+ * Utility method to constructs a new HTLCsTimedOut-variant ClosureReason
+ */
+struct LDKClosureReason ClosureReason_htlcs_timed_out(void);
+
 /**
  * Checks if two ClosureReasons contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -40886,7 +54728,7 @@ struct LDKHTLCDestination HTLCDestination_clone(const struct LDKHTLCDestination
 /**
  * Utility method to constructs a new NextHopChannel-variant HTLCDestination
  */
-struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id);
+struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKChannelId channel_id);
 
 /**
  * Utility method to constructs a new UnknownNextHop-variant HTLCDestination
@@ -40898,6 +54740,11 @@ struct LDKHTLCDestination HTLCDestination_unknown_next_hop(uint64_t requested_fo
  */
 struct LDKHTLCDestination HTLCDestination_invalid_forward(uint64_t requested_forward_scid);
 
+/**
+ * Utility method to constructs a new InvalidOnion-variant HTLCDestination
+ */
+struct LDKHTLCDestination HTLCDestination_invalid_onion(void);
+
 /**
  * Utility method to constructs a new FailedPayment-variant HTLCDestination
  */
@@ -40983,22 +54830,32 @@ struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
 /**
  * Utility method to constructs a new FundingGenerationReady-variant Event
  */
-struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id);
+struct LDKEvent Event_funding_generation_ready(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, struct LDKU128 user_channel_id);
 
 /**
  * Utility method to constructs a new PaymentClaimable-variant Event
  */
-struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKThirtyTwoBytes via_channel_id, struct LDKCOption_u128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline);
+struct LDKEvent Event_payment_claimable(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, struct LDKRecipientOnionFields onion_fields, uint64_t amount_msat, uint64_t counterparty_skimmed_fee_msat, struct LDKPaymentPurpose purpose, struct LDKChannelId via_channel_id, struct LDKCOption_U128Z via_user_channel_id, struct LDKCOption_u32Z claim_deadline);
 
 /**
  * Utility method to constructs a new PaymentClaimed-variant Event
  */
-struct LDKEvent Event_payment_claimed(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, uint64_t amount_msat, struct LDKPaymentPurpose purpose);
+struct LDKEvent Event_payment_claimed(struct LDKPublicKey receiver_node_id, struct LDKThirtyTwoBytes payment_hash, uint64_t amount_msat, struct LDKPaymentPurpose purpose, struct LDKCVec_ClaimedHTLCZ htlcs, struct LDKCOption_u64Z sender_intended_total_msat);
+
+/**
+ * Utility method to constructs a new ConnectionNeeded-variant Event
+ */
+struct LDKEvent Event_connection_needed(struct LDKPublicKey node_id, struct LDKCVec_SocketAddressZ addresses);
+
+/**
+ * Utility method to constructs a new InvoiceRequestFailed-variant Event
+ */
+struct LDKEvent Event_invoice_request_failed(struct LDKThirtyTwoBytes payment_id);
 
 /**
  * Utility method to constructs a new PaymentSent-variant Event
  */
-struct LDKEvent Event_payment_sent(struct LDKCOption_PaymentIdZ payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
+struct LDKEvent Event_payment_sent(struct LDKCOption_ThirtyTwoBytesZ payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
 
 /**
  * Utility method to constructs a new PaymentFailed-variant Event
@@ -41008,12 +54865,12 @@ struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_id, struct
 /**
  * Utility method to constructs a new PaymentPathSuccessful-variant Event
  */
-struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKCOption_PaymentHashZ payment_hash, struct LDKPath path);
+struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKCOption_ThirtyTwoBytesZ payment_hash, struct LDKPath path);
 
 /**
  * Utility method to constructs a new PaymentPathFailed-variant Event
  */
-struct LDKEvent Event_payment_path_failed(struct LDKCOption_PaymentIdZ payment_id, struct LDKThirtyTwoBytes payment_hash, bool payment_failed_permanently, struct LDKPathFailure failure, struct LDKPath path, struct LDKCOption_u64Z short_channel_id);
+struct LDKEvent Event_payment_path_failed(struct LDKCOption_ThirtyTwoBytesZ payment_id, struct LDKThirtyTwoBytes payment_hash, bool payment_failed_permanently, struct LDKPathFailure failure, struct LDKPath path, struct LDKCOption_u64Z short_channel_id);
 
 /**
  * Utility method to constructs a new ProbeSuccessful-variant Event
@@ -41038,42 +54895,42 @@ struct LDKEvent Event_htlcintercepted(struct LDKThirtyTwoBytes intercept_id, uin
 /**
  * Utility method to constructs a new SpendableOutputs-variant Event
  */
-struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
+struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs, struct LDKChannelId channel_id);
 
 /**
  * Utility method to constructs a new PaymentForwarded-variant Event
  */
-struct LDKEvent Event_payment_forwarded(struct LDKThirtyTwoBytes prev_channel_id, struct LDKThirtyTwoBytes next_channel_id, struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat);
+struct LDKEvent Event_payment_forwarded(struct LDKChannelId prev_channel_id, struct LDKChannelId next_channel_id, struct LDKCOption_U128Z prev_user_channel_id, struct LDKCOption_U128Z next_user_channel_id, struct LDKCOption_u64Z total_fee_earned_msat, struct LDKCOption_u64Z skimmed_fee_msat, bool claim_from_onchain_tx, struct LDKCOption_u64Z outbound_amount_forwarded_msat);
 
 /**
  * Utility method to constructs a new ChannelPending-variant Event
  */
-struct LDKEvent Event_channel_pending(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKThirtyTwoBytes former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo);
+struct LDKEvent Event_channel_pending(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKChannelId former_temporary_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKOutPoint funding_txo, struct LDKChannelTypeFeatures channel_type);
 
 /**
  * Utility method to constructs a new ChannelReady-variant Event
  */
-struct LDKEvent Event_channel_ready(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type);
+struct LDKEvent Event_channel_ready(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKPublicKey counterparty_node_id, struct LDKChannelTypeFeatures channel_type);
 
 /**
  * Utility method to constructs a new ChannelClosed-variant Event
  */
-struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason);
+struct LDKEvent Event_channel_closed(struct LDKChannelId channel_id, struct LDKU128 user_channel_id, struct LDKClosureReason reason, struct LDKPublicKey counterparty_node_id, struct LDKCOption_u64Z channel_capacity_sats, struct LDKOutPoint channel_funding_txo);
 
 /**
  * Utility method to constructs a new DiscardFunding-variant Event
  */
-struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
+struct LDKEvent Event_discard_funding(struct LDKChannelId channel_id, struct LDKTransaction transaction);
 
 /**
  * Utility method to constructs a new OpenChannelRequest-variant Event
  */
-struct LDKEvent Event_open_channel_request(struct LDKThirtyTwoBytes temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type);
+struct LDKEvent Event_open_channel_request(struct LDKChannelId temporary_channel_id, struct LDKPublicKey counterparty_node_id, uint64_t funding_satoshis, uint64_t push_msat, struct LDKChannelTypeFeatures channel_type);
 
 /**
  * Utility method to constructs a new HTLCHandlingFailed-variant Event
  */
-struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination);
+struct LDKEvent Event_htlchandling_failed(struct LDKChannelId prev_channel_id, struct LDKHTLCDestination failed_next_destination);
 
 /**
  * Utility method to constructs a new BumpTransaction-variant Event
@@ -41136,6 +54993,26 @@ struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPubli
  */
 struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
 
+/**
+ * Utility method to constructs a new SendStfu-variant MessageSendEvent
+ */
+struct LDKMessageSendEvent MessageSendEvent_send_stfu(struct LDKPublicKey node_id, struct LDKStfu msg);
+
+/**
+ * Utility method to constructs a new SendSplice-variant MessageSendEvent
+ */
+struct LDKMessageSendEvent MessageSendEvent_send_splice(struct LDKPublicKey node_id, struct LDKSplice msg);
+
+/**
+ * Utility method to constructs a new SendSpliceAck-variant MessageSendEvent
+ */
+struct LDKMessageSendEvent MessageSendEvent_send_splice_ack(struct LDKPublicKey node_id, struct LDKSpliceAck msg);
+
+/**
+ * Utility method to constructs a new SendSpliceLocked-variant MessageSendEvent
+ */
+struct LDKMessageSendEvent MessageSendEvent_send_splice_locked(struct LDKPublicKey node_id, struct LDKSpliceLocked msg);
+
 /**
  * Utility method to constructs a new SendTxAddInput-variant MessageSendEvent
  */
@@ -41179,7 +55056,7 @@ struct LDKMessageSendEvent MessageSendEvent_send_tx_ack_rbf(struct LDKPublicKey
 /**
  * Utility method to constructs a new SendTxAbort-variant MessageSendEvent
  */
-struct LDKMessageSendEvent MessageSendEvent_send_tx_abort(struct LDKPublicKey node_id, struct LDKTxAddInput msg);
+struct LDKMessageSendEvent MessageSendEvent_send_tx_abort(struct LDKPublicKey node_id, struct LDKTxAbort msg);
 
 /**
  * Utility method to constructs a new SendChannelReady-variant MessageSendEvent
@@ -41271,11 +55148,6 @@ struct LDKMessageSendEvent MessageSendEvent_send_gossip_timestamp_filter(struct
  */
 void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
 
-/**
- * Calls the free function if one is set
- */
-void OnionMessageProvider_free(struct LDKOnionMessageProvider this_ptr);
-
 /**
  * Calls the free function if one is set
  */
@@ -41286,64 +55158,6 @@ void EventsProvider_free(struct LDKEventsProvider this_ptr);
  */
 void EventHandler_free(struct LDKEventHandler this_ptr);
 
-/**
- * Frees any resources used by the ChannelDerivationParameters, if is_owned is set and inner is non-NULL.
- */
-void ChannelDerivationParameters_free(struct LDKChannelDerivationParameters this_obj);
-
-/**
- * The value in satoshis of the channel we're attempting to spend the anchor output of.
- */
-uint64_t ChannelDerivationParameters_get_value_satoshis(const struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr);
-
-/**
- * The value in satoshis of the channel we're attempting to spend the anchor output of.
- */
-void ChannelDerivationParameters_set_value_satoshis(struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr, uint64_t val);
-
-/**
- * The unique identifier to re-derive the signer for the associated channel.
- */
-const uint8_t (*ChannelDerivationParameters_get_keys_id(const struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr))[32];
-
-/**
- * The unique identifier to re-derive the signer for the associated channel.
- */
-void ChannelDerivationParameters_set_keys_id(struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-
-/**
- * The necessary channel parameters that need to be provided to the re-derived signer through
- * [`ChannelSigner::provide_channel_parameters`].
- *
- * [`ChannelSigner::provide_channel_parameters`]: crate::sign::ChannelSigner::provide_channel_parameters
- */
-struct LDKChannelTransactionParameters ChannelDerivationParameters_get_transaction_parameters(const struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr);
-
-/**
- * The necessary channel parameters that need to be provided to the re-derived signer through
- * [`ChannelSigner::provide_channel_parameters`].
- *
- * [`ChannelSigner::provide_channel_parameters`]: crate::sign::ChannelSigner::provide_channel_parameters
- */
-void ChannelDerivationParameters_set_transaction_parameters(struct LDKChannelDerivationParameters *NONNULL_PTR this_ptr, struct LDKChannelTransactionParameters val);
-
-/**
- * Constructs a new ChannelDerivationParameters given each field
- */
-MUST_USE_RES struct LDKChannelDerivationParameters ChannelDerivationParameters_new(uint64_t value_satoshis_arg, struct LDKThirtyTwoBytes keys_id_arg, struct LDKChannelTransactionParameters transaction_parameters_arg);
-
-/**
- * Creates a copy of the ChannelDerivationParameters
- */
-struct LDKChannelDerivationParameters ChannelDerivationParameters_clone(const struct LDKChannelDerivationParameters *NONNULL_PTR orig);
-
-/**
- * Checks if two ChannelDerivationParameterss contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
- */
-bool ChannelDerivationParameters_eq(const struct LDKChannelDerivationParameters *NONNULL_PTR a, const struct LDKChannelDerivationParameters *NONNULL_PTR b);
-
 /**
  * Frees any resources used by the AnchorDescriptor, if is_owned is set and inner is non-NULL.
  */
@@ -41409,140 +55223,13 @@ MUST_USE_RES struct LDKCVec_u8Z AnchorDescriptor_witness_script(const struct LDK
  * Returns the fully signed witness required to spend the anchor output in the commitment
  * transaction.
  */
-MUST_USE_RES struct LDKWitness AnchorDescriptor_tx_input_witness(const struct LDKAnchorDescriptor *NONNULL_PTR this_arg, struct LDKSignature signature);
+MUST_USE_RES struct LDKWitness AnchorDescriptor_tx_input_witness(const struct LDKAnchorDescriptor *NONNULL_PTR this_arg, struct LDKECDSASignature signature);
 
 /**
  * Derives the channel signer required to sign the anchor input.
  */
 MUST_USE_RES struct LDKWriteableEcdsaChannelSigner AnchorDescriptor_derive_channel_signer(const struct LDKAnchorDescriptor *NONNULL_PTR this_arg, const struct LDKSignerProvider *NONNULL_PTR signer_provider);
 
-/**
- * Frees any resources used by the HTLCDescriptor, if is_owned is set and inner is non-NULL.
- */
-void HTLCDescriptor_free(struct LDKHTLCDescriptor this_obj);
-
-/**
- * The parameters required to derive the signer for the HTLC input.
- */
-struct LDKChannelDerivationParameters HTLCDescriptor_get_channel_derivation_parameters(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
-
-/**
- * The parameters required to derive the signer for the HTLC input.
- */
-void HTLCDescriptor_set_channel_derivation_parameters(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKChannelDerivationParameters val);
-
-/**
- * The number of the commitment transaction in which the HTLC output lives.
- */
-uint64_t HTLCDescriptor_get_per_commitment_number(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
-
-/**
- * The number of the commitment transaction in which the HTLC output lives.
- */
-void HTLCDescriptor_set_per_commitment_number(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, uint64_t val);
-
-/**
- * The key tweak corresponding to the number of the commitment transaction in which the HTLC
- * output lives. This tweak is applied to all the basepoints for both parties in the channel to
- * arrive at unique keys per commitment.
- *
- * See <https://github.com/lightning/bolts/blob/master/03-transactions.md#keys> for more info.
- */
-struct LDKPublicKey HTLCDescriptor_get_per_commitment_point(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
-
-/**
- * The key tweak corresponding to the number of the commitment transaction in which the HTLC
- * output lives. This tweak is applied to all the basepoints for both parties in the channel to
- * arrive at unique keys per commitment.
- *
- * See <https://github.com/lightning/bolts/blob/master/03-transactions.md#keys> for more info.
- */
-void HTLCDescriptor_set_per_commitment_point(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
-
-/**
- * The details of the HTLC as it appears in the commitment transaction.
- */
-struct LDKHTLCOutputInCommitment HTLCDescriptor_get_htlc(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
-
-/**
- * The details of the HTLC as it appears in the commitment transaction.
- */
-void HTLCDescriptor_set_htlc(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKHTLCOutputInCommitment val);
-
-/**
- * The preimage, if `Some`, to claim the HTLC output with. If `None`, the timeout path must be
- * taken.
- */
-struct LDKCOption_PaymentPreimageZ HTLCDescriptor_get_preimage(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
-
-/**
- * The preimage, if `Some`, to claim the HTLC output with. If `None`, the timeout path must be
- * taken.
- */
-void HTLCDescriptor_set_preimage(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKCOption_PaymentPreimageZ val);
-
-/**
- * The counterparty's signature required to spend the HTLC output.
- */
-struct LDKSignature HTLCDescriptor_get_counterparty_sig(const struct LDKHTLCDescriptor *NONNULL_PTR this_ptr);
-
-/**
- * The counterparty's signature required to spend the HTLC output.
- */
-void HTLCDescriptor_set_counterparty_sig(struct LDKHTLCDescriptor *NONNULL_PTR this_ptr, struct LDKSignature val);
-
-/**
- * Creates a copy of the HTLCDescriptor
- */
-struct LDKHTLCDescriptor HTLCDescriptor_clone(const struct LDKHTLCDescriptor *NONNULL_PTR orig);
-
-/**
- * Checks if two HTLCDescriptors contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- * Two objects with NULL inner values will be considered "equal" here.
- */
-bool HTLCDescriptor_eq(const struct LDKHTLCDescriptor *NONNULL_PTR a, const struct LDKHTLCDescriptor *NONNULL_PTR b);
-
-/**
- * Returns the outpoint of the HTLC output in the commitment transaction. This is the outpoint
- * being spent by the HTLC input in the HTLC transaction.
- */
-MUST_USE_RES struct LDKOutPoint HTLCDescriptor_outpoint(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
-
-/**
- * Returns the UTXO to be spent by the HTLC input, which can be obtained via
- * [`Self::unsigned_tx_input`].
- */
-MUST_USE_RES struct LDKTxOut HTLCDescriptor_previous_utxo(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
-
-/**
- * Returns the unsigned transaction input spending the HTLC output in the commitment
- * transaction.
- */
-MUST_USE_RES struct LDKTxIn HTLCDescriptor_unsigned_tx_input(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
-
-/**
- * Returns the delayed output created as a result of spending the HTLC output in the commitment
- * transaction.
- */
-MUST_USE_RES struct LDKTxOut HTLCDescriptor_tx_output(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
-
-/**
- * Returns the witness script of the HTLC output in the commitment transaction.
- */
-MUST_USE_RES struct LDKCVec_u8Z HTLCDescriptor_witness_script(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg);
-
-/**
- * Returns the fully signed witness required to spend the HTLC output in the commitment
- * transaction.
- */
-MUST_USE_RES struct LDKWitness HTLCDescriptor_tx_input_witness(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg, struct LDKSignature signature, struct LDKu8slice witness_script);
-
-/**
- * Derives the channel signer required to sign the HTLC input.
- */
-MUST_USE_RES struct LDKWriteableEcdsaChannelSigner HTLCDescriptor_derive_channel_signer(const struct LDKHTLCDescriptor *NONNULL_PTR this_arg, const struct LDKSignerProvider *NONNULL_PTR signer_provider);
-
 /**
  * Frees any resources used by the BumpTransactionEvent
  */
@@ -41556,12 +55243,12 @@ struct LDKBumpTransactionEvent BumpTransactionEvent_clone(const struct LDKBumpTr
 /**
  * Utility method to constructs a new ChannelClose-variant BumpTransactionEvent
  */
-struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs);
+struct LDKBumpTransactionEvent BumpTransactionEvent_channel_close(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t package_target_feerate_sat_per_1000_weight, struct LDKTransaction commitment_tx, uint64_t commitment_tx_fee_satoshis, struct LDKAnchorDescriptor anchor_descriptor, struct LDKCVec_HTLCOutputInCommitmentZ pending_htlcs);
 
 /**
  * Utility method to constructs a new HTLCResolution-variant BumpTransactionEvent
  */
-struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time);
+struct LDKBumpTransactionEvent BumpTransactionEvent_htlcresolution(struct LDKChannelId channel_id, struct LDKPublicKey counterparty_node_id, struct LDKThirtyTwoBytes claim_id, uint32_t target_feerate_sat_per_1000_weight, struct LDKCVec_HTLCDescriptorZ htlc_descriptors, uint32_t tx_lock_time);
 
 /**
  * Checks if two BumpTransactionEvents contain equal inner contents.
@@ -41784,25 +55471,25 @@ MUST_USE_RES struct LDKBumpTransactionEventHandler BumpTransactionEventHandler_n
 void BumpTransactionEventHandler_handle_event(const struct LDKBumpTransactionEventHandler *NONNULL_PTR this_arg, const struct LDKBumpTransactionEvent *NONNULL_PTR event);
 
 /**
- * Frees any resources used by the FilesystemPersister, if is_owned is set and inner is non-NULL.
+ * Frees any resources used by the FilesystemStore, if is_owned is set and inner is non-NULL.
  */
-void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
+void FilesystemStore_free(struct LDKFilesystemStore this_obj);
 
 /**
- * Initialize a new FilesystemPersister and set the path to the individual channels'
- * files.
+ * Constructs a new [`FilesystemStore`].
  */
-MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
+MUST_USE_RES struct LDKFilesystemStore FilesystemStore_new(struct LDKStr data_dir);
 
 /**
- * Get the directory which was provided when this persister was initialized.
+ * Returns the data directory.
  */
-MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKStr FilesystemStore_get_data_dir(const struct LDKFilesystemStore *NONNULL_PTR this_arg);
 
 /**
- * Read `ChannelMonitor`s from disk.
+ * Constructs a new KVStore which calls the relevant methods on this_arg.
+ * This copies the `inner` pointer in this_arg and thus the returned KVStore must be freed before this_arg is
  */
-MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKEntropySource entropy_source, const struct LDKSignerProvider *NONNULL_PTR signer_provider);
+struct LDKKVStore FilesystemStore_as_KVStore(const struct LDKFilesystemStore *NONNULL_PTR this_arg);
 
 /**
  * Frees any resources used by the BackgroundProcessor, if is_owned is set and inner is non-NULL.
@@ -41888,7 +55575,7 @@ MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKP
  *
  * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
  */
-MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
+MUST_USE_RES struct LDKCResult_NoneIOErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
 
 /**
  * Stop `BackgroundProcessor`'s thread, returning any error that occurred while persisting
@@ -41901,7 +55588,7 @@ MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBac
  *
  * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
  */
-MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
+MUST_USE_RES struct LDKCResult_NoneIOErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
 
 /**
  * Frees any resources used by the Bolt11ParseError
@@ -42488,7 +56175,7 @@ MUST_USE_RES struct LDKBolt11InvoiceSignature SignedRawBolt11Invoice_signature(c
 /**
  * Recovers the public key used for signing the invoice from the recoverable signature.
  */
-MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawBolt11Invoice_recover_payee_pub_key(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCResult_PayeePubKeySecp256k1ErrorZ SignedRawBolt11Invoice_recover_payee_pub_key(const struct LDKSignedRawBolt11Invoice *NONNULL_PTR this_arg);
 
 /**
  * Checks if the signature is valid for the included payee public key or if none exists if it's
@@ -42537,7 +56224,7 @@ MUST_USE_RES struct LDKExpiryTime RawBolt11Invoice_expiry_time(const struct LDKR
  */
 MUST_USE_RES struct LDKMinFinalCltvExpiryDelta RawBolt11Invoice_min_final_cltv_expiry_delta(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
 
-MUST_USE_RES struct LDKCOption_PaymentSecretZ RawBolt11Invoice_payment_secret(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCOption_ThirtyTwoBytesZ RawBolt11Invoice_payment_secret(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
 
 MUST_USE_RES struct LDKCOption_CVec_u8ZZ RawBolt11Invoice_payment_metadata(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
 
@@ -42549,6 +56236,9 @@ MUST_USE_RES struct LDKBolt11InvoiceFeatures RawBolt11Invoice_features(const str
 
 MUST_USE_RES struct LDKCVec_PrivateRouteZ RawBolt11Invoice_private_routes(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
 
+/**
+ * Returns `None` if no amount is set or on overflow.
+ */
 MUST_USE_RES struct LDKCOption_u64Z RawBolt11Invoice_amount_pico_btc(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
 
 MUST_USE_RES enum LDKCurrency RawBolt11Invoice_currency(const struct LDKRawBolt11Invoice *NONNULL_PTR this_arg);
@@ -42678,11 +56368,17 @@ MUST_USE_RES struct LDKBolt11InvoiceFeatures Bolt11Invoice_features(const struct
  */
 MUST_USE_RES struct LDKPublicKey Bolt11Invoice_recover_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
 
+/**
+ * Recover the payee's public key if one was included in the invoice, otherwise return the
+ * recovered public key from the signature
+ */
+MUST_USE_RES struct LDKPublicKey Bolt11Invoice_get_payee_pub_key(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+
 /**
  * Returns the Duration since the Unix epoch at which the invoice expires.
  * Returning None if overflow occurred.
  */
-MUST_USE_RES struct LDKCOption_DurationZ Bolt11Invoice_expires_at(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_expires_at(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
 
 /**
  * Returns the invoice's expiry time, if present, otherwise [`DEFAULT_EXPIRY_TIME`].
@@ -42720,7 +56416,7 @@ MUST_USE_RES uint64_t Bolt11Invoice_min_final_cltv_expiry_delta(const struct LDK
 /**
  * Returns a list of all fallback addresses as [`Address`]es
  */
-MUST_USE_RES struct LDKCVec_AddressZ Bolt11Invoice_fallback_addresses(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKCVec_StrZ Bolt11Invoice_fallback_addresses(const struct LDKBolt11Invoice *NONNULL_PTR this_arg);
 
 /**
  * Returns a list of all routes included in the invoice
@@ -42751,9 +56447,14 @@ MUST_USE_RES struct LDKCOption_u64Z Bolt11Invoice_amount_milli_satoshis(const st
 MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
 
 /**
- * Returns the underlying description [`String`]
+ * Returns the underlying description [`UntrustedString`]
+ */
+MUST_USE_RES struct LDKUntrustedString Description_into_inner(struct LDKDescription this_arg);
+
+/**
+ * Get the string representation of a Description object
  */
-MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
+struct LDKStr Description_to_str(const struct LDKDescription *NONNULL_PTR o);
 
 /**
  * Construct an `ExpiryTime` from seconds.
@@ -42929,83 +56630,35 @@ bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a,
 struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
 
 /**
- * Pays the given [`Bolt11Invoice`], retrying if needed based on [`Retry`].
- *
- * [`Bolt11Invoice::payment_hash`] is used as the [`PaymentId`], which ensures idempotency as long
- * as the payment is still pending. If the payment succeeds, you must ensure that a second payment
- * with the same [`PaymentHash`] is never sent.
+ * Builds the necessary parameters to pay or pre-flight probe the given zero-amount
+ * [`Bolt11Invoice`] using [`ChannelManager::send_payment`] or
+ * [`ChannelManager::send_preflight_probes`].
  *
- * If you wish to use a different payment idempotency token, see [`pay_invoice_with_id`].
- */
-struct LDKCResult_PaymentIdPaymentErrorZ pay_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice, struct LDKRetry retry_strategy, const struct LDKChannelManager *NONNULL_PTR channelmanager);
-
-/**
- * Pays the given [`Bolt11Invoice`] with a custom idempotency key, retrying if needed based on
- * [`Retry`].
+ * Prior to paying, you must ensure that the [`Bolt11Invoice::payment_hash`] is unique and the
+ * same [`PaymentHash`] has never been paid before.
  *
- * Note that idempotency is only guaranteed as long as the payment is still pending. Once the
- * payment completes or fails, no idempotency guarantees are made.
+ * Will always succeed unless the invoice has an amount specified, in which case
+ * [`payment_parameters_from_invoice`] should be used.
  *
- * You should ensure that the [`Bolt11Invoice::payment_hash`] is unique and the same
- * [`PaymentHash`] has never been paid before.
- *
- * See [`pay_invoice`] for a variant which uses the [`PaymentHash`] for the idempotency token.
+ * [`ChannelManager::send_payment`]: lightning::ln::channelmanager::ChannelManager::send_payment
+ * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
  */
-struct LDKCResult_NonePaymentErrorZ pay_invoice_with_id(const struct LDKBolt11Invoice *NONNULL_PTR invoice, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, const struct LDKChannelManager *NONNULL_PTR channelmanager);
+struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_zero_amount_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice, uint64_t amount_msat);
 
 /**
- * Pays the given zero-value [`Bolt11Invoice`] using the given amount, retrying if needed based on
- * [`Retry`].
+ * Builds the necessary parameters to pay or pre-flight probe the given [`Bolt11Invoice`] using
+ * [`ChannelManager::send_payment`] or [`ChannelManager::send_preflight_probes`].
  *
- * [`Bolt11Invoice::payment_hash`] is used as the [`PaymentId`], which ensures idempotency as long
- * as the payment is still pending. If the payment succeeds, you must ensure that a second payment
- * with the same [`PaymentHash`] is never sent.
+ * Prior to paying, you must ensure that the [`Bolt11Invoice::payment_hash`] is unique and the
+ * same [`PaymentHash`] has never been paid before.
  *
- * If you wish to use a different payment idempotency token, see
- * [`pay_zero_value_invoice_with_id`].
- */
-struct LDKCResult_PaymentIdPaymentErrorZ pay_zero_value_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice, uint64_t amount_msats, struct LDKRetry retry_strategy, const struct LDKChannelManager *NONNULL_PTR channelmanager);
-
-/**
- * Pays the given zero-value [`Bolt11Invoice`] using the given amount and custom idempotency key,
- * retrying if needed based on [`Retry`].
+ * Will always succeed unless the invoice has no amount specified, in which case
+ * [`payment_parameters_from_zero_amount_invoice`] should be used.
  *
- * Note that idempotency is only guaranteed as long as the payment is still pending. Once the
- * payment completes or fails, no idempotency guarantees are made.
- *
- * You should ensure that the [`Bolt11Invoice::payment_hash`] is unique and the same
- * [`PaymentHash`] has never been paid before.
- *
- * See [`pay_zero_value_invoice`] for a variant which uses the [`PaymentHash`] for the
- * idempotency token.
- */
-struct LDKCResult_NonePaymentErrorZ pay_zero_value_invoice_with_id(const struct LDKBolt11Invoice *NONNULL_PTR invoice, uint64_t amount_msats, struct LDKThirtyTwoBytes payment_id, struct LDKRetry retry_strategy, const struct LDKChannelManager *NONNULL_PTR channelmanager);
-
-/**
- * Frees any resources used by the PaymentError
- */
-void PaymentError_free(struct LDKPaymentError this_ptr);
-
-/**
- * Creates a copy of the PaymentError
+ * [`ChannelManager::send_payment`]: lightning::ln::channelmanager::ChannelManager::send_payment
+ * [`ChannelManager::send_preflight_probes`]: lightning::ln::channelmanager::ChannelManager::send_preflight_probes
  */
-struct LDKPaymentError PaymentError_clone(const struct LDKPaymentError *NONNULL_PTR orig);
-
-/**
- * Utility method to constructs a new Invoice-variant PaymentError
- */
-struct LDKPaymentError PaymentError_invoice(struct LDKStr a);
-
-/**
- * Utility method to constructs a new Sending-variant PaymentError
- */
-struct LDKPaymentError PaymentError_sending(enum LDKRetryableSendFailure a);
-
-/**
- * Checks if two PaymentErrors contain equal inner contents.
- * This ignores pointers and is_owned flags and looks at the values in fields.
- */
-bool PaymentError_eq(const struct LDKPaymentError *NONNULL_PTR a, const struct LDKPaymentError *NONNULL_PTR b);
+struct LDKCResult_C3Tuple_ThirtyTwoBytesRecipientOnionFieldsRouteParametersZNoneZ payment_parameters_from_invoice(const struct LDKBolt11Invoice *NONNULL_PTR invoice);
 
 /**
  * Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
@@ -43049,7 +56702,7 @@ bool PaymentError_eq(const struct LDKPaymentError *NONNULL_PTR a, const struct L
  * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
  * available and the current time is supplied by the caller.
  */
-struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(struct LDKCOption_u64Z amt_msat, struct LDKCOption_PaymentHashZ payment_hash, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u16Z min_final_cltv_expiry_delta, uint64_t duration_since_epoch);
+struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(struct LDKCOption_u64Z amt_msat, struct LDKCOption_ThirtyTwoBytesZ payment_hash, struct LDKStr description, uint32_t invoice_expiry_delta_secs, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u16Z min_final_cltv_expiry_delta, uint64_t duration_since_epoch);
 
 /**
  * Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
@@ -43091,7 +56744,7 @@ struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice(struc
  * This can be used in a `no_std` environment, where [`std::time::SystemTime`] is not
  * available and the current time is supplied by the caller.
  */
-struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(struct LDKCOption_u64Z amt_msat, struct LDKCOption_PaymentHashZ payment_hash, uint32_t invoice_expiry_delta_secs, struct LDKSha256 description_hash, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u16Z min_final_cltv_expiry_delta, uint64_t duration_since_epoch);
+struct LDKCResult_Bolt11InvoiceSignOrCreationErrorZ create_phantom_invoice_with_description_hash(struct LDKCOption_u64Z amt_msat, struct LDKCOption_ThirtyTwoBytesZ payment_hash, uint32_t invoice_expiry_delta_secs, struct LDKSha256 description_hash, struct LDKCVec_PhantomRouteHintsZ phantom_route_hints, struct LDKEntropySource entropy_source, struct LDKNodeSigner node_signer, struct LDKLogger logger, enum LDKCurrency network, struct LDKCOption_u16Z min_final_cltv_expiry_delta, uint64_t duration_since_epoch);
 
 /**
  * Utility to construct an invoice. Generally, unless you want to do something like a custom
@@ -43199,6 +56852,26 @@ struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
  */
 struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
 
+/**
+ * Frees any resources used by the GraphSyncError
+ */
+void GraphSyncError_free(struct LDKGraphSyncError this_ptr);
+
+/**
+ * Creates a copy of the GraphSyncError
+ */
+struct LDKGraphSyncError GraphSyncError_clone(const struct LDKGraphSyncError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new DecodeError-variant GraphSyncError
+ */
+struct LDKGraphSyncError GraphSyncError_decode_error(struct LDKDecodeError a);
+
+/**
+ * Utility method to constructs a new LightningError-variant GraphSyncError
+ */
+struct LDKGraphSyncError GraphSyncError_lightning_error(struct LDKLightningError a);
+
 /**
  * Frees any resources used by the RapidGossipSync, if is_owned is set and inner is non-NULL.
  */
@@ -43242,26 +56915,6 @@ MUST_USE_RES struct LDKCResult_u32GraphSyncErrorZ RapidGossipSync_update_network
  */
 MUST_USE_RES bool RapidGossipSync_is_initial_sync_complete(const struct LDKRapidGossipSync *NONNULL_PTR this_arg);
 
-/**
- * Frees any resources used by the GraphSyncError
- */
-void GraphSyncError_free(struct LDKGraphSyncError this_ptr);
-
-/**
- * Creates a copy of the GraphSyncError
- */
-struct LDKGraphSyncError GraphSyncError_clone(const struct LDKGraphSyncError *NONNULL_PTR orig);
-
-/**
- * Utility method to constructs a new DecodeError-variant GraphSyncError
- */
-struct LDKGraphSyncError GraphSyncError_decode_error(struct LDKDecodeError a);
-
-/**
- * Utility method to constructs a new LightningError-variant GraphSyncError
- */
-struct LDKGraphSyncError GraphSyncError_lightning_error(struct LDKLightningError a);
-
 #endif /* LDK_C_BINDINGS_H */
 
 #include "ldk_ver.h"