- bindings diff
[rust-lightning] / lightning-c-bindings / include / lightning.h
index cd246f92eafc6881e2c7c966a07d4d318c454092..6154802268679a02df0a1e93031d226e91d4125b 100644 (file)
@@ -198,7 +198,10 @@ typedef enum LDKSecp256k1Error {
  * `data_is_owned` either set or unset at your discretion.
  */
 typedef struct LDKTransaction {
-   const uint8_t *data;
+   /**
+    * This is non-const for your convenience, an object passed to Rust is never written to.
+    */
+   uint8_t *data;
    uintptr_t datalen;
    bool data_is_owned;
 } LDKTransaction;
@@ -245,7 +248,7 @@ typedef LDKCResultTempl_u8__ChannelMonitorUpdateErr LDKCResult_NoneChannelMonito
  * inconsistent with the ChannelMonitor being called. eg for ChannelMonitor::update_monitor this
  * means you tried to update a monitor for a different channel or the ChannelMonitorUpdate was
  * corrupted.
- * Contains a human-readable error message.
+ * Contains a developer-readable error message.
  */
 typedef struct MUST_USE_STRUCT LDKMonitorUpdateError {
    /**
@@ -292,6 +295,13 @@ typedef struct LDKC2TupleTempl_OutPoint__CVec_u8Z {
 
 typedef LDKC2TupleTempl_OutPoint__CVec_u8Z LDKC2Tuple_OutPointScriptZ;
 
+typedef struct LDKC2TupleTempl_u32__TxOut {
+   uint32_t a;
+   LDKTxOut b;
+} LDKC2TupleTempl_u32__TxOut;
+
+typedef LDKC2TupleTempl_u32__TxOut LDKC2Tuple_u32TxOutZ;
+
 /**
  * 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.
@@ -300,19 +310,19 @@ typedef struct LDKThirtyTwoBytes {
    uint8_t data[32];
 } LDKThirtyTwoBytes;
 
-typedef struct LDKCVecTempl_TxOut {
-   LDKTxOut *data;
+typedef struct LDKCVecTempl_C2TupleTempl_u32__TxOut {
+   LDKC2TupleTempl_u32__TxOut *data;
    uintptr_t datalen;
-} LDKCVecTempl_TxOut;
+} LDKCVecTempl_C2TupleTempl_u32__TxOut;
 
-typedef struct LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut {
+typedef struct LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_C2TupleTempl_u32__TxOut {
    LDKThirtyTwoBytes a;
-   LDKCVecTempl_TxOut b;
-} LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut;
+   LDKCVecTempl_C2TupleTempl_u32__TxOut b;
+} LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_C2TupleTempl_u32__TxOut;
 
-typedef LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut LDKC2Tuple_TxidCVec_TxOutZZ;
+typedef LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_C2TupleTempl_u32__TxOut LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ;
 
-typedef LDKCVecTempl_TxOut LDKCVec_TxOutZ;
+typedef LDKCVecTempl_C2TupleTempl_u32__TxOut LDKCVec_C2Tuple_u32TxOutZZ;
 
 typedef struct LDKC2TupleTempl_u64__u64 {
    uint64_t a;
@@ -576,6 +586,32 @@ typedef struct LDKC2TupleTempl_HTLCOutputInCommitment__Signature {
 
 typedef LDKC2TupleTempl_HTLCOutputInCommitment__Signature LDKC2Tuple_HTLCOutputInCommitmentSignatureZ;
 
+
+
+/**
+ * An Err type for failure to process messages.
+ */
+typedef struct MUST_USE_STRUCT LDKLightningError {
+   /**
+    * 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.
+    */
+   LDKnativeLightningError *inner;
+   bool is_owned;
+} LDKLightningError;
+
+typedef union LDKCResultPtr_u8__LightningError {
+   uint8_t *result;
+   LDKLightningError *err;
+} LDKCResultPtr_u8__LightningError;
+
+typedef struct LDKCResultTempl_u8__LightningError {
+   LDKCResultPtr_u8__LightningError contents;
+   bool result_ok;
+} LDKCResultTempl_u8__LightningError;
+
+typedef LDKCResultTempl_u8__LightningError LDKCResult_NoneLightningErrorZ;
+
 typedef struct LDKPublicKey {
    uint8_t compressed_form[33];
 } LDKPublicKey;
@@ -1820,6 +1856,68 @@ typedef struct LDKFeeEstimator {
    void (*free)(void *this_arg);
 } LDKFeeEstimator;
 
+/**
+ * `Persist` defines behavior for persisting channel monitors: this could mean
+ * writing once to disk, and/or uploading to one or more backup services.
+ *
+ * Note that for every new monitor, you **must** persist the new `ChannelMonitor`
+ * to disk/backups. And, on every update, you **must** persist either the
+ * `ChannelMonitorUpdate` or the updated monitor itself. Otherwise, there is risk
+ * of situations such as revoking a transaction, then crashing before this
+ * revocation can be persisted, then unintentionally broadcasting a revoked
+ * transaction and losing money. This is a risk because previous channel states
+ * are toxic, so it's important that whatever channel state is persisted is
+ * kept up-to-date.
+ */
+typedef struct LDKPersist {
+   void *this_arg;
+   /**
+    * Persist a new channel's data. The data can be stored any way you want, but
+    * the identifier provided by Rust-Lightning is the channel's outpoint (and
+    * it is up to you to maintain a correct mapping between the outpoint and the
+    * stored channel data). Note that you **must** persist every new monitor to
+    * disk. See the `Persist` trait documentation for more details.
+    *
+    * See [`ChannelMonitor::serialize_for_disk`] for writing out a `ChannelMonitor`,
+    * and [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+    *
+    * [`ChannelMonitor::serialize_for_disk`]: struct.ChannelMonitor.html#method.serialize_for_disk
+    * [`ChannelMonitorUpdateErr`]: enum.ChannelMonitorUpdateErr.html
+    */
+   LDKCResult_NoneChannelMonitorUpdateErrZ (*persist_new_channel)(const void *this_arg, LDKOutPoint id, const LDKChannelMonitor *data);
+   /**
+    * Update one channel's data. The provided `ChannelMonitor` has already
+    * applied the given update.
+    *
+    * Note that on every update, you **must** persist either the
+    * `ChannelMonitorUpdate` or the updated monitor itself to disk/backups. See
+    * the `Persist` trait documentation for more details.
+    *
+    * If an implementer chooses to persist the updates only, they need to make
+    * sure that all the updates are applied to the `ChannelMonitors` *before*
+    * the set of channel monitors is given to the `ChannelManager`
+    * deserialization routine. See [`ChannelMonitor::update_monitor`] for
+    * applying a monitor update to a monitor. If full `ChannelMonitors` are
+    * persisted, then there is no need to persist individual updates.
+    *
+    * Note that there could be a performance tradeoff between persisting complete
+    * channel monitors on every update vs. persisting only updates and applying
+    * them in batches. The size of each monitor grows `O(number of state updates)`
+    * whereas updates are small and `O(1)`.
+    *
+    * See [`ChannelMonitor::serialize_for_disk`] for writing out a `ChannelMonitor`,
+    * [`ChannelMonitorUpdate::write`] for writing out an update, and
+    * [`ChannelMonitorUpdateErr`] for requirements when returning errors.
+    *
+    * [`ChannelMonitor::update_monitor`]: struct.ChannelMonitor.html#impl-1
+    * [`ChannelMonitor::serialize_for_disk`]: struct.ChannelMonitor.html#method.serialize_for_disk
+    * [`ChannelMonitorUpdate::write`]: struct.ChannelMonitorUpdate.html#method.write
+    * [`ChannelMonitorUpdateErr`]: enum.ChannelMonitorUpdateErr.html
+    */
+   LDKCResult_NoneChannelMonitorUpdateErrZ (*update_persisted_channel)(const void *this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate *update, const LDKChannelMonitor *data);
+   void (*free)(void *this_arg);
+} LDKPersist;
+
 
 
 /**
@@ -1875,12 +1973,12 @@ typedef struct LDKCVecTempl_Transaction {
 
 typedef LDKCVecTempl_Transaction LDKCVec_TransactionZ;
 
-typedef struct LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut {
-   LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut *data;
+typedef struct LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_C2TupleTempl_u32__TxOut {
+   LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_C2TupleTempl_u32__TxOut *data;
    uintptr_t datalen;
-} LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut;
+} LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_C2TupleTempl_u32__TxOut;
 
-typedef LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut LDKCVec_C2Tuple_TxidCVec_TxOutZZZ;
+typedef LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_C2TupleTempl_u32__TxOut LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ;
 
 typedef struct LDKSecretKey {
    uint8_t bytes[32];
@@ -2569,20 +2667,6 @@ typedef struct MUST_USE_STRUCT LDKGossipTimestampFilter {
    bool is_owned;
 } LDKGossipTimestampFilter;
 
-
-
-/**
- * An Err type for failure to process messages.
- */
-typedef struct MUST_USE_STRUCT LDKLightningError {
-   /**
-    * 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.
-    */
-   LDKnativeLightningError *inner;
-   bool is_owned;
-} LDKLightningError;
-
 typedef struct LDKCVecTempl_UpdateAddHTLC {
    LDKUpdateAddHTLC *data;
    uintptr_t datalen;
@@ -2735,7 +2819,7 @@ typedef struct LDKSocketDescriptor {
     * socket_disconnected but prior to socket_disconnected returning.
     */
    void (*disconnect_socket)(void *this_arg);
-   bool (*eq)(const void *this_arg, const void *other_arg);
+   bool (*eq)(const void *this_arg, const LDKSocketDescriptor *other_arg);
    uint64_t (*hash)(const void *this_arg);
    void *(*clone)(const void *this_arg);
    void (*free)(void *this_arg);
@@ -3047,7 +3131,9 @@ extern const void (*C2Tuple_OutPointScriptZ_free)(LDKC2Tuple_OutPointScriptZ);
 
 extern const void (*C2Tuple_SignatureCVec_SignatureZZ_free)(LDKC2Tuple_SignatureCVec_SignatureZZ);
 
-extern const void (*C2Tuple_TxidCVec_TxOutZZ_free)(LDKC2Tuple_TxidCVec_TxOutZZ);
+extern const void (*C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free)(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ);
+
+extern const void (*C2Tuple_u32TxOutZ_free)(LDKC2Tuple_u32TxOutZ);
 
 extern const void (*C2Tuple_u64u64Z_free)(LDKC2Tuple_u64u64Z);
 
@@ -3055,6 +3141,8 @@ extern const void (*C2Tuple_usizeTransactionZ_free)(LDKC2Tuple_usizeTransactionZ
 
 extern const void (*C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free)(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ);
 
+extern const uint64_t CLOSED_CHANNEL_UPDATE_ID;
+
 extern const void (*CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free)(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ);
 
 extern const LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok)(LDKC2Tuple_SignatureCVec_SignatureZZ);
@@ -3077,6 +3165,10 @@ extern const LDKCResult_NoneChannelMonitorUpdateErrZ (*CResult_NoneChannelMonito
 
 extern const void (*CResult_NoneChannelMonitorUpdateErrZ_free)(LDKCResult_NoneChannelMonitorUpdateErrZ);
 
+extern const LDKCResult_NoneLightningErrorZ (*CResult_NoneLightningErrorZ_err)(LDKLightningError);
+
+extern const void (*CResult_NoneLightningErrorZ_free)(LDKCResult_NoneLightningErrorZ);
+
 extern const LDKCResult_NoneMonitorUpdateErrorZ (*CResult_NoneMonitorUpdateErrorZ_err)(LDKMonitorUpdateError);
 
 extern const void (*CResult_NoneMonitorUpdateErrorZ_free)(LDKCResult_NoneMonitorUpdateErrorZ);
@@ -3137,7 +3229,9 @@ extern const LDKCResult_boolPeerHandleErrorZ (*CResult_boolPeerHandleErrorZ_ok)(
 
 extern const void (*CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free)(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ);
 
-extern const void (*CVec_C2Tuple_TxidCVec_TxOutZZZ_free)(LDKCVec_C2Tuple_TxidCVec_TxOutZZZ);
+extern const void (*CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free)(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ);
+
+extern const void (*CVec_C2Tuple_u32TxOutZZ_free)(LDKCVec_C2Tuple_u32TxOutZZ);
 
 extern const void (*CVec_C2Tuple_usizeTransactionZZ_free)(LDKCVec_C2Tuple_usizeTransactionZZ);
 
@@ -3173,8 +3267,6 @@ extern const void (*CVec_SpendableOutputDescriptorZ_free)(LDKCVec_SpendableOutpu
 
 extern const void (*CVec_TransactionZ_free)(LDKCVec_TransactionZ);
 
-extern const void (*CVec_TxOutZ_free)(LDKCVec_TxOutZ);
-
 extern const void (*CVec_UpdateAddHTLCZ_free)(LDKCVec_UpdateAddHTLCZ);
 
 extern const void (*CVec_UpdateFailHTLCZ_free)(LDKCVec_UpdateFailHTLCZ);
@@ -3201,7 +3293,9 @@ LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
 
 LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(LDKOutPoint a, LDKCVec_u8Z b);
 
-LDKC2Tuple_TxidCVec_TxOutZZ C2Tuple_TxidCVec_TxOutZZ_new(LDKThirtyTwoBytes a, LDKCVec_TxOutZ b);
+LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, LDKTxOut b);
+
+LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(LDKThirtyTwoBytes a, LDKCVec_C2Tuple_u32TxOutZZ b);
 
 LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
 
@@ -3223,10 +3317,16 @@ LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
 
 LDKC2Tuple_HTLCOutputInCommitmentSignatureZ C2Tuple_HTLCOutputInCommitmentSignatureZ_new(LDKHTLCOutputInCommitment a, LDKSignature b);
 
+LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
+
 void Event_free(LDKEvent this_ptr);
 
+LDKEvent Event_clone(const LDKEvent *orig);
+
 void MessageSendEvent_free(LDKMessageSendEvent this_ptr);
 
+LDKMessageSendEvent MessageSendEvent_clone(const LDKMessageSendEvent *orig);
+
 /**
  * Calls the free function if one is set
  */
@@ -3239,6 +3339,10 @@ void EventsProvider_free(LDKEventsProvider this_ptr);
 
 void APIError_free(LDKAPIError this_ptr);
 
+LDKAPIError APIError_clone(const LDKAPIError *orig);
+
+LDKLevel Level_clone(const LDKLevel *orig);
+
 /**
  * Returns the most verbose logging level.
  */
@@ -3251,6 +3355,8 @@ void Logger_free(LDKLogger this_ptr);
 
 void ChannelHandshakeConfig_free(LDKChannelHandshakeConfig this_ptr);
 
+LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const LDKChannelHandshakeConfig *orig);
+
 /**
  * Confirmations we will wait for before considering the channel locked in.
  * Applied only for inbound channels (see ChannelHandshakeLimits::max_minimum_depth for the
@@ -3329,6 +3435,8 @@ MUST_USE_RES LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
 
 void ChannelHandshakeLimits_free(LDKChannelHandshakeLimits this_ptr);
 
+LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const LDKChannelHandshakeLimits *orig);
+
 /**
  * Minimum allowed satoshis when a channel is funded, this is supplied by the sender and so
  * only applies to inbound channels.
@@ -3521,6 +3629,8 @@ MUST_USE_RES LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
 
 void ChannelConfig_free(LDKChannelConfig this_ptr);
 
+LDKChannelConfig ChannelConfig_clone(const LDKChannelConfig *orig);
+
 /**
  * Amount (in millionths of a satoshi) the channel will charge per transferred satoshi.
  * This may be allowed to change at runtime in a later update, however doing so must result in
@@ -3609,6 +3719,8 @@ LDKChannelConfig ChannelConfig_read(LDKu8slice ser);
 
 void UserConfig_free(LDKUserConfig this_ptr);
 
+LDKUserConfig UserConfig_clone(const LDKUserConfig *orig);
+
 /**
  * Channel config that we propose to our counterparty.
  */
@@ -3643,6 +3755,8 @@ MUST_USE_RES LDKUserConfig UserConfig_new(LDKChannelHandshakeConfig own_channel_
 
 MUST_USE_RES LDKUserConfig UserConfig_default(void);
 
+LDKAccessError AccessError_clone(const LDKAccessError *orig);
+
 /**
  * Calls the free function if one is set
  */
@@ -3663,6 +3777,8 @@ void Filter_free(LDKFilter this_ptr);
  */
 void BroadcasterInterface_free(LDKBroadcasterInterface this_ptr);
 
+LDKConfirmationTarget ConfirmationTarget_clone(const LDKConfirmationTarget *orig);
+
 /**
  * Calls the free function if one is set
  */
@@ -3707,7 +3823,7 @@ void ChainMonitor_block_disconnected(const LDKChainMonitor *this_arg, const uint
  *
  * [`chain::Filter`]: ../trait.Filter.html
  */
-MUST_USE_RES LDKChainMonitor ChainMonitor_new(LDKFilter *chain_source, LDKBroadcasterInterface broadcaster, LDKLogger logger, LDKFeeEstimator feeest);
+MUST_USE_RES LDKChainMonitor ChainMonitor_new(LDKFilter *chain_source, LDKBroadcasterInterface broadcaster, LDKLogger logger, LDKFeeEstimator feeest, LDKPersist persister);
 
 LDKWatch ChainMonitor_as_Watch(const LDKChainMonitor *this_arg);
 
@@ -3715,25 +3831,39 @@ LDKEventsProvider ChainMonitor_as_EventsProvider(const LDKChainMonitor *this_arg
 
 void ChannelMonitorUpdate_free(LDKChannelMonitorUpdate this_ptr);
 
+LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const LDKChannelMonitorUpdate *orig);
+
 /**
  * The sequence number of this update. Updates *must* be replayed in-order according to this
  * sequence number (and updates may panic if they are not). The update_id values are strictly
- * increasing and increase by one for each new update.
+ * increasing and increase by one for each new update, with one exception specified below.
  *
  * This sequence number is also used to track up to which points updates which returned
  * ChannelMonitorUpdateErr::TemporaryFailure have been applied to all copies of a given
  * ChannelMonitor when ChannelManager::channel_monitor_updated is called.
+ *
+ * The only instance where update_id values are not strictly increasing is the case where we
+ * allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
+ * its docs for more details.
+ *
+ * [`CLOSED_CHANNEL_UPDATE_ID`]: constant.CLOSED_CHANNEL_UPDATE_ID.html
  */
 uint64_t ChannelMonitorUpdate_get_update_id(const LDKChannelMonitorUpdate *this_ptr);
 
 /**
  * The sequence number of this update. Updates *must* be replayed in-order according to this
  * sequence number (and updates may panic if they are not). The update_id values are strictly
- * increasing and increase by one for each new update.
+ * increasing and increase by one for each new update, with one exception specified below.
  *
  * This sequence number is also used to track up to which points updates which returned
  * ChannelMonitorUpdateErr::TemporaryFailure have been applied to all copies of a given
  * ChannelMonitor when ChannelManager::channel_monitor_updated is called.
+ *
+ * The only instance where update_id values are not strictly increasing is the case where we
+ * allow post-force-close updates with a special update ID of [`CLOSED_CHANNEL_UPDATE_ID`]. See
+ * its docs for more details.
+ *
+ * [`CLOSED_CHANNEL_UPDATE_ID`]: constant.CLOSED_CHANNEL_UPDATE_ID.html
  */
 void ChannelMonitorUpdate_set_update_id(LDKChannelMonitorUpdate *this_ptr, uint64_t val);
 
@@ -3741,12 +3871,18 @@ LDKCVec_u8Z ChannelMonitorUpdate_write(const LDKChannelMonitorUpdate *obj);
 
 LDKChannelMonitorUpdate ChannelMonitorUpdate_read(LDKu8slice ser);
 
+LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const LDKChannelMonitorUpdateErr *orig);
+
 void MonitorUpdateError_free(LDKMonitorUpdateError this_ptr);
 
 void MonitorEvent_free(LDKMonitorEvent this_ptr);
 
+LDKMonitorEvent MonitorEvent_clone(const LDKMonitorEvent *orig);
+
 void HTLCUpdate_free(LDKHTLCUpdate this_ptr);
 
+LDKHTLCUpdate HTLCUpdate_clone(const LDKHTLCUpdate *orig);
+
 LDKCVec_u8Z HTLCUpdate_write(const LDKHTLCUpdate *obj);
 
 LDKHTLCUpdate HTLCUpdate_read(LDKu8slice ser);
@@ -3759,7 +3895,7 @@ void ChannelMonitor_free(LDKChannelMonitor this_ptr);
  *
  * panics if the given update is not the next update by update_id.
  */
-MUST_USE_RES LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(LDKChannelMonitor *this_arg, LDKChannelMonitorUpdate updates, const LDKBroadcasterInterface *broadcaster, const LDKLogger *logger);
+MUST_USE_RES LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(LDKChannelMonitor *this_arg, const LDKChannelMonitorUpdate *updates, const LDKBroadcasterInterface *broadcaster, const LDKFeeEstimator *fee_estimator, const LDKLogger *logger);
 
 /**
  * Gets the update_id from the latest ChannelMonitorUpdate which was applied to this
@@ -3816,7 +3952,7 @@ MUST_USE_RES LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_tx
  *
  * [`get_outputs_to_watch`]: #method.get_outputs_to_watch
  */
-MUST_USE_RES LDKCVec_C2Tuple_TxidCVec_TxOutZZZ ChannelMonitor_block_connected(LDKChannelMonitor *this_arg, const uint8_t (*header)[80], LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, LDKBroadcasterInterface broadcaster, LDKFeeEstimator fee_estimator, LDKLogger logger);
+MUST_USE_RES LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(LDKChannelMonitor *this_arg, const uint8_t (*header)[80], LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, LDKBroadcasterInterface broadcaster, LDKFeeEstimator fee_estimator, LDKLogger logger);
 
 /**
  * Determines if the disconnected block contained any transactions of interest and updates
@@ -3824,8 +3960,15 @@ MUST_USE_RES LDKCVec_C2Tuple_TxidCVec_TxOutZZZ ChannelMonitor_block_connected(LD
  */
 void ChannelMonitor_block_disconnected(LDKChannelMonitor *this_arg, const uint8_t (*header)[80], uint32_t height, LDKBroadcasterInterface broadcaster, LDKFeeEstimator fee_estimator, LDKLogger logger);
 
+/**
+ * Calls the free function if one is set
+ */
+void Persist_free(LDKPersist this_ptr);
+
 void OutPoint_free(LDKOutPoint this_ptr);
 
+LDKOutPoint OutPoint_clone(const LDKOutPoint *orig);
+
 /**
  * The referenced transaction's txid.
  */
@@ -3859,6 +4002,10 @@ LDKOutPoint OutPoint_read(LDKu8slice ser);
 
 void SpendableOutputDescriptor_free(LDKSpendableOutputDescriptor this_ptr);
 
+LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const LDKSpendableOutputDescriptor *orig);
+
+LDKChannelKeys ChannelKeys_clone(const LDKChannelKeys *orig);
+
 /**
  * Calls the free function if one is set
  */
@@ -3871,6 +4018,8 @@ void KeysInterface_free(LDKKeysInterface this_ptr);
 
 void InMemoryChannelKeys_free(LDKInMemoryChannelKeys this_ptr);
 
+LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const LDKInMemoryChannelKeys *orig);
+
 /**
  * Private key of anchor tx
  */
@@ -4005,6 +4154,8 @@ void ChannelManager_free(LDKChannelManager this_ptr);
 
 void ChannelDetails_free(LDKChannelDetails this_ptr);
 
+LDKChannelDetails ChannelDetails_clone(const LDKChannelDetails *orig);
+
 /**
  * The channel's ID (prior to funding transaction generation, this is a random 32 bytes,
  * thereafter this is the txid of the funding transaction xor the funding transaction output).
@@ -4444,8 +4595,12 @@ void DecodeError_free(LDKDecodeError this_ptr);
 
 void Init_free(LDKInit this_ptr);
 
+LDKInit Init_clone(const LDKInit *orig);
+
 void ErrorMessage_free(LDKErrorMessage this_ptr);
 
+LDKErrorMessage ErrorMessage_clone(const LDKErrorMessage *orig);
+
 /**
  * The channel ID involved in the error
  */
@@ -4476,6 +4631,8 @@ MUST_USE_RES LDKErrorMessage ErrorMessage_new(LDKThirtyTwoBytes channel_id_arg,
 
 void Ping_free(LDKPing this_ptr);
 
+LDKPing Ping_clone(const LDKPing *orig);
+
 /**
  * The desired response length
  */
@@ -4502,6 +4659,8 @@ MUST_USE_RES LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
 
 void Pong_free(LDKPong this_ptr);
 
+LDKPong Pong_clone(const LDKPong *orig);
+
 /**
  * The pong packet size.
  * This field is not sent on the wire. byteslen zeros are sent.
@@ -4518,6 +4677,8 @@ MUST_USE_RES LDKPong Pong_new(uint16_t byteslen_arg);
 
 void OpenChannel_free(LDKOpenChannel this_ptr);
 
+LDKOpenChannel OpenChannel_clone(const LDKOpenChannel *orig);
+
 /**
  * The genesis hash of the blockchain where the channel is to be opened
  */
@@ -4700,6 +4861,8 @@ void OpenChannel_set_channel_flags(LDKOpenChannel *this_ptr, uint8_t val);
 
 void AcceptChannel_free(LDKAcceptChannel this_ptr);
 
+LDKAcceptChannel AcceptChannel_clone(const LDKAcceptChannel *orig);
+
 /**
  * A temporary channel ID, until the funding outpoint is announced
  */
@@ -4842,6 +5005,8 @@ void AcceptChannel_set_first_per_commitment_point(LDKAcceptChannel *this_ptr, LD
 
 void FundingCreated_free(LDKFundingCreated this_ptr);
 
+LDKFundingCreated FundingCreated_clone(const LDKFundingCreated *orig);
+
 /**
  * A temporary channel ID, until the funding is established
  */
@@ -4886,6 +5051,8 @@ MUST_USE_RES LDKFundingCreated FundingCreated_new(LDKThirtyTwoBytes temporary_ch
 
 void FundingSigned_free(LDKFundingSigned this_ptr);
 
+LDKFundingSigned FundingSigned_clone(const LDKFundingSigned *orig);
+
 /**
  * The channel ID
  */
@@ -4910,6 +5077,8 @@ MUST_USE_RES LDKFundingSigned FundingSigned_new(LDKThirtyTwoBytes channel_id_arg
 
 void FundingLocked_free(LDKFundingLocked this_ptr);
 
+LDKFundingLocked FundingLocked_clone(const LDKFundingLocked *orig);
+
 /**
  * The channel ID
  */
@@ -4934,6 +5103,8 @@ MUST_USE_RES LDKFundingLocked FundingLocked_new(LDKThirtyTwoBytes channel_id_arg
 
 void Shutdown_free(LDKShutdown this_ptr);
 
+LDKShutdown Shutdown_clone(const LDKShutdown *orig);
+
 /**
  * The channel ID
  */
@@ -4960,6 +5131,8 @@ MUST_USE_RES LDKShutdown Shutdown_new(LDKThirtyTwoBytes channel_id_arg, LDKCVec_
 
 void ClosingSigned_free(LDKClosingSigned this_ptr);
 
+LDKClosingSigned ClosingSigned_clone(const LDKClosingSigned *orig);
+
 /**
  * The channel ID
  */
@@ -4994,6 +5167,8 @@ MUST_USE_RES LDKClosingSigned ClosingSigned_new(LDKThirtyTwoBytes channel_id_arg
 
 void UpdateAddHTLC_free(LDKUpdateAddHTLC this_ptr);
 
+LDKUpdateAddHTLC UpdateAddHTLC_clone(const LDKUpdateAddHTLC *orig);
+
 /**
  * The channel ID
  */
@@ -5046,6 +5221,8 @@ void UpdateAddHTLC_set_cltv_expiry(LDKUpdateAddHTLC *this_ptr, uint32_t val);
 
 void UpdateFulfillHTLC_free(LDKUpdateFulfillHTLC this_ptr);
 
+LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const LDKUpdateFulfillHTLC *orig);
+
 /**
  * The channel ID
  */
@@ -5080,6 +5257,8 @@ MUST_USE_RES LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(LDKThirtyTwoBytes channe
 
 void UpdateFailHTLC_free(LDKUpdateFailHTLC this_ptr);
 
+LDKUpdateFailHTLC UpdateFailHTLC_clone(const LDKUpdateFailHTLC *orig);
+
 /**
  * The channel ID
  */
@@ -5102,6 +5281,8 @@ void UpdateFailHTLC_set_htlc_id(LDKUpdateFailHTLC *this_ptr, uint64_t val);
 
 void UpdateFailMalformedHTLC_free(LDKUpdateFailMalformedHTLC this_ptr);
 
+LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const LDKUpdateFailMalformedHTLC *orig);
+
 /**
  * The channel ID
  */
@@ -5134,6 +5315,8 @@ void UpdateFailMalformedHTLC_set_failure_code(LDKUpdateFailMalformedHTLC *this_p
 
 void CommitmentSigned_free(LDKCommitmentSigned this_ptr);
 
+LDKCommitmentSigned CommitmentSigned_clone(const LDKCommitmentSigned *orig);
+
 /**
  * The channel ID
  */
@@ -5163,6 +5346,8 @@ MUST_USE_RES LDKCommitmentSigned CommitmentSigned_new(LDKThirtyTwoBytes channel_
 
 void RevokeAndACK_free(LDKRevokeAndACK this_ptr);
 
+LDKRevokeAndACK RevokeAndACK_clone(const LDKRevokeAndACK *orig);
+
 /**
  * The channel ID
  */
@@ -5197,6 +5382,8 @@ MUST_USE_RES LDKRevokeAndACK RevokeAndACK_new(LDKThirtyTwoBytes channel_id_arg,
 
 void UpdateFee_free(LDKUpdateFee this_ptr);
 
+LDKUpdateFee UpdateFee_clone(const LDKUpdateFee *orig);
+
 /**
  * The channel ID
  */
@@ -5221,6 +5408,8 @@ MUST_USE_RES LDKUpdateFee UpdateFee_new(LDKThirtyTwoBytes channel_id_arg, uint32
 
 void DataLossProtect_free(LDKDataLossProtect this_ptr);
 
+LDKDataLossProtect DataLossProtect_clone(const LDKDataLossProtect *orig);
+
 /**
  * Proof that the sender knows the per-commitment secret of a specific commitment transaction
  * belonging to the recipient
@@ -5247,6 +5436,8 @@ MUST_USE_RES LDKDataLossProtect DataLossProtect_new(LDKThirtyTwoBytes your_last_
 
 void ChannelReestablish_free(LDKChannelReestablish this_ptr);
 
+LDKChannelReestablish ChannelReestablish_clone(const LDKChannelReestablish *orig);
+
 /**
  * The channel ID
  */
@@ -5279,6 +5470,8 @@ void ChannelReestablish_set_next_remote_commitment_number(LDKChannelReestablish
 
 void AnnouncementSignatures_free(LDKAnnouncementSignatures this_ptr);
 
+LDKAnnouncementSignatures AnnouncementSignatures_clone(const LDKAnnouncementSignatures *orig);
+
 /**
  * The channel ID
  */
@@ -5323,8 +5516,12 @@ MUST_USE_RES LDKAnnouncementSignatures AnnouncementSignatures_new(LDKThirtyTwoBy
 
 void NetAddress_free(LDKNetAddress this_ptr);
 
+LDKNetAddress NetAddress_clone(const LDKNetAddress *orig);
+
 void UnsignedNodeAnnouncement_free(LDKUnsignedNodeAnnouncement this_ptr);
 
+LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const LDKUnsignedNodeAnnouncement *orig);
+
 /**
  * The advertised features
  */
@@ -5386,6 +5583,8 @@ void UnsignedNodeAnnouncement_set_addresses(LDKUnsignedNodeAnnouncement *this_pt
 
 void NodeAnnouncement_free(LDKNodeAnnouncement this_ptr);
 
+LDKNodeAnnouncement NodeAnnouncement_clone(const LDKNodeAnnouncement *orig);
+
 /**
  * The signature by the node key
  */
@@ -5410,6 +5609,8 @@ MUST_USE_RES LDKNodeAnnouncement NodeAnnouncement_new(LDKSignature signature_arg
 
 void UnsignedChannelAnnouncement_free(LDKUnsignedChannelAnnouncement this_ptr);
 
+LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const LDKUnsignedChannelAnnouncement *orig);
+
 /**
  * The advertised channel features
  */
@@ -5482,6 +5683,8 @@ void UnsignedChannelAnnouncement_set_bitcoin_key_2(LDKUnsignedChannelAnnouncemen
 
 void ChannelAnnouncement_free(LDKChannelAnnouncement this_ptr);
 
+LDKChannelAnnouncement ChannelAnnouncement_clone(const LDKChannelAnnouncement *orig);
+
 /**
  * Authentication of the announcement by the first public node
  */
@@ -5536,6 +5739,8 @@ MUST_USE_RES LDKChannelAnnouncement ChannelAnnouncement_new(LDKSignature node_si
 
 void UnsignedChannelUpdate_free(LDKUnsignedChannelUpdate this_ptr);
 
+LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const LDKUnsignedChannelUpdate *orig);
+
 /**
  * The genesis hash of the blockchain where the channel is to be opened
  */
@@ -5618,6 +5823,8 @@ void UnsignedChannelUpdate_set_fee_proportional_millionths(LDKUnsignedChannelUpd
 
 void ChannelUpdate_free(LDKChannelUpdate this_ptr);
 
+LDKChannelUpdate ChannelUpdate_clone(const LDKChannelUpdate *orig);
+
 /**
  * A signature of the channel update
  */
@@ -5642,6 +5849,8 @@ MUST_USE_RES LDKChannelUpdate ChannelUpdate_new(LDKSignature signature_arg, LDKU
 
 void QueryChannelRange_free(LDKQueryChannelRange this_ptr);
 
+LDKQueryChannelRange QueryChannelRange_clone(const LDKQueryChannelRange *orig);
+
 /**
  * The genesis hash of the blockchain being queried
  */
@@ -5676,6 +5885,8 @@ MUST_USE_RES LDKQueryChannelRange QueryChannelRange_new(LDKThirtyTwoBytes chain_
 
 void ReplyChannelRange_free(LDKReplyChannelRange this_ptr);
 
+LDKReplyChannelRange ReplyChannelRange_clone(const LDKReplyChannelRange *orig);
+
 /**
  * The genesis hash of the blockchain being queried
  */
@@ -5727,6 +5938,8 @@ MUST_USE_RES LDKReplyChannelRange ReplyChannelRange_new(LDKThirtyTwoBytes chain_
 
 void QueryShortChannelIds_free(LDKQueryShortChannelIds this_ptr);
 
+LDKQueryShortChannelIds QueryShortChannelIds_clone(const LDKQueryShortChannelIds *orig);
+
 /**
  * The genesis hash of the blockchain being queried
  */
@@ -5746,6 +5959,8 @@ MUST_USE_RES LDKQueryShortChannelIds QueryShortChannelIds_new(LDKThirtyTwoBytes
 
 void ReplyShortChannelIdsEnd_free(LDKReplyShortChannelIdsEnd this_ptr);
 
+LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const LDKReplyShortChannelIdsEnd *orig);
+
 /**
  * The genesis hash of the blockchain that was queried
  */
@@ -5772,6 +5987,8 @@ MUST_USE_RES LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(LDKThirtyTwo
 
 void GossipTimestampFilter_free(LDKGossipTimestampFilter this_ptr);
 
+LDKGossipTimestampFilter GossipTimestampFilter_clone(const LDKGossipTimestampFilter *orig);
+
 /**
  * The genesis hash of the blockchain for channel and node information
  */
@@ -5806,6 +6023,8 @@ MUST_USE_RES LDKGossipTimestampFilter GossipTimestampFilter_new(LDKThirtyTwoByte
 
 void ErrorAction_free(LDKErrorAction this_ptr);
 
+LDKErrorAction ErrorAction_clone(const LDKErrorAction *orig);
+
 void LightningError_free(LDKLightningError this_ptr);
 
 /**
@@ -5832,6 +6051,8 @@ MUST_USE_RES LDKLightningError LightningError_new(LDKCVec_u8Z err_arg, LDKErrorA
 
 void CommitmentUpdate_free(LDKCommitmentUpdate this_ptr);
 
+LDKCommitmentUpdate CommitmentUpdate_clone(const LDKCommitmentUpdate *orig);
+
 /**
  * update_add_htlc messages which should be sent
  */
@@ -5876,6 +6097,8 @@ MUST_USE_RES LDKCommitmentUpdate CommitmentUpdate_new(LDKCVec_UpdateAddHTLCZ upd
 
 void HTLCFailChannelUpdate_free(LDKHTLCFailChannelUpdate this_ptr);
 
+LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const LDKHTLCFailChannelUpdate *orig);
+
 /**
  * Calls the free function if one is set
  */
@@ -6038,6 +6261,8 @@ void MessageHandler_set_route_handler(LDKMessageHandler *this_ptr, LDKRoutingMes
 
 MUST_USE_RES LDKMessageHandler MessageHandler_new(LDKChannelMessageHandler chan_handler_arg, LDKRoutingMessageHandler route_handler_arg);
 
+LDKSocketDescriptor SocketDescriptor_clone(const LDKSocketDescriptor *orig);
+
 /**
  * Calls the free function if one is set
  */
@@ -6212,6 +6437,8 @@ LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(LDKPublicKey per_com
 
 void TxCreationKeys_free(LDKTxCreationKeys this_ptr);
 
+LDKTxCreationKeys TxCreationKeys_clone(const LDKTxCreationKeys *orig);
+
 /**
  * The broadcaster's per-commitment public key which was used to derive the other keys.
  */
@@ -6274,6 +6501,8 @@ LDKTxCreationKeys TxCreationKeys_read(LDKu8slice ser);
 
 void PreCalculatedTxCreationKeys_free(LDKPreCalculatedTxCreationKeys this_ptr);
 
+LDKPreCalculatedTxCreationKeys PreCalculatedTxCreationKeys_clone(const LDKPreCalculatedTxCreationKeys *orig);
+
 /**
  * Create a new PreCalculatedTxCreationKeys from TxCreationKeys
  */
@@ -6292,6 +6521,8 @@ MUST_USE_RES LDKPublicKey PreCalculatedTxCreationKeys_per_commitment_point(const
 
 void ChannelPublicKeys_free(LDKChannelPublicKeys this_ptr);
 
+LDKChannelPublicKeys ChannelPublicKeys_clone(const LDKChannelPublicKeys *orig);
+
 /**
  * The public key which is used to sign all commitment transactions, as it appears in the
  * on-chain channel lock-in 2-of-2 multisig output.
@@ -6380,6 +6611,8 @@ LDKCVec_u8Z get_revokeable_redeemscript(LDKPublicKey revocation_key, uint16_t co
 
 void HTLCOutputInCommitment_free(LDKHTLCOutputInCommitment this_ptr);
 
+LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const LDKHTLCOutputInCommitment *orig);
+
 /**
  * Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction).
  * Note that this is not the same as whether it is ountbound *from us*. To determine that you
@@ -6451,6 +6684,8 @@ LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[32], uint32_t f
 
 void HolderCommitmentTransaction_free(LDKHolderCommitmentTransaction this_ptr);
 
+LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const LDKHolderCommitmentTransaction *orig);
+
 /**
  * The commitment transaction itself, in unsigned form.
  */
@@ -6550,6 +6785,8 @@ void ChannelFeatures_free(LDKChannelFeatures this_ptr);
 
 void RouteHop_free(LDKRouteHop this_ptr);
 
+LDKRouteHop RouteHop_clone(const LDKRouteHop *orig);
+
 /**
  * The node_id of the node at this hop.
  */
@@ -6620,6 +6857,8 @@ MUST_USE_RES LDKRouteHop RouteHop_new(LDKPublicKey pubkey_arg, LDKNodeFeatures n
 
 void Route_free(LDKRoute this_ptr);
 
+LDKRoute Route_clone(const LDKRoute *orig);
+
 /**
  * The list of routes taken for a single (potentially-)multi-part payment. The pubkey of the
  * last RouteHop in each path must be the same.
@@ -6638,6 +6877,8 @@ LDKRoute Route_read(LDKu8slice ser);
 
 void RouteHint_free(LDKRouteHint this_ptr);
 
+LDKRouteHint RouteHint_clone(const LDKRouteHint *orig);
+
 /**
  * The node_id of the non-target end of the route
  */
@@ -6884,6 +7125,8 @@ LDKChannelInfo ChannelInfo_read(LDKu8slice ser);
 
 void RoutingFees_free(LDKRoutingFees this_ptr);
 
+LDKRoutingFees RoutingFees_clone(const LDKRoutingFees *orig);
+
 /**
  * Flat routing fee in satoshis
  */
@@ -7037,6 +7280,46 @@ LDKNetworkGraph NetworkGraph_read(LDKu8slice ser);
  */
 MUST_USE_RES LDKNetworkGraph NetworkGraph_new(void);
 
+/**
+ * For an already known node (from channel announcements), update its stored properties from a
+ * given node announcement.
+ *
+ * You probably don't want to call this directly, instead relying on a NetGraphMsgHandler's
+ * RoutingMessageHandler implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ */
+MUST_USE_RES LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(LDKNetworkGraph *this_arg, const LDKNodeAnnouncement *msg);
+
+/**
+ * For an already known node (from channel announcements), update its stored properties from a
+ * given node announcement without verifying the associated signatures. Because we aren't
+ * given the associated signatures here we cannot relay the node announcement to any of our
+ * peers.
+ */
+MUST_USE_RES LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(LDKNetworkGraph *this_arg, const LDKUnsignedNodeAnnouncement *msg);
+
+/**
+ * Store or update channel info from a channel announcement.
+ *
+ * You probably don't want to call this directly, instead relying on a NetGraphMsgHandler's
+ * RoutingMessageHandler implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ *
+ * If a `chain::Access` object is provided via `chain_access`, it will be called to verify
+ * the corresponding UTXO exists on chain and is correctly-formatted.
+ */
+MUST_USE_RES LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(LDKNetworkGraph *this_arg, const LDKChannelAnnouncement *msg, LDKAccess *chain_access);
+
+/**
+ * Store or update channel info from a channel announcement without verifying the associated
+ * signatures. Because we aren't given the associated signatures here we cannot relay the
+ * channel announcement to any of our peers.
+ *
+ * If a `chain::Access` object is provided via `chain_access`, it will be called to verify
+ * the corresponding UTXO exists on chain and is correctly-formatted.
+ */
+MUST_USE_RES LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(LDKNetworkGraph *this_arg, const LDKUnsignedChannelAnnouncement *msg, LDKAccess *chain_access);
+
 /**
  * Close a channel if a corresponding HTLC fail was sent.
  * If permanent, removes a channel from the local storage.
@@ -7045,4 +7328,21 @@ MUST_USE_RES LDKNetworkGraph NetworkGraph_new(void);
  */
 void NetworkGraph_close_channel_from_update(LDKNetworkGraph *this_arg, uint64_t short_channel_id, bool is_permanent);
 
+/**
+ * For an already known (from announcement) channel, update info about one of the directions
+ * of the channel.
+ *
+ * You probably don't want to call this directly, instead relying on a NetGraphMsgHandler's
+ * RoutingMessageHandler implementation to call it indirectly. This may be useful to accept
+ * routing messages from a source using a protocol other than the lightning P2P protocol.
+ */
+MUST_USE_RES LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(LDKNetworkGraph *this_arg, const LDKChannelUpdate *msg);
+
+/**
+ * For an already known (from announcement) channel, update info about one of the directions
+ * of the channel without verifying the associated signatures. Because we aren't given the
+ * associated signatures here we cannot relay the channel update to any of our peers.
+ */
+MUST_USE_RES LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(LDKNetworkGraph *this_arg, const LDKUnsignedChannelUpdate *msg);
+
 /* Text to put at the end of the generated file */