Update auto-generated bindings
[ldk-c-bindings] / lightning-c-bindings / include / lightning.h
index 113624298d2b7d464f57213da9827a7c8cc3d21f..05f07eb7f62c15edb65a2a8e5c59f813f2a2318e 100644 (file)
@@ -580,6 +580,192 @@ typedef struct LDKTxOut {
    uint64_t value;
 } LDKTxOut;
 
+/**
+ * Represents a valid secp256k1 public key serialized in "compressed form" as a 33 byte array.
+ */
+typedef struct LDKPublicKey {
+   /**
+    * The bytes of the public key
+    */
+   uint8_t compressed_form[33];
+} LDKPublicKey;
+
+/**
+ * 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;
+
+
+
+/**
+ * Onion messages can be sent and received to blinded routes, which serve to hide the identity of
+ * the recipient.
+ */
+typedef struct MUST_USE_STRUCT LDKBlindedRoute {
+   /**
+    * 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.
+    */
+   LDKnativeBlindedRoute *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;
+} LDKBlindedRoute;
+
+/**
+ * The contents of CResult_BlindedRouteNoneZ
+ */
+typedef union LDKCResult_BlindedRouteNoneZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKBlindedRoute *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_BlindedRouteNoneZPtr;
+
+/**
+ * A CResult_BlindedRouteNoneZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::blinded_route::BlindedRoute on success and a () on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_BlindedRouteNoneZ {
+   /**
+    * The contents of this CResult_BlindedRouteNoneZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_BlindedRouteNoneZPtr contents;
+   /**
+    * Whether this CResult_BlindedRouteNoneZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_BlindedRouteNoneZ;
+
+
+
+/**
+ * An error in decoding a message or struct.
+ */
+typedef struct MUST_USE_STRUCT LDKDecodeError {
+   /**
+    * 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.
+    */
+   LDKnativeDecodeError *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;
+} LDKDecodeError;
+
+/**
+ * The contents of CResult_BlindedRouteDecodeErrorZ
+ */
+typedef union LDKCResult_BlindedRouteDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKBlindedRoute *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_BlindedRouteDecodeErrorZPtr;
+
+/**
+ * A CResult_BlindedRouteDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::blinded_route::BlindedRoute 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_BlindedRouteDecodeErrorZ {
+   /**
+    * The contents of this CResult_BlindedRouteDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_BlindedRouteDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_BlindedRouteDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_BlindedRouteDecodeErrorZ;
+
+
+
+/**
+ * Used to construct the blinded hops portion of a blinded route. 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 {
+   /**
+    * 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.
+    */
+   LDKnativeBlindedHop *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;
+} LDKBlindedHop;
+
+/**
+ * The contents of CResult_BlindedHopDecodeErrorZ
+ */
+typedef union LDKCResult_BlindedHopDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKBlindedHop *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_BlindedHopDecodeErrorZPtr;
+
+/**
+ * A CResult_BlindedHopDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::onion_message::blinded_route::BlindedHop 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_BlindedHopDecodeErrorZ {
+   /**
+    * The contents of this CResult_BlindedHopDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_BlindedHopDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_BlindedHopDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_BlindedHopDecodeErrorZ;
+
 /**
  * The contents of CResult_NoneNoneZ
  */
@@ -635,26 +821,6 @@ typedef struct MUST_USE_STRUCT LDKCounterpartyCommitmentSecrets {
    bool is_owned;
 } LDKCounterpartyCommitmentSecrets;
 
-
-
-/**
- * An error in decoding a message or struct.
- */
-typedef struct MUST_USE_STRUCT LDKDecodeError {
-   /**
-    * 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.
-    */
-   LDKnativeDecodeError *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;
-} LDKDecodeError;
-
 /**
  * The contents of CResult_CounterpartyCommitmentSecretsDecodeErrorZ
  */
@@ -731,16 +897,6 @@ typedef struct LDKCResult_SecretKeyErrorZ {
    bool result_ok;
 } LDKCResult_SecretKeyErrorZ;
 
-/**
- * Represents a valid secp256k1 public key serialized in "compressed form" as a 33 byte array.
- */
-typedef struct LDKPublicKey {
-   /**
-    * The bytes of the public key
-    */
-   uint8_t compressed_form[33];
-} LDKPublicKey;
-
 /**
  * The contents of CResult_PublicKeyErrorZ
  */
@@ -1534,30 +1690,236 @@ typedef union LDKCResult_ShutdownScriptInvalidShutdownScriptZPtr {
     * A pointer to the contents in the success state.
     * Reading from this pointer when `result_ok` is not set is undefined.
     */
-   struct LDKShutdownScript *result;
+   struct LDKShutdownScript *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   struct LDKInvalidShutdownScript *err;
+} LDKCResult_ShutdownScriptInvalidShutdownScriptZPtr;
+
+/**
+ * A CResult_ShutdownScriptInvalidShutdownScriptZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::script::ShutdownScript on success and a crate::lightning::ln::script::InvalidShutdownScript on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ {
+   /**
+    * The contents of this CResult_ShutdownScriptInvalidShutdownScriptZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_ShutdownScriptInvalidShutdownScriptZPtr contents;
+   /**
+    * Whether this CResult_ShutdownScriptInvalidShutdownScriptZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_ShutdownScriptInvalidShutdownScriptZ;
+
+
+
+/**
+ * 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;
+
+
+
+/**
+ * Proposed use of a channel passed as a parameter to [`Score::channel_penalty_msat`].
+ */
+typedef struct MUST_USE_STRUCT LDKChannelUsage {
+   /**
+    * 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.
+    */
+   LDKnativeChannelUsage *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;
+} LDKChannelUsage;
+
+
+
+/**
+ * A hop in a route
+ */
+typedef struct MUST_USE_STRUCT LDKRouteHop {
+   /**
+    * 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.
+    */
+   LDKnativeRouteHop *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;
+} LDKRouteHop;
+
+/**
+ * A dynamically-allocated array of crate::lightning::routing::router::RouteHops of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_RouteHopZ {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   struct LDKRouteHop *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_RouteHopZ;
+
+/**
+ * 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.
+ */
+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;
+   /**
+    * 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);
+   /**
+    * Handles updating channel penalties after failing to route through a channel.
+    */
+   void (*payment_path_failed)(void *this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id);
+   /**
+    * Handles updating channel penalties after successfully routing along a path.
+    */
+   void (*payment_path_successful)(void *this_arg, struct LDKCVec_RouteHopZ path);
+   /**
+    * Handles updating channel penalties after a probe over the given path failed.
+    */
+   void (*probe_failed)(void *this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id);
+   /**
+    * Handles updating channel penalties after a probe over the given path succeeded.
+    */
+   void (*probe_successful)(void *this_arg, struct LDKCVec_RouteHopZ path);
+   /**
+    * 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;
+
+/**
+ * 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`]
+ * 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.
+ *
+ * [`find_route`]: crate::routing::router::find_route
+ */
+typedef struct LDKLockableScore {
+   /**
+    * 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 locked scorer.
+    */
+   struct LDKScore (*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.
+    */
+   void (*free)(void *this_arg);
+} LDKLockableScore;
+
+/**
+ * Refers to a scorer that is accessible under lock and also writeable to disk
+ *
+ * We need this trait to be able to pass in a scorer to `lightning-background-processor` that will enable us to
+ * use the Persister to persist it.
+ */
+typedef struct LDKWriteableScore {
+   /**
+    * 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 LockableScore for this object.
+    */
+   struct LDKLockableScore LockableScore;
+   /**
+    * Serialize the object into a byte array
+    */
+   struct LDKCVec_u8Z (*write)(const void *this_arg);
    /**
-    * A pointer to the contents in the error state.
-    * Reading from this pointer when `result_ok` is set is undefined.
+    * 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.
     */
-   struct LDKInvalidShutdownScript *err;
-} LDKCResult_ShutdownScriptInvalidShutdownScriptZPtr;
+   void (*free)(void *this_arg);
+} LDKWriteableScore;
 
 /**
- * A CResult_ShutdownScriptInvalidShutdownScriptZ represents the result of a fallible operation,
- * containing a crate::lightning::ln::script::ShutdownScript on success and a crate::lightning::ln::script::InvalidShutdownScript on failure.
- * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ * An enum which can either contain a crate::lightning::routing::scoring::WriteableScore or not
  */
-typedef struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ {
+typedef enum LDKCOption_WriteableScoreZ_Tag {
    /**
-    * The contents of this CResult_ShutdownScriptInvalidShutdownScriptZ, accessible via either
-    * `err` or `result` depending on the state of `result_ok`.
+    * When we're in this state, this COption_WriteableScoreZ contains a crate::lightning::routing::scoring::WriteableScore
     */
-   union LDKCResult_ShutdownScriptInvalidShutdownScriptZPtr contents;
+   LDKCOption_WriteableScoreZ_Some,
    /**
-    * Whether this CResult_ShutdownScriptInvalidShutdownScriptZ represents a success state.
+    * When we're in this state, this COption_WriteableScoreZ contains nothing
     */
-   bool result_ok;
-} LDKCResult_ShutdownScriptInvalidShutdownScriptZ;
+   LDKCOption_WriteableScoreZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_WriteableScoreZ_Sentinel,
+} LDKCOption_WriteableScoreZ_Tag;
+
+typedef struct LDKCOption_WriteableScoreZ {
+   LDKCOption_WriteableScoreZ_Tag tag;
+   union {
+      struct {
+         struct LDKWriteableScore some;
+      };
+   };
+} LDKCOption_WriteableScoreZ;
 
 /**
  * The contents of CResult_NoneErrorZ
@@ -1591,26 +1953,6 @@ typedef struct LDKCResult_NoneErrorZ {
    bool result_ok;
 } LDKCResult_NoneErrorZ;
 
-
-
-/**
- * A hop in a route
- */
-typedef struct MUST_USE_STRUCT LDKRouteHop {
-   /**
-    * 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.
-    */
-   LDKnativeRouteHop *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;
-} LDKRouteHop;
-
 /**
  * The contents of CResult_RouteHopDecodeErrorZ
  */
@@ -1644,22 +1986,6 @@ typedef struct LDKCResult_RouteHopDecodeErrorZ {
    bool result_ok;
 } LDKCResult_RouteHopDecodeErrorZ;
 
-/**
- * A dynamically-allocated array of crate::lightning::routing::router::RouteHops of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_RouteHopZ {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   struct LDKRouteHop *data;
-   /**
-    * The number of elements pointed to by `data`.
-    */
-   uintptr_t datalen;
-} LDKCVec_RouteHopZ;
-
 /**
  * A dynamically-allocated array of crate::c_types::derived::CVec_RouteHopZs of arbitrary size.
  * This corresponds to std::vector in C++
@@ -1851,6 +2177,22 @@ typedef struct LDKCOption_u64Z {
    };
 } LDKCOption_u64Z;
 
+/**
+ * A dynamically-allocated array of u64s of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_u64Z {
+   /**
+    * The elements in the array.
+    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+    */
+   uint64_t *data;
+   /**
+    * The number of elements pointed to by `data`.
+    */
+   uintptr_t datalen;
+} LDKCVec_u64Z;
+
 
 
 /**
@@ -2095,22 +2437,6 @@ typedef struct LDKCResult_RouteLightningErrorZ {
    bool result_ok;
 } LDKCResult_RouteLightningErrorZ;
 
-/**
- * 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;
-
 /**
  * Arbitrary 32 bytes, which could represent one of a few different things. You probably want to
  * look up the corresponding function in rust-lightning's docs.
@@ -2353,6 +2679,133 @@ typedef struct LDKCResult_COption_ClosureReasonZDecodeErrorZ {
    bool result_ok;
 } LDKCResult_COption_ClosureReasonZDecodeErrorZ;
 
+/**
+ * Intended destination of a failed HTLC as indicated in [`Event::HTLCHandlingFailed`].
+ */
+typedef enum LDKHTLCDestination_Tag {
+   /**
+    * We tried forwarding to a channel but failed to do so. An example of such an instance is when
+    * there is insufficient capacity in our outbound channel.
+    */
+   LDKHTLCDestination_NextHopChannel,
+   /**
+    * Scenario where we are unsure of the next node to forward the HTLC to.
+    */
+   LDKHTLCDestination_UnknownNextHop,
+   /**
+    * Failure scenario where an HTLC may have been forwarded to be intended for us,
+    * but is invalid for some reason, so we reject it.
+    *
+    * Some of the reasons may include:
+    * * HTLC Timeouts
+    * * Expected MPP amount to claim does not equal HTLC total
+    * * Claimable amount does not match expected amount
+    */
+   LDKHTLCDestination_FailedPayment,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKHTLCDestination_Sentinel,
+} LDKHTLCDestination_Tag;
+
+typedef struct LDKHTLCDestination_LDKNextHopChannel_Body {
+   /**
+    * The `node_id` of the next node. For backwards compatibility, this field is
+    * marked as optional, versions prior to 0.0.110 may not always be able to provide
+    * counterparty node information.
+    *
+    * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None
+    */
+   struct LDKPublicKey node_id;
+   /**
+    * The outgoing `channel_id` between us and the next node.
+    */
+   struct LDKThirtyTwoBytes channel_id;
+} LDKHTLCDestination_LDKNextHopChannel_Body;
+
+typedef struct LDKHTLCDestination_LDKUnknownNextHop_Body {
+   /**
+    * Short channel id we are requesting to forward an HTLC to.
+    */
+   uint64_t requested_forward_scid;
+} LDKHTLCDestination_LDKUnknownNextHop_Body;
+
+typedef struct LDKHTLCDestination_LDKFailedPayment_Body {
+   /**
+    * The payment hash of the payment we attempted to process.
+    */
+   struct LDKThirtyTwoBytes payment_hash;
+} LDKHTLCDestination_LDKFailedPayment_Body;
+
+typedef struct MUST_USE_STRUCT LDKHTLCDestination {
+   LDKHTLCDestination_Tag tag;
+   union {
+      LDKHTLCDestination_LDKNextHopChannel_Body next_hop_channel;
+      LDKHTLCDestination_LDKUnknownNextHop_Body unknown_next_hop;
+      LDKHTLCDestination_LDKFailedPayment_Body failed_payment;
+   };
+} LDKHTLCDestination;
+
+/**
+ * An enum which can either contain a crate::lightning::util::events::HTLCDestination or not
+ */
+typedef enum LDKCOption_HTLCDestinationZ_Tag {
+   /**
+    * When we're in this state, this COption_HTLCDestinationZ contains a crate::lightning::util::events::HTLCDestination
+    */
+   LDKCOption_HTLCDestinationZ_Some,
+   /**
+    * When we're in this state, this COption_HTLCDestinationZ contains nothing
+    */
+   LDKCOption_HTLCDestinationZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_HTLCDestinationZ_Sentinel,
+} LDKCOption_HTLCDestinationZ_Tag;
+
+typedef struct LDKCOption_HTLCDestinationZ {
+   LDKCOption_HTLCDestinationZ_Tag tag;
+   union {
+      struct {
+         struct LDKHTLCDestination some;
+      };
+   };
+} LDKCOption_HTLCDestinationZ;
+
+/**
+ * The contents of CResult_COption_HTLCDestinationZDecodeErrorZ
+ */
+typedef union LDKCResult_COption_HTLCDestinationZDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKCOption_HTLCDestinationZ *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_HTLCDestinationZDecodeErrorZPtr;
+
+/**
+ * A CResult_COption_HTLCDestinationZDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::c_types::derived::COption_HTLCDestinationZ 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_HTLCDestinationZDecodeErrorZ {
+   /**
+    * The contents of this CResult_COption_HTLCDestinationZDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_COption_HTLCDestinationZDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_COption_HTLCDestinationZDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_COption_HTLCDestinationZDecodeErrorZ;
+
 
 
 /**
@@ -2756,6 +3209,14 @@ typedef enum LDKEvent_Tag {
     * [`all_paths_failed`]: Self::PaymentPathFailed::all_paths_failed
     */
    LDKEvent_PaymentPathFailed,
+   /**
+    * Indicates that a probe payment we sent returned successful, i.e., only failed at the destination.
+    */
+   LDKEvent_ProbeSuccessful,
+   /**
+    * Indicates that a probe payment we sent failed at an intermediary node on the path.
+    */
+   LDKEvent_ProbeFailed,
    /**
     * Used to indicate that [`ChannelManager::process_pending_htlc_forwards`] should be called at
     * a time in the future.
@@ -2800,6 +3261,21 @@ typedef enum LDKEvent_Tag {
     * [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
     */
    LDKEvent_OpenChannelRequest,
+   /**
+    * Indicates that the HTLC was accepted, but could not be processed when or after attempting to
+    * forward it.
+    *
+    * Some scenarios where this event may be sent include:
+    * * Insufficient capacity in the outbound channel
+    * * While waiting to forward the HTLC, the channel it is meant to be forwarded through closes
+    * * When an unknown SCID is requested for forwarding a payment.
+    * * Claiming an amount for an MPP payment that exceeds the HTLC total
+    * * The HTLC has timed out
+    *
+    * This event, however, does not get generated if an HTLC fails to meet the forwarding
+    * requirements (i.e. insufficient fees paid, or a CLTV that is too soon).
+    */
+   LDKEvent_HTLCHandlingFailed,
    /**
     * Must be last for serialization purposes
     */
@@ -2975,7 +3451,7 @@ typedef struct LDKEvent_LDKPaymentPathFailed_Body {
     * the payment has failed, not just the route in question. If this is not set, you may
     * retry the payment via a different route.
     */
-   bool rejected_by_dest;
+   bool payment_failed_permanently;
    /**
     * Any failure information conveyed via the Onion return packet by a node along the failed
     * payment route.
@@ -3034,6 +3510,52 @@ typedef struct LDKEvent_LDKPaymentPathFailed_Body {
    struct LDKRouteParameters retry;
 } LDKEvent_LDKPaymentPathFailed_Body;
 
+typedef struct LDKEvent_LDKProbeSuccessful_Body {
+   /**
+    * The id returned by [`ChannelManager::send_probe`].
+    *
+    * [`ChannelManager::send_probe`]: crate::ln::channelmanager::ChannelManager::send_probe
+    */
+   struct LDKThirtyTwoBytes payment_id;
+   /**
+    * The hash generated by [`ChannelManager::send_probe`].
+    *
+    * [`ChannelManager::send_probe`]: crate::ln::channelmanager::ChannelManager::send_probe
+    */
+   struct LDKThirtyTwoBytes payment_hash;
+   /**
+    * The payment path that was successful.
+    */
+   struct LDKCVec_RouteHopZ path;
+} LDKEvent_LDKProbeSuccessful_Body;
+
+typedef struct LDKEvent_LDKProbeFailed_Body {
+   /**
+    * The id returned by [`ChannelManager::send_probe`].
+    *
+    * [`ChannelManager::send_probe`]: crate::ln::channelmanager::ChannelManager::send_probe
+    */
+   struct LDKThirtyTwoBytes payment_id;
+   /**
+    * The hash generated by [`ChannelManager::send_probe`].
+    *
+    * [`ChannelManager::send_probe`]: crate::ln::channelmanager::ChannelManager::send_probe
+    */
+   struct LDKThirtyTwoBytes payment_hash;
+   /**
+    * The payment path that failed.
+    */
+   struct LDKCVec_RouteHopZ path;
+   /**
+    * The channel responsible for the failed probe.
+    *
+    * Note that for route hints or for the first hop in a path this may be an SCID alias and
+    * may not refer to a channel in the public network graph. These aliases may also collide
+    * with channels in the public network graph.
+    */
+   struct LDKCOption_u64Z short_channel_id;
+} LDKEvent_LDKProbeFailed_Body;
+
 typedef struct LDKEvent_LDKPendingHTLCsForwardable_Body {
    /**
     * The minimum amount of time that should be waited prior to calling
@@ -3176,6 +3698,17 @@ typedef struct LDKEvent_LDKOpenChannelRequest_Body {
    struct LDKChannelTypeFeatures channel_type;
 } LDKEvent_LDKOpenChannelRequest_Body;
 
+typedef struct LDKEvent_LDKHTLCHandlingFailed_Body {
+   /**
+    * The channel over which the HTLC was received.
+    */
+   struct LDKThirtyTwoBytes prev_channel_id;
+   /**
+    * Destination of the HTLC that failed to be processed.
+    */
+   struct LDKHTLCDestination failed_next_destination;
+} LDKEvent_LDKHTLCHandlingFailed_Body;
+
 typedef struct MUST_USE_STRUCT LDKEvent {
    LDKEvent_Tag tag;
    union {
@@ -3186,12 +3719,15 @@ typedef struct MUST_USE_STRUCT LDKEvent {
       LDKEvent_LDKPaymentFailed_Body payment_failed;
       LDKEvent_LDKPaymentPathSuccessful_Body payment_path_successful;
       LDKEvent_LDKPaymentPathFailed_Body payment_path_failed;
+      LDKEvent_LDKProbeSuccessful_Body probe_successful;
+      LDKEvent_LDKProbeFailed_Body probe_failed;
       LDKEvent_LDKPendingHTLCsForwardable_Body pending_htl_cs_forwardable;
       LDKEvent_LDKSpendableOutputs_Body spendable_outputs;
       LDKEvent_LDKPaymentForwarded_Body payment_forwarded;
       LDKEvent_LDKChannelClosed_Body channel_closed;
       LDKEvent_LDKDiscardFunding_Body discard_funding;
       LDKEvent_LDKOpenChannelRequest_Body open_channel_request;
+      LDKEvent_LDKHTLCHandlingFailed_Body htlc_handling_failed;
    };
 } LDKEvent;
 
@@ -3498,26 +4034,6 @@ typedef struct MUST_USE_STRUCT LDKChannelAnnouncement {
 
 
 
-/**
- * A node_announcement message to be sent or received from a peer
- */
-typedef struct MUST_USE_STRUCT LDKNodeAnnouncement {
-   /**
-    * 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.
-    */
-   LDKnativeNodeAnnouncement *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;
-} LDKNodeAnnouncement;
-
-
-
 /**
  * An error message to be sent or received from a peer
  */
@@ -3785,21 +4301,24 @@ typedef enum LDKMessageSendEvent_Tag {
     * Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id.
     */
    LDKMessageSendEvent_SendChannelReestablish,
+   /**
+    * Used to send a channel_announcement and channel_update to a specific peer, likely on
+    * initial connection to ensure our peers know about our channels.
+    */
+   LDKMessageSendEvent_SendChannelAnnouncement,
    /**
     * Used to indicate that a channel_announcement and channel_update should be broadcast to all
     * peers (except the peer with node_id either msg.contents.node_id_1 or msg.contents.node_id_2).
     *
-    * Note that after doing so, you very likely (unless you did so very recently) want to call
-    * ChannelManager::broadcast_node_announcement to trigger a BroadcastNodeAnnouncement event.
-    * This ensures that any nodes which see our channel_announcement also have a relevant
+    * Note that after doing so, you very likely (unless you did so very recently) want to
+    * broadcast a node_announcement (e.g. via [`PeerManager::broadcast_node_announcement`]). This
+    * ensures that any nodes which see our channel_announcement also have a relevant
     * node_announcement, including relevant feature flags which may be important for routing
     * through or to us.
+    *
+    * [`PeerManager::broadcast_node_announcement`]: crate::ln::peer_handler::PeerManager::broadcast_node_announcement
     */
    LDKMessageSendEvent_BroadcastChannelAnnouncement,
-   /**
-    * Used to indicate that a node_announcement should be broadcast to all peers.
-    */
-   LDKMessageSendEvent_BroadcastNodeAnnouncement,
    /**
     * Used to indicate that a channel_update should be broadcast to all peers.
     */
@@ -3960,7 +4479,11 @@ typedef struct LDKMessageSendEvent_LDKSendChannelReestablish_Body {
    struct LDKChannelReestablish msg;
 } LDKMessageSendEvent_LDKSendChannelReestablish_Body;
 
-typedef struct LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body {
+typedef struct LDKMessageSendEvent_LDKSendChannelAnnouncement_Body {
+   /**
+    * The node_id of the node which should receive this message
+    */
+   struct LDKPublicKey node_id;
    /**
     * The channel_announcement which should be sent.
     */
@@ -3969,14 +4492,18 @@ typedef struct LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body {
     * The followup channel_update which should be sent.
     */
    struct LDKChannelUpdate update_msg;
-} LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body;
+} LDKMessageSendEvent_LDKSendChannelAnnouncement_Body;
 
-typedef struct LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body {
+typedef struct LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body {
+   /**
+    * The channel_announcement which should be sent.
+    */
+   struct LDKChannelAnnouncement msg;
    /**
-    * The node_announcement which should be sent.
+    * The followup channel_update which should be sent.
     */
-   struct LDKNodeAnnouncement msg;
-} LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body;
+   struct LDKChannelUpdate update_msg;
+} LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body;
 
 typedef struct LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body {
    /**
@@ -4065,8 +4592,8 @@ typedef struct MUST_USE_STRUCT LDKMessageSendEvent {
       LDKMessageSendEvent_LDKSendClosingSigned_Body send_closing_signed;
       LDKMessageSendEvent_LDKSendShutdown_Body send_shutdown;
       LDKMessageSendEvent_LDKSendChannelReestablish_Body send_channel_reestablish;
+      LDKMessageSendEvent_LDKSendChannelAnnouncement_Body send_channel_announcement;
       LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body broadcast_channel_announcement;
-      LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body broadcast_node_announcement;
       LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body broadcast_channel_update;
       LDKMessageSendEvent_LDKSendChannelUpdate_Body send_channel_update;
       LDKMessageSendEvent_LDKHandleError_Body handle_error;
@@ -4306,9 +4833,9 @@ typedef struct LDKCVec_MonitorEventZ {
 } LDKCVec_MonitorEventZ;
 
 /**
- * A tuple of 2 elements. See the individual fields for the types contained.
+ * A tuple of 3 elements. See the individual fields for the types contained.
  */
-typedef struct LDKC2Tuple_OutPointCVec_MonitorEventZZ {
+typedef struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ {
    /**
     * The element at position 0
     */
@@ -4316,51 +4843,28 @@ typedef struct LDKC2Tuple_OutPointCVec_MonitorEventZZ {
    /**
     * The element at position 1
     */
-   struct LDKCVec_MonitorEventZ b;
-} LDKC2Tuple_OutPointCVec_MonitorEventZZ;
+   struct LDKCVec_MonitorEventZ b;
+   /**
+    * The element at position 2
+    */
+   struct LDKPublicKey c;
+} LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C2Tuple_OutPointCVec_MonitorEventZZs of arbitrary size.
+ * A dynamically-allocated array of crate::c_types::derived::C3Tuple_OutPointCVec_MonitorEventZPublicKeyZs of arbitrary size.
  * This corresponds to std::vector in C++
  */
-typedef struct LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ {
+typedef struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ {
    /**
     * The elements in the array.
     * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
     */
-   struct LDKC2Tuple_OutPointCVec_MonitorEventZZ *data;
+   struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *data;
    /**
     * The number of elements pointed to by `data`.
     */
    uintptr_t datalen;
-} LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ;
-
-/**
- * An enum which can either contain a crate::c_types::derived::C2Tuple_usizeTransactionZ or not
- */
-typedef enum LDKCOption_C2Tuple_usizeTransactionZZ_Tag {
-   /**
-    * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains a crate::c_types::derived::C2Tuple_usizeTransactionZ
-    */
-   LDKCOption_C2Tuple_usizeTransactionZZ_Some,
-   /**
-    * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains nothing
-    */
-   LDKCOption_C2Tuple_usizeTransactionZZ_None,
-   /**
-    * Must be last for serialization purposes
-    */
-   LDKCOption_C2Tuple_usizeTransactionZZ_Sentinel,
-} LDKCOption_C2Tuple_usizeTransactionZZ_Tag;
-
-typedef struct LDKCOption_C2Tuple_usizeTransactionZZ {
-   LDKCOption_C2Tuple_usizeTransactionZZ_Tag tag;
-   union {
-      struct {
-         struct LDKC2Tuple_usizeTransactionZ some;
-      };
-   };
-} LDKCOption_C2Tuple_usizeTransactionZZ;
+} LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ;
 
 
 
@@ -4456,26 +4960,6 @@ typedef struct LDKCOption_C2Tuple_u64u64ZZ {
    };
 } LDKCOption_C2Tuple_u64u64ZZ;
 
-
-
-/**
- * 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++
@@ -5042,36 +5526,31 @@ typedef struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
 } LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ;
 
 /**
- * A dynamically-allocated array of crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZs of arbitrary size.
- * This corresponds to std::vector in C++
+ * An enum which can either contain a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ or not
  */
-typedef struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *data;
+typedef enum LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_Tag {
    /**
-    * The number of elements pointed to by `data`.
+    * When we're in this state, this COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ contains a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ
     */
-   uintptr_t datalen;
-} LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ;
-
-/**
- * A dynamically-allocated array of crate::lightning::ln::msgs::NodeAnnouncements of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_NodeAnnouncementZ {
+   LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_Some,
    /**
-    * 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_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ contains nothing
     */
-   struct LDKNodeAnnouncement *data;
+   LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_None,
    /**
-    * The number of elements pointed to by `data`.
+    * Must be last for serialization purposes
     */
-   uintptr_t datalen;
-} LDKCVec_NodeAnnouncementZ;
+   LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_Sentinel,
+} LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_Tag;
+
+typedef struct LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
+   LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_Tag tag;
+   union {
+      struct {
+         struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ some;
+      };
+   };
+} LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ;
 
 /**
  * The contents of CResult_NoneLightningErrorZ
@@ -5295,6 +5774,30 @@ typedef struct LDKTwelveBytes {
    uint8_t data[12];
 } LDKTwelveBytes;
 
+
+
+/**
+ * Represents a hostname for serialization purposes.
+ * Only the character set and length will be validated.
+ * The character set consists of ASCII alphanumeric characters, hyphens, and periods.
+ * Its length is guaranteed to be representable by a single byte.
+ * This serialization is used by BOLT 7 hostnames.
+ */
+typedef struct MUST_USE_STRUCT LDKHostname {
+   /**
+    * 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.
+    */
+   LDKnativeHostname *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;
+} LDKHostname;
+
 /**
  * An address which can be used to connect to a remote peer
  */
@@ -5320,6 +5823,10 @@ typedef enum LDKNetAddress_Tag {
     * wrap as base32 and append \".onion\".
     */
    LDKNetAddress_OnionV3,
+   /**
+    * A hostname/port on which the peer is listening.
+    */
+   LDKNetAddress_Hostname,
    /**
     * Must be last for serialization purposes
     */
@@ -5367,6 +5874,17 @@ typedef struct LDKNetAddress_LDKOnionV3_Body {
    uint16_t port;
 } LDKNetAddress_LDKOnionV3_Body;
 
+typedef struct LDKNetAddress_LDKHostname_Body {
+   /**
+    * The hostname on which the node is listening.
+    */
+   struct LDKHostname hostname;
+   /**
+    * The port on which the node is listening.
+    */
+   uint16_t port;
+} LDKNetAddress_LDKHostname_Body;
+
 typedef struct MUST_USE_STRUCT LDKNetAddress {
    LDKNetAddress_Tag tag;
    union {
@@ -5376,6 +5894,7 @@ typedef struct MUST_USE_STRUCT LDKNetAddress {
          struct LDKTwelveBytes onion_v2;
       };
       LDKNetAddress_LDKOnionV3_Body onion_v3;
+      LDKNetAddress_LDKHostname_Body hostname;
    };
 } LDKNetAddress;
 
@@ -5504,22 +6023,6 @@ typedef struct LDKCResult_NodeAliasDecodeErrorZ {
    bool result_ok;
 } LDKCResult_NodeAliasDecodeErrorZ;
 
-/**
- * A dynamically-allocated array of u64s of arbitrary size.
- * This corresponds to std::vector in C++
- */
-typedef struct LDKCVec_u64Z {
-   /**
-    * The elements in the array.
-    * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
-    */
-   uint64_t *data;
-   /**
-    * The number of elements pointed to by `data`.
-    */
-   uintptr_t datalen;
-} LDKCVec_u64Z;
-
 
 
 /**
@@ -5904,6 +6407,75 @@ typedef struct LDKCResult_SecretKeyNoneZ {
    bool result_ok;
 } LDKCResult_SecretKeyNoneZ;
 
+/**
+ * Represents a scalar value between zero and the secp256k1 curve order, in big endian.
+ */
+typedef struct LDKBigEndianScalar {
+   /**
+    * The bytes of the scalar value.
+    */
+   uint8_t big_endian_bytes[32];
+} LDKBigEndianScalar;
+
+/**
+ * An enum which can either contain a crate::c_types::BigEndianScalar or not
+ */
+typedef enum LDKCOption_ScalarZ_Tag {
+   /**
+    * When we're in this state, this COption_ScalarZ contains a crate::c_types::BigEndianScalar
+    */
+   LDKCOption_ScalarZ_Some,
+   /**
+    * When we're in this state, this COption_ScalarZ contains nothing
+    */
+   LDKCOption_ScalarZ_None,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKCOption_ScalarZ_Sentinel,
+} LDKCOption_ScalarZ_Tag;
+
+typedef struct LDKCOption_ScalarZ {
+   LDKCOption_ScalarZ_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;
+
 
 
 /**
@@ -7365,8 +7937,13 @@ typedef struct LDKCVec_ChannelMonitorZ {
 
 
 /**
- * An update generated by the underlying Channel itself which contains some new information the
- * ChannelMonitor should be made aware of.
+ * An update generated by the underlying channel itself which contains some new information the
+ * [`ChannelMonitor`] should be made aware of.
+ *
+ * Because this represents only a small number of updates to the underlying state, it is generally
+ * much smaller than a full [`ChannelMonitor`]. However, for large single commitment transaction
+ * updates (e.g. ones during which there are hundreds of HTLCs pending on the commitment
+ * transaction), a single update may reach upwards of 1 MiB in serialized size.
  */
 typedef struct MUST_USE_STRUCT LDKChannelMonitorUpdate {
    /**
@@ -7445,7 +8022,7 @@ typedef struct LDKWatch {
     * For details on asynchronous [`ChannelMonitor`] updating and returning
     * [`MonitorEvent::UpdateCompleted`] here, see [`ChannelMonitorUpdateErr::TemporaryFailure`].
     */
-   struct LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ (*release_pending_monitor_events)(const void *this_arg);
+   struct LDKCVec_C3Tuple_OutPointCVec_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.
@@ -7506,6 +8083,14 @@ typedef struct LDKKeysInterface {
     * parameter.
     */
    struct LDKCResult_SecretKeyNoneZ (*get_node_secret)(const void *this_arg, enum LDKRecipient recipient);
+   /**
+    * Gets the ECDH shared secret of our [`node secret`] and `other_key`, multiplying by `tweak` if
+    * one is provided. Note that this tweak can be applied to `other_key` instead of our node
+    * secret, though this is less efficient.
+    *
+    * [`node secret`]: Self::get_node_secret
+    */
+   struct LDKCResult_SharedSecretNoneZ (*ecdh)(const void *this_arg, enum LDKRecipient recipient, struct LDKPublicKey other_key, struct LDKCOption_ScalarZ tweak);
    /**
     * Get a script pubkey which we send funds to when claiming on-chain contestable outputs.
     *
@@ -7589,12 +8174,12 @@ typedef struct LDKFeeEstimator {
    /**
     * Gets estimated satoshis of fee required per 1000 Weight-Units.
     *
-    * Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later
-    * round-downs don't put us below 1 satoshi-per-byte).
+    * LDK will wrap this method and ensure that the value returned is no smaller than 253
+    * (ie 1 satoshi-per-byte rounded up to ensure later round-downs don't put us below 1 satoshi-per-byte).
     *
-    * This method can be implemented with the following unit conversions:
-    *  * max(satoshis-per-byte * 250, 253)
-    *  * max(satoshis-per-kbyte / 4, 253)
+    * The following unit conversions can be used to convert to sats/KW:
+    *  * satoshis-per-byte * 250
+    *  * satoshis-per-kbyte / 4
     */
    uint32_t (*get_est_sat_per_1000_weight)(const void *this_arg, enum LDKConfirmationTarget confirmation_target);
    /**
@@ -7953,6 +8538,62 @@ typedef struct LDKCResult_PaymentIdPaymentErrorZ {
    bool result_ok;
 } LDKCResult_PaymentIdPaymentErrorZ;
 
+
+
+/**
+ * A map with liquidity value (in msat) keyed by a short channel id and the direction the HTLC
+ * is traveling in. The direction boolean is determined by checking if the HTLC source's public
+ * key is less than its destination. See [`InFlightHtlcs::used_liquidity_msat`] for more
+ * details.
+ */
+typedef struct MUST_USE_STRUCT LDKInFlightHtlcs {
+   /**
+    * 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.
+    */
+   LDKnativeInFlightHtlcs *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;
+} LDKInFlightHtlcs;
+
+/**
+ * The contents of CResult_InFlightHtlcsDecodeErrorZ
+ */
+typedef union LDKCResult_InFlightHtlcsDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKInFlightHtlcs *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_InFlightHtlcsDecodeErrorZPtr;
+
+/**
+ * A CResult_InFlightHtlcsDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning_invoice::payment::InFlightHtlcs 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_InFlightHtlcsDecodeErrorZ {
+   /**
+    * The contents of this CResult_InFlightHtlcsDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_InFlightHtlcsDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_InFlightHtlcsDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_InFlightHtlcsDecodeErrorZ;
+
 /**
  * Sub-errors which don't have specific information in them use this type.
  */
@@ -8922,7 +9563,21 @@ typedef enum LDKBalance_Tag {
     * fees) if the counterparty does not know the preimage for the HTLCs. These are somewhat
     * likely to be claimed by our counterparty before we do.
     */
-   LDKBalance_MaybeClaimableHTLCAwaitingTimeout,
+   LDKBalance_MaybeTimeoutClaimableHTLC,
+   /**
+    * HTLCs which we received from our counterparty which are claimable with a preimage which we
+    * do not currently have. This will only be claimable if we receive the preimage from the node
+    * to which we forwarded this HTLC before the timeout.
+    */
+   LDKBalance_MaybePreimageClaimableHTLC,
+   /**
+    * The channel has been closed, and our counterparty broadcasted a revoked commitment
+    * transaction.
+    *
+    * Thus, we're able to claim all outputs in the commitment transaction, one of which has the
+    * following amount.
+    */
+   LDKBalance_CounterpartyRevokedOutputClaimable,
    /**
     * Must be last for serialization purposes
     */
@@ -8963,10 +9618,10 @@ typedef struct LDKBalance_LDKContentiousClaimable_Body {
    uint32_t timeout_height;
 } LDKBalance_LDKContentiousClaimable_Body;
 
-typedef struct LDKBalance_LDKMaybeClaimableHTLCAwaitingTimeout_Body {
+typedef struct LDKBalance_LDKMaybeTimeoutClaimableHTLC_Body {
    /**
-    * The amount available to claim, in satoshis, excluding the on-chain fees which will be
-    * required to do so.
+    * 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;
    /**
@@ -8974,7 +9629,30 @@ typedef struct LDKBalance_LDKMaybeClaimableHTLCAwaitingTimeout_Body {
     * done so.
     */
    uint32_t claimable_height;
-} LDKBalance_LDKMaybeClaimableHTLCAwaitingTimeout_Body;
+} LDKBalance_LDKMaybeTimeoutClaimableHTLC_Body;
+
+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;
+   /**
+    * 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.
+    */
+   uint32_t expiry_height;
+} LDKBalance_LDKMaybePreimageClaimableHTLC_Body;
+
+typedef struct LDKBalance_LDKCounterpartyRevokedOutputClaimable_Body {
+   /**
+    * The amount, in satoshis, of the output which we can claim.
+    *
+    * Note that for outputs from HTLC balances this may be excluding some on-chain fees that
+    * were already spent.
+    */
+   uint64_t claimable_amount_satoshis;
+} LDKBalance_LDKCounterpartyRevokedOutputClaimable_Body;
 
 typedef struct MUST_USE_STRUCT LDKBalance {
    LDKBalance_Tag tag;
@@ -8982,7 +9660,9 @@ typedef struct MUST_USE_STRUCT LDKBalance {
       LDKBalance_LDKClaimableOnChannelClose_Body claimable_on_channel_close;
       LDKBalance_LDKClaimableAwaitingConfirmations_Body claimable_awaiting_confirmations;
       LDKBalance_LDKContentiousClaimable_Body contentious_claimable;
-      LDKBalance_LDKMaybeClaimableHTLCAwaitingTimeout_Body maybe_claimable_htlc_awaiting_timeout;
+      LDKBalance_LDKMaybeTimeoutClaimableHTLC_Body maybe_timeout_claimable_htlc;
+      LDKBalance_LDKMaybePreimageClaimableHTLC_Body maybe_preimage_claimable_htlc;
+      LDKBalance_LDKCounterpartyRevokedOutputClaimable_Body counterparty_revoked_output_claimable;
    };
 } LDKBalance;
 
@@ -9172,45 +9852,120 @@ typedef struct LDKCResult_NonePeerHandleErrorZ {
     * The contents of this CResult_NonePeerHandleErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_NonePeerHandleErrorZPtr contents;
+   union LDKCResult_NonePeerHandleErrorZPtr contents;
+   /**
+    * Whether this CResult_NonePeerHandleErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_NonePeerHandleErrorZ;
+
+/**
+ * The contents of CResult_boolPeerHandleErrorZ
+ */
+typedef union LDKCResult_boolPeerHandleErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   bool *result;
+   /**
+    * A pointer to the contents in the error state.
+    * Reading from this pointer when `result_ok` is set is undefined.
+    */
+   struct LDKPeerHandleError *err;
+} LDKCResult_boolPeerHandleErrorZPtr;
+
+/**
+ * A CResult_boolPeerHandleErrorZ represents the result of a fallible operation,
+ * containing a bool on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_boolPeerHandleErrorZ {
+   /**
+    * The contents of this CResult_boolPeerHandleErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_boolPeerHandleErrorZPtr contents;
+   /**
+    * Whether this CResult_boolPeerHandleErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_boolPeerHandleErrorZ;
+
+/**
+ * Errors that may occur when [sending an onion message].
+ *
+ * [sending an onion message]: OnionMessenger::send_onion_message
+ */
+typedef enum LDKSendError_Tag {
+   /**
+    * Errored computing onion message packet keys.
+    */
+   LDKSendError_Secp256k1,
+   /**
+    * Because implementations such as Eclair will drop onion messages where the message packet
+    * exceeds 32834 bytes, we refuse to send messages where the packet exceeds this size.
+    */
+   LDKSendError_TooBigPacket,
+   /**
+    * The provided [`Destination`] was an invalid [`BlindedRoute`], due to having fewer than two
+    * blinded hops.
+    */
+   LDKSendError_TooFewBlindedHops,
+   /**
+    * Our next-hop peer was offline or does not support onion message forwarding.
+    */
+   LDKSendError_InvalidFirstHop,
+   /**
+    * Our next-hop peer's buffer was full or our total outbound buffer was full.
+    */
+   LDKSendError_BufferFull,
    /**
-    * Whether this CResult_NonePeerHandleErrorZ represents a success state.
+    * Must be last for serialization purposes
     */
-   bool result_ok;
-} LDKCResult_NonePeerHandleErrorZ;
+   LDKSendError_Sentinel,
+} LDKSendError_Tag;
+
+typedef struct MUST_USE_STRUCT LDKSendError {
+   LDKSendError_Tag tag;
+   union {
+      struct {
+         enum LDKSecp256k1Error secp256k1;
+      };
+   };
+} LDKSendError;
 
 /**
- * The contents of CResult_boolPeerHandleErrorZ
+ * The contents of CResult_NoneSendErrorZ
  */
-typedef union LDKCResult_boolPeerHandleErrorZPtr {
+typedef union LDKCResult_NoneSendErrorZPtr {
    /**
-    * 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
     */
-   bool *result;
+   void *result;
    /**
     * A pointer to the contents in the error state.
     * Reading from this pointer when `result_ok` is set is undefined.
     */
-   struct LDKPeerHandleError *err;
-} LDKCResult_boolPeerHandleErrorZPtr;
+   struct LDKSendError *err;
+} LDKCResult_NoneSendErrorZPtr;
 
 /**
- * A CResult_boolPeerHandleErrorZ represents the result of a fallible operation,
- * containing a bool on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure.
+ * A CResult_NoneSendErrorZ represents the result of a fallible operation,
+ * containing a () 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_boolPeerHandleErrorZ {
+typedef struct LDKCResult_NoneSendErrorZ {
    /**
-    * The contents of this CResult_boolPeerHandleErrorZ, accessible via either
+    * The contents of this CResult_NoneSendErrorZ, accessible via either
     * `err` or `result` depending on the state of `result_ok`.
     */
-   union LDKCResult_boolPeerHandleErrorZPtr contents;
+   union LDKCResult_NoneSendErrorZPtr contents;
    /**
-    * Whether this CResult_boolPeerHandleErrorZ represents a success state.
+    * Whether this CResult_NoneSendErrorZ represents a success state.
     */
    bool result_ok;
-} LDKCResult_boolPeerHandleErrorZ;
+} LDKCResult_NoneSendErrorZ;
 
 /**
  * All-encompassing standard error type that processing can return
@@ -10132,6 +10887,59 @@ typedef struct LDKCResult_UpdateAddHTLCDecodeErrorZ {
 
 
 
+/**
+ * An onion message to be sent or received from a peer
+ */
+typedef struct MUST_USE_STRUCT LDKOnionMessage {
+   /**
+    * 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.
+    */
+   LDKnativeOnionMessage *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;
+} LDKOnionMessage;
+
+/**
+ * The contents of CResult_OnionMessageDecodeErrorZ
+ */
+typedef union LDKCResult_OnionMessageDecodeErrorZPtr {
+   /**
+    * A pointer to the contents in the success state.
+    * Reading from this pointer when `result_ok` is not set is undefined.
+    */
+   struct LDKOnionMessage *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_OnionMessageDecodeErrorZPtr;
+
+/**
+ * A CResult_OnionMessageDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::ln::msgs::OnionMessage 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_OnionMessageDecodeErrorZ {
+   /**
+    * The contents of this CResult_OnionMessageDecodeErrorZ, accessible via either
+    * `err` or `result` depending on the state of `result_ok`.
+    */
+   union LDKCResult_OnionMessageDecodeErrorZPtr contents;
+   /**
+    * Whether this CResult_OnionMessageDecodeErrorZ represents a success state.
+    */
+   bool result_ok;
+} LDKCResult_OnionMessageDecodeErrorZ;
+
+
+
 /**
  * A ping message to be sent or received from a peer
  */
@@ -10507,6 +11315,26 @@ typedef struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ {
    bool result_ok;
 } LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ;
 
+
+
+/**
+ * A node_announcement message to be sent or received from a peer
+ */
+typedef struct MUST_USE_STRUCT LDKNodeAnnouncement {
+   /**
+    * 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.
+    */
+   LDKnativeNodeAnnouncement *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;
+} LDKNodeAnnouncement;
+
 /**
  * The contents of CResult_NodeAnnouncementDecodeErrorZ
  */
@@ -10812,7 +11640,7 @@ typedef struct LDKCResult_InvoiceSignOrCreationErrorZ {
  *
  * Used to convey to a [`Filter`] such an output with a given spending condition. Any transaction
  * spending the output must be given to [`ChannelMonitor::block_connected`] either directly or via
- * the return value of [`Filter::register_output`].
+ * [`Confirm::transactions_confirmed`].
  *
  * If `block_hash` is `Some`, this indicates the output was created in the corresponding block and
  * may have been spent there. See [`Filter::register_output`] for details.
@@ -10871,15 +11699,12 @@ typedef struct LDKFilter {
    /**
     * Registers interest in spends of a transaction output.
     *
-    * Optionally, when `output.block_hash` is set, should return any transaction spending the
-    * output that is found in the corresponding block along with its index.
-    *
-    * This return value is useful for Electrum clients in order to supply in-block descendant
-    * transactions which otherwise were not included. This is not necessary for other clients if
-    * such descendant transactions were already included (e.g., when a BIP 157 client provides the
-    * full block).
+    * Note that this method might be called during processing of a new block. You therefore need
+    * to ensure that also dependent output spents within an already connected block are correctly
+    * handled, e.g., by re-scanning the block in question whenever new outputs have been
+    * registered mid-processing.
     */
-   struct LDKCOption_C2Tuple_usizeTransactionZZ (*register_output)(const void *this_arg, struct LDKWatchedOutput output);
+   void (*register_output)(const void *this_arg, struct LDKWatchedOutput output);
    /**
     * 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.
@@ -11006,6 +11831,28 @@ typedef struct LDKMessageSendEventsProvider {
    void (*free)(void *this_arg);
 } LDKMessageSendEventsProvider;
 
+/**
+ * A trait indicating an object may generate onion messages to send
+ */
+typedef struct LDKOnionMessageProvider {
+   /**
+    * 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.
+    *
+    * 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 implemented for objects handling events from [`EventsProvider`].
  */
@@ -11035,11 +11882,17 @@ typedef struct LDKEventHandler {
  *
  * # Requirements
  *
- * See [`process_pending_events`] for requirements around event processing.
- *
  * When using this trait, [`process_pending_events`] will call [`handle_event`] for each pending
- * event since the last invocation. The handler must either act upon the event immediately
- * or preserve it for later handling.
+ * event since the last invocation.
+ *
+ * In order to ensure no [`Event`]s are lost, implementors of this trait will persist [`Event`]s
+ * and replay any unhandled events on startup. An [`Event`] is considered handled when
+ * [`process_pending_events`] returns, thus handlers MUST fully handle [`Event`]s and persist any
+ * relevant changes to disk *before* returning.
+ *
+ * Further, because an application may crash between an [`Event`] being handled and the
+ * implementor of this trait being re-serialized, [`Event`] handling must be idempotent - in
+ * effect, [`Event`]s may be replayed.
  *
  * Note, handlers may call back into the provider and thus deadlocking must be avoided. Be sure to
  * consult the provider's documentation on the implication of processing events and how a handler
@@ -11063,9 +11916,7 @@ typedef struct LDKEventsProvider {
    /**
     * Processes any events generated since the last call using the given event handler.
     *
-    * Subsequent calls must only process new events. However, handlers must be capable of handling
-    * duplicate events across process restarts. This may occur if the provider was recovered from
-    * an old state (i.e., it hadn't been successfully persisted after processing pending events).
+    * See the trait-level documentation for requirements.
     */
    void (*process_pending_events)(const void *this_arg, struct LDKEventHandler handler);
    /**
@@ -11101,114 +11952,80 @@ typedef struct MUST_USE_STRUCT LDKBigSize {
    bool is_owned;
 } LDKBigSize;
 
-
-
 /**
- * Proposed use of a channel passed as a parameter to [`Score::channel_penalty_msat`].
+ * Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk.
  */
-typedef struct MUST_USE_STRUCT LDKChannelUsage {
+typedef struct LDKPersister {
    /**
-    * 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.
     */
-   LDKnativeChannelUsage *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.
+    * Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
     */
-   bool is_owned;
-} LDKChannelUsage;
+   struct LDKCResult_NoneErrorZ (*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_NoneErrorZ (*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_NoneErrorZ (*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;
 
 /**
- * An interface used to score payment channels for path finding.
+ * A callback which is called when a [`Future`] completes.
  *
- *\tScoring is in terms of fees willing to be paid in order to avoid routing through a channel.
+ * 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.
  */
-typedef struct LDKScore {
+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;
    /**
-    * 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);
-   /**
-    * Handles updating channel penalties after failing to route through a channel.
-    */
-   void (*payment_path_failed)(void *this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id);
-   /**
-    * Handles updating channel penalties after successfully routing along a path.
-    */
-   void (*payment_path_successful)(void *this_arg, struct LDKCVec_RouteHopZ path);
-   /**
-    * Serialize the object into a byte array
+    * The method which is called.
     */
-   struct LDKCVec_u8Z (*write)(const void *this_arg);
+   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);
-} LDKScore;
+} LDKFutureCallback;
 
 
 
 /**
- * A concrete implementation of [`LockableScore`] which supports multi-threading.
+ * A simple future which can complete once, and calls some callback(s) when it does so.
  */
-typedef struct MUST_USE_STRUCT LDKMultiThreadedLockableScore {
+typedef struct MUST_USE_STRUCT LDKFuture {
    /**
     * 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.
     */
-   LDKnativeMultiThreadedLockableScore *inner;
+   LDKnativeFuture *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;
-} LDKMultiThreadedLockableScore;
-
-/**
- * Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`MultiThreadedLockableScore`] to disk.
- */
-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.
-    */
-   struct LDKCResult_NoneErrorZ (*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_NoneErrorZ (*persist_graph)(const void *this_arg, const struct LDKNetworkGraph *NONNULL_PTR network_graph);
-   /**
-    * Persist the given [`MultiThreadedLockableScore`] to disk, returning an error if persistence failed.
-    */
-   struct LDKCResult_NoneErrorZ (*persist_scorer)(const void *this_arg, const struct LDKMultiThreadedLockableScore *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;
+} LDKFuture;
 
 
 
@@ -11396,7 +12213,7 @@ typedef struct LDKConfirm {
     * in the event of a chain reorganization, it must not be called with a `header` that is no
     * longer in the chain as of the last call to [`best_block_updated`].
     *
-    * [chain order]: Confirm#Order
+    * [chain order]: Confirm#order
     * [`best_block_updated`]: Self::best_block_updated
     */
    void (*transactions_confirmed)(const void *this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
@@ -11404,8 +12221,8 @@ typedef struct LDKConfirm {
     * Processes a transaction that is no longer confirmed as result of a chain reorganization.
     *
     * Should be called for any transaction returned by [`get_relevant_txids`] if it has been
-    * reorganized out of the best chain. Once called, the given transaction should not be returned
-    * by [`get_relevant_txids`] unless it has been reconfirmed via [`transactions_confirmed`].
+    * reorganized out of the best chain. Once called, the given transaction will not be returned
+    * by [`get_relevant_txids`], unless it has been reconfirmed via [`transactions_confirmed`].
     *
     * [`get_relevant_txids`]: Self::get_relevant_txids
     * [`transactions_confirmed`]: Self::transactions_confirmed
@@ -11421,9 +12238,9 @@ typedef struct LDKConfirm {
    /**
     * Returns transactions that should be monitored for reorganization out of the chain.
     *
-    * Should include any transactions passed to [`transactions_confirmed`] that have insufficient
-    * confirmations to be safe from a chain reorganization. Should not include any transactions
-    * passed to [`transaction_unconfirmed`] unless later reconfirmed.
+    * Will include any transactions passed to [`transactions_confirmed`] that have insufficient
+    * confirmations to be safe from a chain reorganization. Will not include any transactions
+    * passed to [`transaction_unconfirmed`], unless later reconfirmed.
     *
     * May be called to determine the subset of transactions that must still be monitored for
     * reorganization. Will be idempotent between calls but may change as a result of calls to the
@@ -11669,16 +12486,6 @@ typedef struct MUST_USE_STRUCT LDKChainParameters {
    bool is_owned;
 } LDKChainParameters;
 
-/**
- * A 3-byte byte array.
- */
-typedef struct LDKThreeBytes {
-   /**
-    * The three bytes
-    */
-   uint8_t data[3];
-} LDKThreeBytes;
-
 /**
  * A trait to describe an object which can receive channel messages.
  *
@@ -11774,6 +12581,20 @@ typedef struct LDKChannelMessageHandler {
     * Handle an incoming error message from the given peer.
     */
    void (*handle_error)(const void *this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg);
+   /**
+    * 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`]
+    * which are broadcasted in our [`NodeAnnouncement`] message.
+    */
+   struct LDKNodeFeatures (*provided_node_features)(const void *this_arg);
+   /**
+    * Gets the init feature flags which should be sent to the given peer. All available handlers
+    * are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
+    * which are sent in our [`Init`] message.
+    *
+    * 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 MessageSendEventsProvider for this object.
     */
@@ -11882,6 +12703,16 @@ typedef struct MUST_USE_STRUCT LDKDataLossProtect {
    bool is_owned;
 } LDKDataLossProtect;
 
+/**
+ * A 3-byte byte array.
+ */
+typedef struct LDKThreeBytes {
+   /**
+    * The three bytes
+    */
+   uint8_t data[3];
+} LDKThreeBytes;
+
 /**
  * A trait to describe an object which can receive routing messages.
  *
@@ -11913,20 +12744,21 @@ typedef struct LDKRoutingMessageHandler {
     */
    struct LDKCResult_boolLightningErrorZ (*handle_channel_update)(const void *this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
    /**
-    * Gets a subset of the channel announcements and updates required to dump our routing table
-    * to a remote node, starting at the short_channel_id indicated by starting_point and
-    * including the batch_amount entries immediately higher in numerical value than starting_point.
+    * Gets channel announcements and updates required to dump our routing table to a remote node,
+    * starting at the short_channel_id indicated by starting_point and including announcements
+    * for a single channel.
     */
-   struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ (*get_next_channel_announcements)(const void *this_arg, uint64_t starting_point, uint8_t batch_amount);
+   struct LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ (*get_next_channel_announcement)(const void *this_arg, uint64_t starting_point);
    /**
-    * Gets a subset of the node announcements required to dump our routing table to a remote node,
-    * starting at the node *after* the provided publickey and including batch_amount entries
-    * immediately higher (as defined by <PublicKey as Ord>::cmp) than starting_point.
+    * Gets a node announcement required to dump our routing table to a remote node, starting at
+    * the node *after* the provided pubkey and including up to one announcement immediately
+    * higher (as defined by <PublicKey as Ord>::cmp) than starting_point.
     * If None is provided for starting_point, we start at the first node.
     *
     * Note that starting_point (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
     */
-   struct LDKCVec_NodeAnnouncementZ (*get_next_node_announcements)(const void *this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount);
+   struct LDKNodeAnnouncement (*get_next_node_announcement)(const void *this_arg, struct LDKPublicKey starting_point);
    /**
     * Called when a connection is established with a peer. This can be used to
     * perform routing table synchronization using a strategy defined by the
@@ -11947,25 +12779,87 @@ typedef struct LDKRoutingMessageHandler {
     */
    struct LDKCResult_NoneLightningErrorZ (*handle_reply_short_channel_ids_end)(const void *this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg);
    /**
-    * Handles when a peer asks us to send a list of short_channel_ids
-    * for the requested range of blocks.
+    * Handles when a peer asks us to send a list of short_channel_ids
+    * for the requested range of blocks.
+    */
+   struct LDKCResult_NoneLightningErrorZ (*handle_query_channel_range)(const void *this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg);
+   /**
+    * Handles when a peer asks us to send routing gossip messages for a
+    * list of short_channel_ids.
+    */
+   struct LDKCResult_NoneLightningErrorZ (*handle_query_short_channel_ids)(const void *this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg);
+   /**
+    * 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`]
+    * which are broadcasted in our [`NodeAnnouncement`] message.
+    */
+   struct LDKNodeFeatures (*provided_node_features)(const void *this_arg);
+   /**
+    * Gets the init feature flags which should be sent to the given peer. All available handlers
+    * are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
+    * which are sent in our [`Init`] message.
+    *
+    * 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 MessageSendEventsProvider for this object.
+    */
+   struct LDKMessageSendEventsProvider MessageSendEventsProvider;
+   /**
+    * 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);
+} LDKRoutingMessageHandler;
+
+/**
+ * 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.
+    */
+   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);
+   /**
+    * Called when a connection is established with a peer. Can be used to track which peers
+    * advertise onion message support and are online.
+    */
+   void (*peer_connected)(const void *this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init);
+   /**
+    * Indicates a connection to the peer failed/an existing connection was lost. Allows handlers to
+    * drop and refuse to forward onion messages to this peer.
+    */
+   void (*peer_disconnected)(const void *this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible);
+   /**
+    * 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`]
+    * which are broadcasted in our [`NodeAnnouncement`] message.
     */
-   struct LDKCResult_NoneLightningErrorZ (*handle_query_channel_range)(const void *this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg);
+   struct LDKNodeFeatures (*provided_node_features)(const void *this_arg);
    /**
-    * Handles when a peer asks us to send routing gossip messages for a
-    * list of short_channel_ids.
+    * Gets the init feature flags which should be sent to the given peer. All available handlers
+    * are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
+    * which are sent in our [`Init`] message.
+    *
+    * Note that this method is called before [`Self::peer_connected`].
     */
-   struct LDKCResult_NoneLightningErrorZ (*handle_query_short_channel_ids)(const void *this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg);
+   struct LDKInitFeatures (*provided_init_features)(const void *this_arg, struct LDKPublicKey their_node_id);
    /**
-    * Implementation of MessageSendEventsProvider for this object.
+    * Implementation of OnionMessageProvider for this object.
     */
-   struct LDKMessageSendEventsProvider MessageSendEventsProvider;
+   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.
     */
    void (*free)(void *this_arg);
-} LDKRoutingMessageHandler;
+} LDKOnionMessageHandler;
 
 /**
  * Trait to be implemented by custom message (unrelated to the channel/gossip LN layers)
@@ -12362,32 +13256,45 @@ typedef struct MUST_USE_STRUCT LDKEffectiveCapacity {
    };
 } LDKEffectiveCapacity;
 
+
+
 /**
- * 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`]
- * 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.
- *
- * [`find_route`]: crate::routing::router::find_route
+ * A concrete implementation of [`LockableScore`] which supports multi-threading.
  */
-typedef struct LDKLockableScore {
+typedef struct MUST_USE_STRUCT LDKMultiThreadedLockableScore {
    /**
-    * 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 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 *this_arg;
+   LDKnativeMultiThreadedLockableScore *inner;
    /**
-    * Returns the locked scorer.
+    * 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 LDKScore (*lock)(const void *this_arg);
+   bool is_owned;
+} LDKMultiThreadedLockableScore;
+
+
+
+/**
+ * A locked `MultiThreadedLockableScore`.
+ */
+typedef struct MUST_USE_STRUCT LDKMultiThreadedScoreLock {
    /**
-    * 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.
+    * 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 (*free)(void *this_arg);
-} LDKLockableScore;
+   LDKnativeMultiThreadedScoreLock *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;
 
 
 
@@ -12396,6 +13303,9 @@ typedef struct LDKLockableScore {
  *
  * Used to configure base, liquidity, and amount penalties, the sum of which comprises the channel
  * penalty (i.e., the amount in msats willing to be paid to avoid routing through the channel).
+ *
+ * The penalty applied to any channel by the [`ProbabilisticScorer`] is the sum of each of the
+ * parameters here.
  */
 typedef struct MUST_USE_STRUCT LDKProbabilisticScoringParameters {
    /**
@@ -12414,6 +13324,107 @@ typedef struct MUST_USE_STRUCT LDKProbabilisticScoringParameters {
 
 
 
+/**
+ * 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 empty onion messages is supported.
+ *
+ * # Example
+ *
+ * ```
+ * # extern crate bitcoin;
+ * # use bitcoin::hashes::_export::_core::time::Duration;
+ * # use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
+ * # use lightning::chain::keysinterface::{InMemorySigner, KeysManager, KeysInterface};
+ * # use lightning::onion_message::messenger::{Destination, OnionMessenger};
+ * # use lightning::onion_message::blinded_route::BlindedRoute;
+ * # use lightning::util::logger::{Logger, Record};
+ * # use std::sync::Arc;
+ * # struct FakeLogger {};
+ * # impl Logger for FakeLogger {
+ * #     fn log(&self, record: &Record) { unimplemented!() }
+ * # }
+ * # 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 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 destination_node_id = hop_node_id1;
+ * #
+ * // Create the onion messenger. This must use the same `keys_manager` as is passed to your
+ * // ChannelManager.
+ * let onion_messenger = OnionMessenger::new(&keys_manager, logger);
+ *
+ * // Send an empty onion message to a node id.
+ * let intermediate_hops = [hop_node_id1, hop_node_id2];
+ * let reply_path = None;
+ * onion_messenger.send_onion_message(&intermediate_hops, Destination::Node(destination_node_id), reply_path);
+ *
+ * // Create a blinded route to yourself, for someone to send an onion message to.
+ * # let your_node_id = hop_node_id1;
+ * let hops = [hop_node_id3, hop_node_id4, your_node_id];
+ * let blinded_route = BlindedRoute::new(&hops, &keys_manager, &secp_ctx).unwrap();
+ *
+ * // Send an empty onion message to a blinded route.
+ * # let intermediate_hops = [hop_node_id1, hop_node_id2];
+ * let reply_path = None;
+ * onion_messenger.send_onion_message(&intermediate_hops, Destination::BlindedRoute(blinded_route), reply_path);
+ * ```
+ *
+ * [offers]: <https://github.com/lightning/bolts/pull/798>
+ * [`OnionMessenger`]: crate::onion_message::OnionMessenger
+ */
+typedef struct MUST_USE_STRUCT LDKOnionMessenger {
+   /**
+    * 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.
+    */
+   LDKnativeOnionMessenger *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;
+} LDKOnionMessenger;
+
+/**
+ * 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 route.
+    */
+   LDKDestination_BlindedRoute,
+   /**
+    * 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 LDKBlindedRoute blinded_route;
+      };
+   };
+} LDKDestination;
+
+
+
 /**
  * FilesystemPersister persists channel data on disk, where each channel's
  * data is stored in a file named after its funding outpoint.
@@ -12728,7 +13739,23 @@ 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)(const void *this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, const uint8_t (*payment_hash)[32], struct LDKCVec_ChannelDetailsZ *first_hops, const struct LDKScore *NONNULL_PTR scorer);
+   struct LDKCResult_RouteLightningErrorZ (*find_route)(const void *this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR route_params, const uint8_t (*payment_hash)[32], struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKInFlightHtlcs inflight_htlcs);
+   /**
+    * Lets the router know that payment through a specific path has failed.
+    */
+   void (*notify_payment_path_failed)(const void *this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id);
+   /**
+    * Lets the router know that payment through a specific path was successful.
+    */
+   void (*notify_payment_path_successful)(const void *this_arg, struct LDKCVec_RouteHopZ path);
+   /**
+    * Lets the router know that a payment probe was successful.
+    */
+   void (*notify_payment_probe_successful)(const void *this_arg, struct LDKCVec_RouteHopZ path);
+   /**
+    * Lets the router know that a payment probe failed.
+    */
+   void (*notify_payment_probe_failed)(const void *this_arg, struct LDKCVec_RouteHopZ path, 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.
@@ -12819,6 +13846,8 @@ extern const uintptr_t MAX_BUF_SIZE;
 
 extern const uint64_t MIN_RELAY_FEE_SAT_PER_1000_WEIGHT;
 
+extern const uint32_t FEERATE_FLOOR_SATS_PER_KW;
+
 extern const uint64_t CLOSED_CHANNEL_UPDATE_ID;
 
 extern const uint32_t ANTI_REORG_DELAY;
@@ -12835,7 +13864,7 @@ extern const uint64_t UNKNOWN_CHANNEL_CAPACITY_MSAT;
 
 extern const uint32_t DEFAULT_MAX_TOTAL_CLTV_EXPIRY_DELTA;
 
-extern const uint8_t DEFAULT_MAX_MPP_PATH_COUNT;
+extern const uint8_t DEFAULT_MAX_PATH_COUNT;
 
 extern const uint64_t MAX_TIMESTAMP;
 
@@ -12910,6 +13939,71 @@ void Str_free(struct LDKStr _res);
 const void *__unmangle_inner_ptr(const void *ptr);
 #endif
 
+/**
+ * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ */
+void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
+
+/**
+ * Creates a new CResult_BlindedRouteNoneZ in the success state.
+ */
+struct LDKCResult_BlindedRouteNoneZ CResult_BlindedRouteNoneZ_ok(struct LDKBlindedRoute o);
+
+/**
+ * Creates a new CResult_BlindedRouteNoneZ in the error state.
+ */
+struct LDKCResult_BlindedRouteNoneZ CResult_BlindedRouteNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_BlindedRouteNoneZ_is_ok(const struct LDKCResult_BlindedRouteNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_BlindedRouteNoneZ.
+ */
+void CResult_BlindedRouteNoneZ_free(struct LDKCResult_BlindedRouteNoneZ _res);
+
+/**
+ * Creates a new CResult_BlindedRouteDecodeErrorZ in the success state.
+ */
+struct LDKCResult_BlindedRouteDecodeErrorZ CResult_BlindedRouteDecodeErrorZ_ok(struct LDKBlindedRoute o);
+
+/**
+ * Creates a new CResult_BlindedRouteDecodeErrorZ in the error state.
+ */
+struct LDKCResult_BlindedRouteDecodeErrorZ CResult_BlindedRouteDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_BlindedRouteDecodeErrorZ_is_ok(const struct LDKCResult_BlindedRouteDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_BlindedRouteDecodeErrorZ.
+ */
+void CResult_BlindedRouteDecodeErrorZ_free(struct LDKCResult_BlindedRouteDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_BlindedHopDecodeErrorZ in the success state.
+ */
+struct LDKCResult_BlindedHopDecodeErrorZ CResult_BlindedHopDecodeErrorZ_ok(struct LDKBlindedHop o);
+
+/**
+ * Creates a new CResult_BlindedHopDecodeErrorZ in the error state.
+ */
+struct LDKCResult_BlindedHopDecodeErrorZ CResult_BlindedHopDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_BlindedHopDecodeErrorZ_is_ok(const struct LDKCResult_BlindedHopDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_BlindedHopDecodeErrorZ.
+ */
+void CResult_BlindedHopDecodeErrorZ_free(struct LDKCResult_BlindedHopDecodeErrorZ _res);
+
 /**
  * Creates a new CResult_NoneNoneZ in the success state.
  */
@@ -13407,6 +14501,21 @@ void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_Shutdow
  */
 struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
 
+/**
+ * Constructs a new COption_WriteableScoreZ containing a crate::lightning::routing::scoring::WriteableScore
+ */
+struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_some(struct LDKWriteableScore o);
+
+/**
+ * Constructs a new COption_WriteableScoreZ containing nothing
+ */
+struct LDKCOption_WriteableScoreZ COption_WriteableScoreZ_none(void);
+
+/**
+ * Frees any resources associated with the crate::lightning::routing::scoring::WriteableScore, if we are in the Some state
+ */
+void COption_WriteableScoreZ_free(struct LDKCOption_WriteableScoreZ _res);
+
 /**
  * Creates a new CResult_NoneErrorZ in the success state.
  */
@@ -13547,6 +14656,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_u64Z_free(struct LDKCVec_u64Z _res);
+
 /**
  * Creates a new CResult_PaymentParametersDecodeErrorZ in the success state.
  */
@@ -13661,11 +14775,6 @@ void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _r
  */
 struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *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_PaymentPurposeDecodeErrorZ in the success state.
  */
@@ -13739,6 +14848,53 @@ void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_C
  */
 struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Constructs a new COption_HTLCDestinationZ containing a crate::lightning::util::events::HTLCDestination
+ */
+struct LDKCOption_HTLCDestinationZ COption_HTLCDestinationZ_some(struct LDKHTLCDestination o);
+
+/**
+ * Constructs a new COption_HTLCDestinationZ containing nothing
+ */
+struct LDKCOption_HTLCDestinationZ COption_HTLCDestinationZ_none(void);
+
+/**
+ * Frees any resources associated with the crate::lightning::util::events::HTLCDestination, if we are in the Some state
+ */
+void COption_HTLCDestinationZ_free(struct LDKCOption_HTLCDestinationZ _res);
+
+/**
+ * Creates a new COption_HTLCDestinationZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCOption_HTLCDestinationZ COption_HTLCDestinationZ_clone(const struct LDKCOption_HTLCDestinationZ *NONNULL_PTR orig);
+
+/**
+ * Creates a new CResult_COption_HTLCDestinationZDecodeErrorZ in the success state.
+ */
+struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ CResult_COption_HTLCDestinationZDecodeErrorZ_ok(struct LDKCOption_HTLCDestinationZ o);
+
+/**
+ * Creates a new CResult_COption_HTLCDestinationZDecodeErrorZ in the error state.
+ */
+struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ CResult_COption_HTLCDestinationZDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(const struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_COption_HTLCDestinationZDecodeErrorZ.
+ */
+void CResult_COption_HTLCDestinationZDecodeErrorZ_free(struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_COption_HTLCDestinationZDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ CResult_COption_HTLCDestinationZDecodeErrorZ_clone(const struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Constructs a new COption_NetworkUpdateZ containing a crate::lightning::routing::gossip::NetworkUpdate
  */
@@ -13904,43 +15060,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 LDKC2Tuple_OutPointCVec_MonitorEventZZ C2Tuple_OutPointCVec_MonitorEventZZ_clone(const struct LDKC2Tuple_OutPointCVec_MonitorEventZZ *NONNULL_PTR orig);
+struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_clone(const struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ *NONNULL_PTR orig);
 
 /**
- * Creates a new C2Tuple_OutPointCVec_MonitorEventZZ from the contained elements.
+ * Creates a new C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ from the contained elements.
  */
-struct LDKC2Tuple_OutPointCVec_MonitorEventZZ C2Tuple_OutPointCVec_MonitorEventZZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b);
+struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_new(struct LDKOutPoint a, struct LDKCVec_MonitorEventZ b, struct LDKPublicKey c);
 
 /**
- * Frees any resources used by the C2Tuple_OutPointCVec_MonitorEventZZ.
+ * Frees any resources used by the C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ.
  */
-void C2Tuple_OutPointCVec_MonitorEventZZ_free(struct LDKC2Tuple_OutPointCVec_MonitorEventZZ _res);
+void C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ_free(struct LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ _res);
 
 /**
  * Frees the buffer pointed to by `data` if `datalen` is non-0.
  */
-void CVec_C2Tuple_OutPointCVec_MonitorEventZZZ_free(struct LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ _res);
-
-/**
- * Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ
- */
-struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
-
-/**
- * Constructs a new COption_C2Tuple_usizeTransactionZZ containing nothing
- */
-struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
-
-/**
- * Frees any resources associated with the crate::c_types::derived::C2Tuple_usizeTransactionZ, if we are in the Some state
- */
-void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
-
-/**
- * Creates a new COption_C2Tuple_usizeTransactionZZ which has the same data as `orig`
- * but with all dynamically-allocated buffers duplicated in new buffers.
- */
-struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
+void CVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_free(struct LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ _res);
 
 /**
  * Creates a new CResult_FixedPenaltyScorerDecodeErrorZ in the success state.
@@ -14270,14 +15405,25 @@ struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_Channel
 void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Constructs a new COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ containing a crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ
  */
-void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
+struct LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_some(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ o);
 
 /**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
+ * Constructs a new COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ containing nothing
+ */
+struct LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_none(void);
+
+/**
+ * Frees any resources associated with the crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ, if we are in the Some state
+ */
+void COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
+
+/**
+ * Creates a new COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
+struct LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_clone(const struct LDKCOption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *NONNULL_PTR orig);
 
 /**
  * Creates a new CResult_NoneLightningErrorZ in the success state.
@@ -14440,11 +15586,6 @@ void CResult_NodeAliasDecodeErrorZ_free(struct LDKCResult_NodeAliasDecodeErrorZ
  */
 struct LDKCResult_NodeAliasDecodeErrorZ CResult_NodeAliasDecodeErrorZ_clone(const struct LDKCResult_NodeAliasDecodeErrorZ *NONNULL_PTR orig);
 
-/**
- * Frees the buffer pointed to by `data` if `datalen` is non-0.
- */
-void CVec_u64Z_free(struct LDKCVec_u64Z _res);
-
 /**
  * Creates a new CResult_NodeInfoDecodeErrorZ in the success state.
  */
@@ -14711,25 +15852,66 @@ struct LDKCResult_C2Tuple_SignatureSignatureZNoneZ CResult_C2Tuple_SignatureSign
 struct LDKCResult_SecretKeyNoneZ CResult_SecretKeyNoneZ_ok(struct LDKSecretKey o);
 
 /**
- * Creates a new CResult_SecretKeyNoneZ in the error state.
+ * Creates a new CResult_SecretKeyNoneZ in the error state.
+ */
+struct LDKCResult_SecretKeyNoneZ CResult_SecretKeyNoneZ_err(void);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_SecretKeyNoneZ_is_ok(const struct LDKCResult_SecretKeyNoneZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_SecretKeyNoneZ.
+ */
+void CResult_SecretKeyNoneZ_free(struct LDKCResult_SecretKeyNoneZ _res);
+
+/**
+ * Creates a new CResult_SecretKeyNoneZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_SecretKeyNoneZ CResult_SecretKeyNoneZ_clone(const struct LDKCResult_SecretKeyNoneZ *NONNULL_PTR orig);
+
+/**
+ * Constructs a new COption_ScalarZ containing a crate::c_types::BigEndianScalar
+ */
+struct LDKCOption_ScalarZ COption_ScalarZ_some(struct LDKBigEndianScalar o);
+
+/**
+ * Constructs a new COption_ScalarZ containing nothing
+ */
+struct LDKCOption_ScalarZ COption_ScalarZ_none(void);
+
+/**
+ * Frees any resources associated with the crate::c_types::BigEndianScalar, if we are in the Some state
+ */
+void COption_ScalarZ_free(struct LDKCOption_ScalarZ _res);
+
+/**
+ * Creates a new CResult_SharedSecretNoneZ in the success state.
+ */
+struct LDKCResult_SharedSecretNoneZ CResult_SharedSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
+
+/**
+ * Creates a new CResult_SharedSecretNoneZ in the error state.
  */
-struct LDKCResult_SecretKeyNoneZ CResult_SecretKeyNoneZ_err(void);
+struct LDKCResult_SharedSecretNoneZ CResult_SharedSecretNoneZ_err(void);
 
 /**
  * Checks if the given object is currently in the success state
  */
-bool CResult_SecretKeyNoneZ_is_ok(const struct LDKCResult_SecretKeyNoneZ *NONNULL_PTR o);
+bool CResult_SharedSecretNoneZ_is_ok(const struct LDKCResult_SharedSecretNoneZ *NONNULL_PTR o);
 
 /**
- * Frees any resources used by the CResult_SecretKeyNoneZ.
+ * Frees any resources used by the CResult_SharedSecretNoneZ.
  */
-void CResult_SecretKeyNoneZ_free(struct LDKCResult_SecretKeyNoneZ _res);
+void CResult_SharedSecretNoneZ_free(struct LDKCResult_SharedSecretNoneZ _res);
 
 /**
- * Creates a new CResult_SecretKeyNoneZ which has the same data as `orig`
+ * Creates a new CResult_SharedSecretNoneZ which has the same data as `orig`
  * but with all dynamically-allocated buffers duplicated in new buffers.
  */
-struct LDKCResult_SecretKeyNoneZ CResult_SecretKeyNoneZ_clone(const struct LDKCResult_SecretKeyNoneZ *NONNULL_PTR orig);
+struct LDKCResult_SharedSecretNoneZ CResult_SharedSecretNoneZ_clone(const struct LDKCResult_SharedSecretNoneZ *NONNULL_PTR orig);
 
 /**
  * Creates a new CResult_SignDecodeErrorZ in the success state.
@@ -15496,6 +16678,26 @@ void CResult_PaymentIdPaymentErrorZ_free(struct LDKCResult_PaymentIdPaymentError
  */
 struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_clone(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the success state.
+ */
+struct LDKCResult_InFlightHtlcsDecodeErrorZ CResult_InFlightHtlcsDecodeErrorZ_ok(struct LDKInFlightHtlcs o);
+
+/**
+ * Creates a new CResult_InFlightHtlcsDecodeErrorZ in the error state.
+ */
+struct LDKCResult_InFlightHtlcsDecodeErrorZ CResult_InFlightHtlcsDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_InFlightHtlcsDecodeErrorZ_is_ok(const struct LDKCResult_InFlightHtlcsDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_InFlightHtlcsDecodeErrorZ.
+ */
+void CResult_InFlightHtlcsDecodeErrorZ_free(struct LDKCResult_InFlightHtlcsDecodeErrorZ _res);
+
 /**
  * Creates a new CResult_SiPrefixParseErrorZ in the success state.
  */
@@ -16125,6 +17327,26 @@ void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _r
  */
 struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_NoneSendErrorZ in the success state.
+ */
+struct LDKCResult_NoneSendErrorZ CResult_NoneSendErrorZ_ok(void);
+
+/**
+ * Creates a new CResult_NoneSendErrorZ in the error state.
+ */
+struct LDKCResult_NoneSendErrorZ CResult_NoneSendErrorZ_err(struct LDKSendError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_NoneSendErrorZ_is_ok(const struct LDKCResult_NoneSendErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_NoneSendErrorZ.
+ */
+void CResult_NoneSendErrorZ_free(struct LDKCResult_NoneSendErrorZ _res);
+
 /**
  * Creates a new CResult_u32GraphSyncErrorZ in the success state.
  */
@@ -16659,6 +17881,32 @@ void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecod
  */
 struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
 
+/**
+ * Creates a new CResult_OnionMessageDecodeErrorZ in the success state.
+ */
+struct LDKCResult_OnionMessageDecodeErrorZ CResult_OnionMessageDecodeErrorZ_ok(struct LDKOnionMessage o);
+
+/**
+ * Creates a new CResult_OnionMessageDecodeErrorZ in the error state.
+ */
+struct LDKCResult_OnionMessageDecodeErrorZ CResult_OnionMessageDecodeErrorZ_err(struct LDKDecodeError e);
+
+/**
+ * Checks if the given object is currently in the success state
+ */
+bool CResult_OnionMessageDecodeErrorZ_is_ok(const struct LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR o);
+
+/**
+ * Frees any resources used by the CResult_OnionMessageDecodeErrorZ.
+ */
+void CResult_OnionMessageDecodeErrorZ_free(struct LDKCResult_OnionMessageDecodeErrorZ _res);
+
+/**
+ * Creates a new CResult_OnionMessageDecodeErrorZ which has the same data as `orig`
+ * but with all dynamically-allocated buffers duplicated in new buffers.
+ */
+struct LDKCResult_OnionMessageDecodeErrorZ CResult_OnionMessageDecodeErrorZ_clone(const struct LDKCResult_OnionMessageDecodeErrorZ *NONNULL_PTR orig);
+
 /**
  * Creates a new CResult_PingDecodeErrorZ in the success state.
  */
@@ -17210,6 +18458,41 @@ struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PT
  */
 struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
 
+/**
+ * Frees any resources used by the HTLCDestination
+ */
+void HTLCDestination_free(struct LDKHTLCDestination this_ptr);
+
+/**
+ * Creates a copy of the HTLCDestination
+ */
+struct LDKHTLCDestination HTLCDestination_clone(const struct LDKHTLCDestination *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new NextHopChannel-variant HTLCDestination
+ */
+struct LDKHTLCDestination HTLCDestination_next_hop_channel(struct LDKPublicKey node_id, struct LDKThirtyTwoBytes channel_id);
+
+/**
+ * Utility method to constructs a new UnknownNextHop-variant HTLCDestination
+ */
+struct LDKHTLCDestination HTLCDestination_unknown_next_hop(uint64_t requested_forward_scid);
+
+/**
+ * Utility method to constructs a new FailedPayment-variant HTLCDestination
+ */
+struct LDKHTLCDestination HTLCDestination_failed_payment(struct LDKThirtyTwoBytes payment_hash);
+
+/**
+ * Serialize the HTLCDestination object into a byte array which can be read by HTLCDestination_read
+ */
+struct LDKCVec_u8Z HTLCDestination_write(const struct LDKHTLCDestination *NONNULL_PTR obj);
+
+/**
+ * Read a HTLCDestination from a byte array, created by HTLCDestination_write
+ */
+struct LDKCResult_COption_HTLCDestinationZDecodeErrorZ HTLCDestination_read(struct LDKu8slice ser);
+
 /**
  * Frees any resources used by the Event
  */
@@ -17253,7 +18536,17 @@ struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_i
 /**
  * Utility method to constructs a new PaymentPathFailed-variant Event
  */
-struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id, struct LDKRouteParameters retry);
+struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, bool payment_failed_permanently, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id, struct LDKRouteParameters retry);
+
+/**
+ * Utility method to constructs a new ProbeSuccessful-variant Event
+ */
+struct LDKEvent Event_probe_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path);
+
+/**
+ * Utility method to constructs a new ProbeFailed-variant Event
+ */
+struct LDKEvent Event_probe_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id);
 
 /**
  * Utility method to constructs a new PendingHTLCsForwardable-variant Event
@@ -17285,6 +18578,11 @@ struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struc
  */
 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);
 
+/**
+ * Utility method to constructs a new HTLCHandlingFailed-variant Event
+ */
+struct LDKEvent Event_htlchandling_failed(struct LDKThirtyTwoBytes prev_channel_id, struct LDKHTLCDestination failed_next_destination);
+
 /**
  * Serialize the Event object into a byte array which can be read by Event_read
  */
@@ -17361,14 +18659,14 @@ struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey no
 struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
 
 /**
- * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent
+ * Utility method to constructs a new SendChannelAnnouncement-variant MessageSendEvent
  */
-struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
+struct LDKMessageSendEvent MessageSendEvent_send_channel_announcement(struct LDKPublicKey node_id, struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
 
 /**
- * Utility method to constructs a new BroadcastNodeAnnouncement-variant MessageSendEvent
+ * Utility method to constructs a new BroadcastChannelAnnouncement-variant MessageSendEvent
  */
-struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
+struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
 
 /**
  * Utility method to constructs a new BroadcastChannelUpdate-variant MessageSendEvent
@@ -17410,6 +18708,11 @@ 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
  */
@@ -17474,6 +18777,21 @@ void BigSize_set_a(struct LDKBigSize *NONNULL_PTR this_ptr, uint64_t val);
  */
 MUST_USE_RES struct LDKBigSize BigSize_new(uint64_t a_arg);
 
+/**
+ * Frees any resources used by the Hostname, if is_owned is set and inner is non-NULL.
+ */
+void Hostname_free(struct LDKHostname this_obj);
+
+/**
+ * Creates a copy of the Hostname
+ */
+struct LDKHostname Hostname_clone(const struct LDKHostname *NONNULL_PTR orig);
+
+/**
+ * Returns the length of the hostname.
+ */
+MUST_USE_RES uint8_t Hostname_len(const struct LDKHostname *NONNULL_PTR this_arg);
+
 /**
  * Creates a digital signature of a message given a SecretKey, like the node's secret.
  * 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.
@@ -17502,6 +18820,22 @@ struct LDKCVec_u8Z construct_invoice_preimage(struct LDKu8slice hrp_bytes, struc
  */
 void Persister_free(struct LDKPersister this_ptr);
 
+/**
+ * Calls the free function if one is set
+ */
+void FutureCallback_free(struct LDKFutureCallback this_ptr);
+
+/**
+ * Frees any resources used by the Future, if is_owned is set and inner is non-NULL.
+ */
+void Future_free(struct LDKFuture this_obj);
+
+/**
+ * Registers a callback to be called upon completion of this future. If the future has already
+ * completed, the callback will be called immediately.
+ */
+void Future_register_callback_fn(const struct LDKFuture *NONNULL_PTR this_arg, struct LDKFutureCallback callback);
+
 /**
  * Creates a copy of the Level
  */
@@ -17881,10 +19215,62 @@ bool ChannelHandshakeConfig_get_commit_upfront_shutdown_pubkey(const struct LDKC
  */
 void ChannelHandshakeConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, bool val);
 
+/**
+ * The Proportion of the channel value to configure as counterparty's channel reserve,
+ * i.e., `their_channel_reserve_satoshis` for both outbound and inbound channels.
+ *
+ * `their_channel_reserve_satoshis` is the minimum balance that the other node has to maintain
+ * on their side, at all times.
+ * This ensures that if our counterparty broadcasts a revoked state, we can punish them by
+ * claiming at least this value on chain.
+ *
+ * Channel reserve values greater than 30% could be considered highly unreasonable, since that
+ * amount can never be used for payments.
+ * Also, if our selected channel reserve for counterparty and counterparty's selected
+ * channel reserve for us sum up to equal or greater than channel value, channel negotiations
+ * will fail.
+ *
+ * Note: Versions of LDK earlier than v0.0.104 will fail to read channels with any channel reserve
+ * other than the default value.
+ *
+ * Default value: 1% of channel value, i.e., configured as 10,000 millionths.
+ * Minimum value: If the calculated proportional value is less than 1000 sats, it will be treated
+ *                as 1000 sats instead, which is a safe implementation-specific lower bound.
+ * Maximum value: 1,000,000, any values larger than 1 Million will be treated as 1 Million (or 100%)
+ *                instead, although channel negotiations will fail in that case.
+ */
+uint32_t ChannelHandshakeConfig_get_their_channel_reserve_proportional_millionths(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
+
+/**
+ * The Proportion of the channel value to configure as counterparty's channel reserve,
+ * i.e., `their_channel_reserve_satoshis` for both outbound and inbound channels.
+ *
+ * `their_channel_reserve_satoshis` is the minimum balance that the other node has to maintain
+ * on their side, at all times.
+ * This ensures that if our counterparty broadcasts a revoked state, we can punish them by
+ * claiming at least this value on chain.
+ *
+ * Channel reserve values greater than 30% could be considered highly unreasonable, since that
+ * amount can never be used for payments.
+ * Also, if our selected channel reserve for counterparty and counterparty's selected
+ * channel reserve for us sum up to equal or greater than channel value, channel negotiations
+ * will fail.
+ *
+ * Note: Versions of LDK earlier than v0.0.104 will fail to read channels with any channel reserve
+ * other than the default value.
+ *
+ * Default value: 1% of channel value, i.e., configured as 10,000 millionths.
+ * Minimum value: If the calculated proportional value is less than 1000 sats, it will be treated
+ *                as 1000 sats instead, which is a safe implementation-specific lower bound.
+ * Maximum value: 1,000,000, any values larger than 1 Million will be treated as 1 Million (or 100%)
+ *                instead, although channel negotiations will fail in that case.
+ */
+void ChannelHandshakeConfig_set_their_channel_reserve_proportional_millionths(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
+
 /**
  * Constructs a new ChannelHandshakeConfig given each field
  */
-MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_new(uint32_t minimum_depth_arg, uint16_t our_to_self_delay_arg, uint64_t our_htlc_minimum_msat_arg, uint8_t max_inbound_htlc_value_in_flight_percent_of_channel_arg, bool negotiate_scid_privacy_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
+MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_new(uint32_t minimum_depth_arg, uint16_t our_to_self_delay_arg, uint64_t our_htlc_minimum_msat_arg, uint8_t max_inbound_htlc_value_in_flight_percent_of_channel_arg, bool negotiate_scid_privacy_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg, uint32_t their_channel_reserve_proportional_millionths_arg);
 
 /**
  * Creates a copy of the ChannelHandshakeConfig
@@ -18907,9 +20293,19 @@ struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_am
 struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
 
 /**
- * Utility method to constructs a new MaybeClaimableHTLCAwaitingTimeout-variant Balance
+ * 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);
+
+/**
+ * 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);
+
+/**
+ * Utility method to constructs a new CounterpartyRevokedOutputClaimable-variant Balance
  */
-struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
+struct LDKBalance Balance_counterparty_revoked_output_claimable(uint64_t claimable_amount_satoshis);
 
 /**
  * Checks if two Balances contain equal inner contents.
@@ -18933,7 +20329,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, const struct LDKFeeEstimator *NONNULL_PTR 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, struct LDKFeeEstimator fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
 
 /**
  * Gets the update_id from the latest ChannelMonitorUpdate which was applied to this
@@ -18975,6 +20371,16 @@ MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_m
  */
 MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
 
+/**
+ * Gets the `node_id` of the counterparty for this channel.
+ *
+ * Will be `None` for channels constructed on LDK versions prior to 0.0.110 and always `Some`
+ * otherwise.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+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 use it to get a broadcastable holder toxic tx in case of
@@ -19062,8 +20468,9 @@ MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct
  * balance, or until our counterparty has claimed the balance and accrued several
  * confirmations on the claim transaction.
  *
- * Note that the balances available when you or your counterparty have broadcasted revoked
- * state(s) may not be fully captured here.
+ * 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.
  *
  * See [`Balance`] for additional details on the types of claimable balances which
  * may be returned here and their meanings.
@@ -19174,6 +20581,13 @@ uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelaye
  */
 void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
 
+/**
+ * The output which is referenced by the given outpoint
+ *
+ * Returns a copy of the field.
+ */
+struct LDKTxOut DelayedPaymentOutputDescriptor_get_output(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
 /**
  * The output which is referenced by the given outpoint
  */
@@ -19250,6 +20664,13 @@ struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKSt
  */
 void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
 
+/**
+ * The output which is referenced by the given outpoint
+ *
+ * Returns a copy of the field.
+ */
+struct LDKTxOut StaticPaymentOutputDescriptor_get_output(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
 /**
  * The output which is referenced by the given outpoint
  */
@@ -20402,7 +21823,7 @@ struct LDKPhantomRouteHints PhantomRouteHints_clone(const struct LDKPhantomRoute
 MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
 
 /**
- * Gets the current configuration applied to all new channels,  as
+ * Gets the current configuration applied to all new channels.
  */
 MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
@@ -20627,6 +22048,13 @@ void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR
  */
 MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
 
+/**
+ * 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 LDKCVec_RouteHopZ hops);
+
 /**
  * Call this upon creation of a funding transaction for the given channel.
  *
@@ -20661,28 +22089,6 @@ MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ
  */
 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);
 
-/**
- * Regenerates channel_announcements and generates a signed node_announcement from the given
- * arguments, providing them in corresponding events via
- * [`get_and_clear_pending_msg_events`], if at least one public channel has been confirmed
- * on-chain. This effectively re-broadcasts all channel announcements and sends our node
- * announcement to ensure that the lightning P2P network is aware of the channels we have and
- * our network addresses.
- *
- * `rgb` is a node \"color\" and `alias` is a printable human-readable string to describe this
- * node to humans. They carry no in-protocol meaning.
- *
- * `addresses` represent the set (possibly empty) of socket addresses on which this node
- * accepts incoming connections. These will be included in the node_announcement, publicly
- * tying these addresses together and to this node. If you wish to preserve user privacy,
- * addresses should likely contain only Tor Onion addresses.
- *
- * Panics if `addresses` is absurdly large (more than 500).
- *
- * [`get_and_clear_pending_msg_events`]: MessageSendEventsProvider::get_and_clear_pending_msg_events
- */
-void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
-
 /**
  * Atomically updates the [`ChannelConfig`] for the given channels.
  *
@@ -20986,6 +22392,13 @@ MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct L
  */
 void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
 
+/**
+ * Gets a [`Future`] that completes when a persistable update is available. 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_persistable_update_future(const struct LDKChannelManager *NONNULL_PTR this_arg);
+
 /**
  * Gets the latest best block which was connected either via the [`chain::Listen`] or
  * [`chain::Confirm`] interfaces.
@@ -22103,6 +23516,26 @@ void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr
  */
 struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
 
+/**
+ * Frees any resources used by the OnionMessage, if is_owned is set and inner is non-NULL.
+ */
+void OnionMessage_free(struct LDKOnionMessage this_obj);
+
+/**
+ * Used in decrypting the onion packet's payload.
+ */
+struct LDKPublicKey OnionMessage_get_blinding_point(const struct LDKOnionMessage *NONNULL_PTR this_ptr);
+
+/**
+ * Used in decrypting the onion packet's payload.
+ */
+void OnionMessage_set_blinding_point(struct LDKOnionMessage *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Creates a copy of the OnionMessage
+ */
+struct LDKOnionMessage OnionMessage_clone(const struct LDKOnionMessage *NONNULL_PTR orig);
+
 /**
  * Frees any resources used by the UpdateFulfillHTLC, if is_owned is set and inner is non-NULL.
  */
@@ -22243,6 +23676,13 @@ struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSig
  */
 void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature 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);
+
 /**
  * Signatures on the HTLC transactions
  */
@@ -22500,6 +23940,11 @@ struct LDKNetAddress NetAddress_onion_v2(struct LDKTwelveBytes a);
  */
 struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
 
+/**
+ * Utility method to constructs a new Hostname-variant NetAddress
+ */
+struct LDKNetAddress NetAddress_hostname(struct LDKHostname hostname, uint16_t port);
+
 /**
  * Serialize the NetAddress object into a byte array which can be read by NetAddress_read
  */
@@ -22569,6 +24014,13 @@ const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeA
  */
 void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
+/**
+ * List of addresses on which this node is reachable
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_NetAddressZ UnsignedNodeAnnouncement_get_addresses(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
+
 /**
  * List of addresses on which this node is reachable
  */
@@ -22838,6 +24290,16 @@ uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedCha
  */
 void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
 
+/**
+ * The maximum HTLC value incoming to sender, in milli-satoshi. Used to be optional.
+ */
+uint64_t UnsignedChannelUpdate_get_htlc_maximum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
+
+/**
+ * The maximum HTLC value incoming to sender, in milli-satoshi. Used to be optional.
+ */
+void UnsignedChannelUpdate_set_htlc_maximum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
+
 /**
  * The base HTLC fee charged by sender, in milli-satoshi
  */
@@ -22858,6 +24320,15 @@ uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKU
  */
 void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t 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
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u8Z UnsignedChannelUpdate_get_excess_data(const struct LDKUnsignedChannelUpdate *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
@@ -22865,6 +24336,11 @@ void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedCha
  */
 void UnsignedChannelUpdate_set_excess_data(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
 
+/**
+ * Constructs a new UnsignedChannelUpdate given each field
+ */
+MUST_USE_RES struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_new(struct LDKThirtyTwoBytes chain_hash_arg, uint64_t short_channel_id_arg, uint32_t timestamp_arg, uint8_t flags_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, uint64_t htlc_maximum_msat_arg, uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, struct LDKCVec_u8Z excess_data_arg);
+
 /**
  * Creates a copy of the UnsignedChannelUpdate
  */
@@ -22995,6 +24471,13 @@ bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONN
  */
 void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
 
+/**
+ * The short_channel_ids in the channel range
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u64Z ReplyChannelRange_get_short_channel_ids(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
+
 /**
  * The short_channel_ids in the channel range
  */
@@ -23025,6 +24508,13 @@ const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortCh
  */
 void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
 
+/**
+ * The short_channel_ids that are being queried
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_u64Z QueryShortChannelIds_get_short_channel_ids(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr);
+
 /**
  * The short_channel_ids that are being queried
  */
@@ -23286,6 +24776,11 @@ void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
  */
 void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
 
+/**
+ * Calls the free function if one is set
+ */
+void OnionMessageHandler_free(struct LDKOnionMessageHandler this_ptr);
+
 /**
  * Serialize the AcceptChannel object into a byte array which can be read by AcceptChannel_read
  */
@@ -23466,6 +24961,16 @@ struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PT
  */
 struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
 
+/**
+ * Read a OnionMessage from a byte array, created by OnionMessage_write
+ */
+struct LDKCResult_OnionMessageDecodeErrorZ OnionMessage_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the OnionMessage object into a byte array which can be read by OnionMessage_read
+ */
+struct LDKCVec_u8Z OnionMessage_write(const struct LDKOnionMessage *NONNULL_PTR obj);
+
 /**
  * Serialize the Ping object into a byte array which can be read by Ping_read
  */
@@ -23648,6 +25153,18 @@ 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
+ */
+struct LDKOnionMessageHandler IgnoringMessageHandler_as_OnionMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+
 /**
  * Constructs a new CustomMessageReader which calls the relevant methods on this_arg.
  * This copies the `inner` pointer in this_arg and thus the returned CustomMessageReader must be freed before this_arg is
@@ -23719,10 +25236,22 @@ const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const st
  */
 void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
 
+/**
+ * A message handler which handles onion messages. For now, this can only be an
+ * [`IgnoringMessageHandler`].
+ */
+const struct LDKOnionMessageHandler *MessageHandler_get_onion_message_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
+
+/**
+ * A message handler which handles onion messages. For now, this can only be an
+ * [`IgnoringMessageHandler`].
+ */
+void MessageHandler_set_onion_message_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKOnionMessageHandler val);
+
 /**
  * Constructs a new MessageHandler given each field
  */
-MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
+MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg, struct LDKOnionMessageHandler onion_message_handler_arg);
 
 /**
  * Creates a copy of a SocketDescriptor
@@ -23780,8 +25309,13 @@ void PeerManager_free(struct LDKPeerManager this_obj);
  * Constructs a new PeerManager with the given message handlers and node_id secret key
  * ephemeral_random_data is used to derive per-connection ephemeral keys and must be
  * cryptographically secure random bytes.
+ *
+ * `current_time` is used as an always-increasing counter that survives across restarts and is
+ * incremented irregularly internally. In general it is best to simply use the current UNIX
+ * timestamp, however if it is not available a persistent counter that increases once per
+ * minute should suffice.
  */
-MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
+MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, uint64_t current_time, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
 
 /**
  * Get the list of node ids for peers which have completed the initial handshake.
@@ -23800,8 +25334,7 @@ MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struc
  * peer using the init message.
  * The user should pass the remote network address of the host they are connected to.
  *
- * Note that if an Err is returned here you MUST NOT call socket_disconnected for the new
- * descriptor but must disconnect the connection immediately.
+ * If an `Err` is returned here you must disconnect the connection immediately.
  *
  * Returns a small number of bytes to send to the remote node (currently always 50).
  *
@@ -23821,9 +25354,8 @@ MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound
  * The user should pass the remote network address of the host they are connected to.
  *
  * May refuse the connection by returning an Err, but will never write bytes to the remote end
- * (outbound connector always speaks first). Note that if an Err is returned here you MUST NOT
- * call socket_disconnected for the new descriptor but must disconnect the connection
- * immediately.
+ * (outbound connector always speaks first). If an `Err` is returned here you must disconnect
+ * the connection immediately.
  *
  * Panics if descriptor is duplicative with some other descriptor which has not yet been
  * [`socket_disconnected()`].
@@ -23920,12 +25452,31 @@ void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR t
  * preferred. The call rate determines both how often we send a ping to our peers and how much
  * time they have to respond before we disconnect them.
  *
- * May call [`send_data`] on all [`SocketDescriptor`]s. Thus, be very careful with reentrancy
- * issues!
+ * May call [`send_data`] on all [`SocketDescriptor`]s. Thus, be very careful with reentrancy
+ * issues!
+ *
+ * [`send_data`]: SocketDescriptor::send_data
+ */
+void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
+
+/**
+ * Generates a signed node_announcement from the given arguments, sending it to all connected
+ * peers. Note that peers will likely ignore this message unless we have at least one public
+ * channel which has at least six confirmations on-chain.
+ *
+ * `rgb` is a node \"color\" and `alias` is a printable human-readable string to describe this
+ * node to humans. They carry no in-protocol meaning.
+ *
+ * `addresses` represent the set (possibly empty) of socket addresses on which this node
+ * accepts incoming connections. These will be included in the node_announcement, publicly
+ * tying these addresses together and to this node. If you wish to preserve user privacy,
+ * addresses should likely contain only Tor Onion addresses.
+ *
+ * Panics if `addresses` is absurdly large (more than 100).
  *
- * [`send_data`]: SocketDescriptor::send_data
+ * [`get_and_clear_pending_msg_events`]: MessageSendEventsProvider::get_and_clear_pending_msg_events
  */
-void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
+void PeerManager_broadcast_node_announcement(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
 
 /**
  * Gets the weight for an HTLC-Success transaction.
@@ -24567,6 +26118,13 @@ struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struc
  */
 void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature 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);
+
 /**
  * All non-dust counterparty HTLC signatures, in the order they appear in the transaction
  */
@@ -24930,6 +26488,17 @@ void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
  */
 void ChannelTypeFeatures_free(struct LDKChannelTypeFeatures this_obj);
 
+/**
+ * Returns the set of known init features that are related to channels. At least some of
+ * these features are likely required for peers to talk to us.
+ */
+MUST_USE_RES struct LDKInitFeatures InitFeatures_known_channel_features(void);
+
+/**
+ * Returns the set of known node features that are related to channels.
+ */
+MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known_channel_features(void);
+
 /**
  * Create a blank Features with no features set
  */
@@ -25515,6 +27084,46 @@ 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_onion_messages_optional(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void InitFeatures_set_onion_messages_required(struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool InitFeatures_supports_onion_messages(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as optional.
+ */
+void NodeFeatures_set_onion_messages_optional(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Set this feature as required.
+ */
+void NodeFeatures_set_onion_messages_required(struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is supported.
+ */
+MUST_USE_RES bool NodeFeatures_supports_onion_messages(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool InitFeatures_requires_onion_messages(const struct LDKInitFeatures *NONNULL_PTR this_arg);
+
+/**
+ * Checks if this feature is required.
+ */
+MUST_USE_RES bool NodeFeatures_requires_onion_messages(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
+
 /**
  * Set this feature as optional.
  */
@@ -25964,12 +27573,12 @@ void ChannelUpdateInfo_set_htlc_minimum_msat(struct LDKChannelUpdateInfo *NONNUL
 /**
  * The maximum value which may be relayed to the next hop via the channel.
  */
-struct LDKCOption_u64Z ChannelUpdateInfo_get_htlc_maximum_msat(const struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr);
+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, struct LDKCOption_u64Z val);
+void ChannelUpdateInfo_set_htlc_maximum_msat(struct LDKChannelUpdateInfo *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
  * Fees charged when the channel is used for routing
@@ -26004,7 +27613,7 @@ void ChannelUpdateInfo_set_last_update_message(struct LDKChannelUpdateInfo *NONN
 /**
  * Constructs a new ChannelUpdateInfo given each field
  */
-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, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
+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
@@ -26322,6 +27931,13 @@ struct LDKNodeAlias NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncem
  */
 void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAlias val);
 
+/**
+ * Internet-level addresses via which one can connect to the node
+ *
+ * Returns a copy of the field.
+ */
+struct LDKCVec_NetAddressZ NodeAnnouncementInfo_get_addresses(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
+
 /**
  * Internet-level addresses via which one can connect to the node
  */
@@ -26401,6 +28017,13 @@ struct LDKCResult_NodeAliasDecodeErrorZ NodeAlias_read(struct LDKu8slice ser);
  */
 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
  */
@@ -26611,6 +28234,30 @@ MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(c
  */
 MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *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,
@@ -26942,21 +28589,71 @@ uint32_t PaymentParameters_get_max_total_cltv_expiry_delta(const struct LDKPayme
 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_MPP_PATH_COUNT`].
+ * 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.
  */
-uint8_t PaymentParameters_get_max_mpp_path_count(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
+struct LDKCVec_u64Z PaymentParameters_get_previously_failed_channels(const struct LDKPaymentParameters *NONNULL_PTR this_ptr);
 
 /**
- * The maximum number of paths that may be used by MPP payments.
- * Defaults to [`DEFAULT_MAX_MPP_PATH_COUNT`].
+ * 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_max_mpp_path_count(struct LDKPaymentParameters *NONNULL_PTR this_ptr, uint8_t val);
+void PaymentParameters_set_previously_failed_channels(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 LDKPublicKey payee_pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg, uint32_t max_total_cltv_expiry_delta_arg, uint8_t max_mpp_path_count_arg);
+MUST_USE_RES struct LDKPaymentParameters PaymentParameters_new(struct LDKPublicKey payee_pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_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);
 
 /**
  * Creates a copy of the PaymentParameters
@@ -27186,15 +28883,37 @@ void Score_free(struct LDKScore this_ptr);
  */
 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);
 
 /**
- * Serialize the MultiThreadedLockableScore object into a byte array which can be read by MultiThreadedLockableScore_read
+ * Frees any resources used by the MultiThreadedScoreLock, if is_owned is set and inner is non-NULL.
+ */
+void MultiThreadedScoreLock_free(struct LDKMultiThreadedScoreLock this_obj);
+
+/**
+ * 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
+ */
+struct LDKScore MultiThreadedScoreLock_as_Score(const struct LDKMultiThreadedScoreLock *NONNULL_PTR this_arg);
+
+/**
+ * Serialize the MultiThreadedScoreLock object into a byte array which can be read by MultiThreadedScoreLock_read
+ */
+struct LDKCVec_u8Z MultiThreadedScoreLock_write(const struct LDKMultiThreadedScoreLock *NONNULL_PTR 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 LDKCVec_u8Z MultiThreadedLockableScore_write(const struct LDKMultiThreadedLockableScore *NONNULL_PTR obj);
+struct LDKLockableScore MultiThreadedLockableScore_as_LockableScore(const struct LDKMultiThreadedLockableScore *NONNULL_PTR this_arg);
 
 /**
  * Creates a new [`MultiThreadedLockableScore`] given an underlying [`Score`].
@@ -27303,6 +29022,38 @@ uint64_t ProbabilisticScoringParameters_get_base_penalty_msat(const struct LDKPr
  */
 void ProbabilisticScoringParameters_set_base_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
 
+/**
+ * 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
+ */
+uint64_t ProbabilisticScoringParameters_get_base_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+
+/**
+ * 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
+ */
+void ProbabilisticScoringParameters_set_base_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *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 to determine the liquidity penalty.
@@ -27380,7 +29131,7 @@ void ProbabilisticScoringParameters_set_liquidity_offset_half_life(struct LDKPro
  * multiplier and `2^20`ths of the payment amount, weighted by the negative `log10` of the
  * success probability.
  *
- * `-log10(success_probability) * amount_penalty_multiplier_msat * amount_msat / 2^20`
+ * `-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
@@ -27390,7 +29141,7 @@ void ProbabilisticScoringParameters_set_liquidity_offset_half_life(struct LDKPro
  *
  * Default value: 256 msat
  */
-uint64_t ProbabilisticScoringParameters_get_amount_penalty_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+uint64_t ProbabilisticScoringParameters_get_liquidity_penalty_amount_multiplier_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
 
 /**
  * A multiplier used in conjunction with a payment amount and the negative `log10` of the
@@ -27401,7 +29152,7 @@ uint64_t ProbabilisticScoringParameters_get_amount_penalty_multiplier_msat(const
  * multiplier and `2^20`ths of the payment amount, weighted by the negative `log10` of the
  * success probability.
  *
- * `-log10(success_probability) * amount_penalty_multiplier_msat * amount_msat / 2^20`
+ * `-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
@@ -27411,7 +29162,7 @@ uint64_t ProbabilisticScoringParameters_get_amount_penalty_multiplier_msat(const
  *
  * Default value: 256 msat
  */
-void ProbabilisticScoringParameters_set_amount_penalty_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+void ProbabilisticScoringParameters_set_liquidity_penalty_amount_multiplier_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
 
 /**
  * This penalty is applied when `htlc_maximum_msat` is equal to or larger than half of the
@@ -27433,6 +29184,48 @@ uint64_t ProbabilisticScoringParameters_get_anti_probing_penalty_msat(const stru
  */
 void ProbabilisticScoringParameters_set_anti_probing_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
 
+/**
+ * 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)
+ *
+ * [`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 ProbabilisticScoringParameters_get_considered_impossible_penalty_msat(const struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr);
+
+/**
+ * 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)
+ *
+ * [`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 ProbabilisticScoringParameters_set_considered_impossible_penalty_msat(struct LDKProbabilisticScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
+
 /**
  * Creates a copy of the ProbabilisticScoringParameters
  */
@@ -27470,9 +29263,19 @@ void ProbabilisticScorer_add_banned(struct LDKProbabilisticScorer *NONNULL_PTR t
 void ProbabilisticScorer_remove_banned(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
 
 /**
- * Clears the list of nodes that are avoided during path finding.
+ * Sets a manual penalty for the given node.
+ */
+void ProbabilisticScorer_set_manual_penalty(struct LDKProbabilisticScorer *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 ProbabilisticScorer_clear_banned(struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
+void ProbabilisticScorer_remove_manual_penalty(struct LDKProbabilisticScorer *NONNULL_PTR this_arg, const struct LDKNodeId *NONNULL_PTR node_id);
+
+/**
+ * Clears the list of manual penalties that are applied during path finding.
+ */
+void ProbabilisticScorer_clear_manual_penalties(struct LDKProbabilisticScorer *NONNULL_PTR this_arg);
 
 /**
  * Marks all nodes in the given list as banned, i.e.,
@@ -27501,6 +29304,125 @@ struct LDKCVec_u8Z ProbabilisticScorer_write(const struct LDKProbabilisticScorer
  */
 struct LDKCResult_ProbabilisticScorerDecodeErrorZ ProbabilisticScorer_read(struct LDKu8slice ser, struct LDKProbabilisticScoringParameters arg_a, const struct LDKNetworkGraph *NONNULL_PTR arg_b, struct LDKLogger arg_c);
 
+/**
+ * Frees any resources used by the BlindedRoute, if is_owned is set and inner is non-NULL.
+ */
+void BlindedRoute_free(struct LDKBlindedRoute this_obj);
+
+/**
+ * Frees any resources used by the BlindedHop, if is_owned is set and inner is non-NULL.
+ */
+void BlindedHop_free(struct LDKBlindedHop this_obj);
+
+/**
+ * Create a blinded route to be forwarded along `node_pks`. The last node pubkey in `node_pks`
+ * will be the destination node.
+ *
+ * Errors if less than two hops are provided or if `node_pk`(s) are invalid.
+ */
+MUST_USE_RES struct LDKCResult_BlindedRouteNoneZ BlindedRoute_new(struct LDKCVec_PublicKeyZ node_pks, const struct LDKKeysInterface *NONNULL_PTR keys_manager);
+
+/**
+ * Serialize the BlindedRoute object into a byte array which can be read by BlindedRoute_read
+ */
+struct LDKCVec_u8Z BlindedRoute_write(const struct LDKBlindedRoute *NONNULL_PTR obj);
+
+/**
+ * Read a BlindedRoute from a byte array, created by BlindedRoute_write
+ */
+struct LDKCResult_BlindedRouteDecodeErrorZ BlindedRoute_read(struct LDKu8slice ser);
+
+/**
+ * Serialize the BlindedHop object into a byte array which can be read by BlindedHop_read
+ */
+struct LDKCVec_u8Z BlindedHop_write(const struct LDKBlindedHop *NONNULL_PTR obj);
+
+/**
+ * Read a BlindedHop from a byte array, created by BlindedHop_write
+ */
+struct LDKCResult_BlindedHopDecodeErrorZ BlindedHop_read(struct LDKu8slice ser);
+
+/**
+ * Frees any resources used by the OnionMessenger, if is_owned is set and inner is non-NULL.
+ */
+void OnionMessenger_free(struct LDKOnionMessenger this_obj);
+
+/**
+ * Frees any resources used by the Destination
+ */
+void Destination_free(struct LDKDestination this_ptr);
+
+/**
+ * Utility method to constructs a new Node-variant Destination
+ */
+struct LDKDestination Destination_node(struct LDKPublicKey a);
+
+/**
+ * Utility method to constructs a new BlindedRoute-variant Destination
+ */
+struct LDKDestination Destination_blinded_route(struct LDKBlindedRoute a);
+
+/**
+ * Frees any resources used by the SendError
+ */
+void SendError_free(struct LDKSendError this_ptr);
+
+/**
+ * Creates a copy of the SendError
+ */
+struct LDKSendError SendError_clone(const struct LDKSendError *NONNULL_PTR orig);
+
+/**
+ * Utility method to constructs a new Secp256k1-variant SendError
+ */
+struct LDKSendError SendError_secp256k1(enum LDKSecp256k1Error a);
+
+/**
+ * Utility method to constructs a new TooBigPacket-variant SendError
+ */
+struct LDKSendError SendError_too_big_packet(void);
+
+/**
+ * Utility method to constructs a new TooFewBlindedHops-variant SendError
+ */
+struct LDKSendError SendError_too_few_blinded_hops(void);
+
+/**
+ * Utility method to constructs a new InvalidFirstHop-variant SendError
+ */
+struct LDKSendError SendError_invalid_first_hop(void);
+
+/**
+ * Utility method to constructs a new BufferFull-variant SendError
+ */
+struct LDKSendError SendError_buffer_full(void);
+
+/**
+ * Constructs a new `OnionMessenger` to send, forward, and delegate received onion messages to
+ * their respective handlers.
+ */
+MUST_USE_RES struct LDKOnionMessenger OnionMessenger_new(struct LDKKeysInterface keys_manager, struct LDKLogger logger);
+
+/**
+ * Send an empty onion message to `destination`, routing it through `intermediate_nodes`.
+ * 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 LDKCResult_NoneSendErrorZ OnionMessenger_send_onion_message(const struct LDKOnionMessenger *NONNULL_PTR this_arg, struct LDKCVec_PublicKeyZ intermediate_nodes, struct LDKDestination destination, struct LDKBlindedRoute reply_path);
+
+/**
+ * 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
+ */
+struct LDKOnionMessageHandler OnionMessenger_as_OnionMessageHandler(const struct LDKOnionMessenger *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 OnionMessenger_as_OnionMessageProvider(const struct LDKOnionMessenger *NONNULL_PTR this_arg);
+
 /**
  * Frees any resources used by the FilesystemPersister, if is_owned is set and inner is non-NULL.
  */
@@ -27592,10 +29514,8 @@ struct LDKGossipSync GossipSync_none(void);
  * [`Persister::persist_graph`]: lightning::util::persist::Persister::persist_graph
  * [`NetworkGraph`]: lightning::routing::gossip::NetworkGraph
  * [`NetworkGraph::write`]: lightning::routing::gossip::NetworkGraph#impl-Writeable
- *
- * Note that scorer (or a relevant inner pointer) may be NULL or all-0s to represent None
  */
-MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, struct LDKGossipSync gossip_sync, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger, struct LDKMultiThreadedLockableScore scorer);
+MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, struct LDKGossipSync gossip_sync, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger, struct LDKCOption_WriteableScoreZ scorer);
 
 /**
  * Join `BackgroundProcessor`'s thread, returning any error that occurred while persisting
@@ -27760,6 +29680,11 @@ bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice
  */
 struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
 
+/**
+ * Checks if two Invoices contain equal inner contents.
+ */
+uint64_t Invoice_hash(const struct LDKInvoice *NONNULL_PTR o);
+
 /**
  * Frees any resources used by the SignedRawInvoice, if is_owned is set and inner is non-NULL.
  */
@@ -27777,6 +29702,11 @@ bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const
  */
 struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
 
+/**
+ * Checks if two SignedRawInvoices contain equal inner contents.
+ */
+uint64_t SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR o);
+
 /**
  * Frees any resources used by the RawInvoice, if is_owned is set and inner is non-NULL.
  */
@@ -27804,6 +29734,11 @@ bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRa
  */
 struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
 
+/**
+ * Checks if two RawInvoices contain equal inner contents.
+ */
+uint64_t RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR o);
+
 /**
  * Frees any resources used by the RawDataPart, if is_owned is set and inner is non-NULL.
  */
@@ -27831,6 +29766,11 @@ bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDK
  */
 struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
 
+/**
+ * Checks if two RawDataParts contain equal inner contents.
+ */
+uint64_t RawDataPart_hash(const struct LDKRawDataPart *NONNULL_PTR o);
+
 /**
  * Frees any resources used by the PositiveTimestamp, if is_owned is set and inner is non-NULL.
  */
@@ -27848,6 +29788,11 @@ bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, cons
  */
 struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
 
+/**
+ * Checks if two PositiveTimestamps contain equal inner contents.
+ */
+uint64_t PositiveTimestamp_hash(const struct LDKPositiveTimestamp *NONNULL_PTR o);
+
 /**
  * Creates a copy of the SiPrefix
  */
@@ -27879,6 +29824,11 @@ enum LDKSiPrefix SiPrefix_pico(void);
  */
 bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
 
+/**
+ * Checks if two SiPrefixs contain equal inner contents.
+ */
+uint64_t SiPrefix_hash(const enum LDKSiPrefix *NONNULL_PTR o);
+
 /**
  * Returns the multiplier to go from a BTC value to picoBTC implied by this SiPrefix.
  * This is effectively 10^12 * the prefix multiplier
@@ -28100,6 +30050,11 @@ void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
  */
 struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
 
+/**
+ * Checks if two InvoiceSignatures contain equal inner contents.
+ */
+uint64_t InvoiceSignature_hash(const struct LDKInvoiceSignature *NONNULL_PTR o);
+
 /**
  * Checks if two InvoiceSignatures contain equal inner contents.
  * This ignores pointers and is_owned flags and looks at the values in fields.
@@ -28145,7 +30100,7 @@ MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKS
 /**
  * The hash of the `RawInvoice` that was signed.
  */
-MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
+MUST_USE_RES const uint8_t (*SignedRawInvoice_signable_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
 
 /**
  * InvoiceSignature for the invoice.
@@ -28164,9 +30119,9 @@ MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_
 MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
 
 /**
- * Calculate the hash of the encoded `RawInvoice`
+ * Calculate the hash of the encoded `RawInvoice` which should be signed.
  */
-MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_signable_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
 
 /**
  *
@@ -28633,7 +30588,7 @@ struct LDKPaymentError PaymentError_sending(struct LDKPaymentSendFailure a);
  * Will forward any [`Event::PaymentPathFailed`] events to the decorated `event_handler` once
  * `retry` has been exceeded for a given [`Invoice`].
  */
-MUST_USE_RES struct LDKInvoicePayer InvoicePayer_new(struct LDKPayer payer, struct LDKRouter router, const struct LDKMultiThreadedLockableScore *NONNULL_PTR scorer, struct LDKLogger logger, struct LDKEventHandler event_handler, struct LDKRetry retry);
+MUST_USE_RES struct LDKInvoicePayer InvoicePayer_new(struct LDKPayer payer, struct LDKRouter router, struct LDKLogger logger, struct LDKEventHandler event_handler, struct LDKRetry retry);
 
 /**
  * Pays the given [`Invoice`], caching it for later use in case a retry is needed.
@@ -28677,6 +30632,27 @@ void InvoicePayer_remove_cached_payment(const struct LDKInvoicePayer *NONNULL_PT
  */
 struct LDKEventHandler InvoicePayer_as_EventHandler(const struct LDKInvoicePayer *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);
+
+/**
+ * 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);
+
 /**
  * Utility to create an invoice that can be paid to one of multiple nodes, or a \"phantom invoice.\"
  * See [`PhantomKeysManager`] for more information on phantom node payments.
@@ -28797,7 +30773,7 @@ void DefaultRouter_free(struct LDKDefaultRouter this_obj);
  * Creates a new router using the given [`NetworkGraph`], a [`Logger`], and a randomness source
  * `random_seed_bytes`.
  */
-MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger, struct LDKThirtyTwoBytes random_seed_bytes);
+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);
 
 /**
  * Constructs a new Router which calls the relevant methods on this_arg.