Merge pull request #801 from TheBlueMatt/2021-02-789-bindings
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Fri, 19 Feb 2021 20:42:17 +0000 (12:42 -0800)
committerGitHub <noreply@github.com>
Fri, 19 Feb 2021 20:42:17 +0000 (12:42 -0800)
Bindings updates for 789

20 files changed:
c-bindings-gen/src/main.rs
c-bindings-gen/src/types.rs
lightning-c-bindings/demo.c
lightning-c-bindings/demo.cpp
lightning-c-bindings/include/lightning.h
lightning-c-bindings/include/lightningpp.hpp
lightning-c-bindings/include/rust_types.h
lightning-c-bindings/src/c_types/derived.rs
lightning-c-bindings/src/chain/chainmonitor.rs
lightning-c-bindings/src/chain/channelmonitor.rs
lightning-c-bindings/src/chain/keysinterface.rs
lightning-c-bindings/src/chain/mod.rs
lightning-c-bindings/src/ln/chan_utils.rs
lightning-c-bindings/src/ln/channelmanager.rs
lightning-c-bindings/src/ln/peer_handler.rs
lightning-c-bindings/src/routing/network_graph.rs
lightning-c-bindings/src/util/events.rs
lightning/src/chain/keysinterface.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/msgs.rs

index e919dc758283d8f7bacd78ba678b398e4d1f903c..a40875d95cf83209bb7ec2008b76c9b54012f853 100644 (file)
@@ -1076,6 +1076,17 @@ fn writeln_enum<'a, 'b, W: std::io::Write>(w: &mut W, e: &'a syn::ItemEnum, type
                                writeln!(w, ",").unwrap();
                        }
                        write!(w, "\t}}").unwrap();
+               } else if let syn::Fields::Unnamed(fields) = &var.fields {
+                       needs_free = true;
+                       write!(w, "(").unwrap();
+                       for (idx, field) in fields.unnamed.iter().enumerate() {
+                               if export_status(&field.attrs) == ExportStatus::TestOnly { continue; }
+                               types.write_c_type(w, &field.ty, None, false);
+                               if idx != fields.unnamed.len() - 1 {
+                                       write!(w, ",").unwrap();
+                               }
+                       }
+                       write!(w, ")").unwrap();
                }
                if var.discriminant.is_some() { unimplemented!(); }
                writeln!(w, ",").unwrap();
@@ -1094,28 +1105,35 @@ fn writeln_enum<'a, 'b, W: std::io::Write>(w: &mut W, e: &'a syn::ItemEnum, type
                                                write!(w, "{}{}, ", if $ref { "ref " } else { "mut " }, field.ident.as_ref().unwrap()).unwrap();
                                        }
                                        write!(w, "}} ").unwrap();
+                               } else if let syn::Fields::Unnamed(fields) = &var.fields {
+                                       write!(w, "(").unwrap();
+                                       for (idx, field) in fields.unnamed.iter().enumerate() {
+                                               if export_status(&field.attrs) == ExportStatus::TestOnly { continue; }
+                                               write!(w, "{}{}, ", if $ref { "ref " } else { "mut " }, ('a' as u8 + idx as u8) as char).unwrap();
+                                       }
+                                       write!(w, ") ").unwrap();
                                }
                                write!(w, "=>").unwrap();
-                               if let syn::Fields::Named(fields) = &var.fields {
-                                       write!(w, " {{\n\t\t\t\t").unwrap();
-                                       for field in fields.named.iter() {
-                                               if export_status(&field.attrs) == ExportStatus::TestOnly { continue; }
+
+                               macro_rules! handle_field_a {
+                                       ($field: expr, $field_ident: expr) => { {
+                                               if export_status(&$field.attrs) == ExportStatus::TestOnly { continue; }
                                                let mut sink = ::std::io::sink();
                                                let mut out: &mut dyn std::io::Write = if $ref { &mut sink } else { w };
                                                let new_var = if $to_c {
-                                                       types.write_to_c_conversion_new_var(&mut out, field.ident.as_ref().unwrap(), &field.ty, None, false)
+                                                       types.write_to_c_conversion_new_var(&mut out, $field_ident, &$field.ty, None, false)
                                                } else {
-                                                       types.write_from_c_conversion_new_var(&mut out, field.ident.as_ref().unwrap(), &field.ty, None)
+                                                       types.write_from_c_conversion_new_var(&mut out, $field_ident, &$field.ty, None)
                                                };
                                                if $ref || new_var {
                                                        if $ref {
-                                                               write!(w, "let mut {}_nonref = (*{}).clone();\n\t\t\t\t", field.ident.as_ref().unwrap(), field.ident.as_ref().unwrap()).unwrap();
+                                                               write!(w, "let mut {}_nonref = (*{}).clone();\n\t\t\t\t", $field_ident, $field_ident).unwrap();
                                                                if new_var {
-                                                                       let nonref_ident = syn::Ident::new(&format!("{}_nonref", field.ident.as_ref().unwrap()), Span::call_site());
+                                                                       let nonref_ident = syn::Ident::new(&format!("{}_nonref", $field_ident), Span::call_site());
                                                                        if $to_c {
-                                                                               types.write_to_c_conversion_new_var(w, &nonref_ident, &field.ty, None, false);
+                                                                               types.write_to_c_conversion_new_var(w, &nonref_ident, &$field.ty, None, false);
                                                                        } else {
-                                                                               types.write_from_c_conversion_new_var(w, &nonref_ident, &field.ty, None);
+                                                                               types.write_from_c_conversion_new_var(w, &nonref_ident, &$field.ty, None);
                                                                        }
                                                                        write!(w, "\n\t\t\t\t").unwrap();
                                                                }
@@ -1123,31 +1141,58 @@ fn writeln_enum<'a, 'b, W: std::io::Write>(w: &mut W, e: &'a syn::ItemEnum, type
                                                                write!(w, "\n\t\t\t\t").unwrap();
                                                        }
                                                }
+                                       } }
+                               }
+                               if let syn::Fields::Named(fields) = &var.fields {
+                                       write!(w, " {{\n\t\t\t\t").unwrap();
+                                       for field in fields.named.iter() {
+                                               handle_field_a!(field, field.ident.as_ref().unwrap());
+                                       }
+                               } else if let syn::Fields::Unnamed(fields) = &var.fields {
+                                       write!(w, " {{\n\t\t\t\t").unwrap();
+                                       for (idx, field) in fields.unnamed.iter().enumerate() {
+                                               handle_field_a!(field, &syn::Ident::new(&(('a' as u8 + idx as u8) as char).to_string(), Span::call_site()));
                                        }
                                } else { write!(w, " ").unwrap(); }
+
                                write!(w, "{}{}::{}", if $to_c { "" } else { "native" }, e.ident, var.ident).unwrap();
-                               if let syn::Fields::Named(fields) = &var.fields {
-                                       write!(w, " {{").unwrap();
-                                       for field in fields.named.iter() {
-                                               if export_status(&field.attrs) == ExportStatus::TestOnly { continue; }
-                                               write!(w, "\n\t\t\t\t\t{}: ", field.ident.as_ref().unwrap()).unwrap();
+
+                               macro_rules! handle_field_b {
+                                       ($field: expr, $field_ident: expr) => { {
+                                               if export_status(&$field.attrs) == ExportStatus::TestOnly { continue; }
                                                if $to_c {
-                                                       types.write_to_c_conversion_inline_prefix(w, &field.ty, None, false);
+                                                       types.write_to_c_conversion_inline_prefix(w, &$field.ty, None, false);
                                                } else {
-                                                       types.write_from_c_conversion_prefix(w, &field.ty, None);
+                                                       types.write_from_c_conversion_prefix(w, &$field.ty, None);
                                                }
-                                               write!(w, "{}{}",
-                                                       field.ident.as_ref().unwrap(),
+                                               write!(w, "{}{}", $field_ident,
                                                        if $ref { "_nonref" } else { "" }).unwrap();
                                                if $to_c {
-                                                       types.write_to_c_conversion_inline_suffix(w, &field.ty, None, false);
+                                                       types.write_to_c_conversion_inline_suffix(w, &$field.ty, None, false);
                                                } else {
-                                                       types.write_from_c_conversion_suffix(w, &field.ty, None);
+                                                       types.write_from_c_conversion_suffix(w, &$field.ty, None);
                                                }
                                                write!(w, ",").unwrap();
+                                       } }
+                               }
+
+                               if let syn::Fields::Named(fields) = &var.fields {
+                                       write!(w, " {{").unwrap();
+                                       for field in fields.named.iter() {
+                                               if export_status(&field.attrs) == ExportStatus::TestOnly { continue; }
+                                               write!(w, "\n\t\t\t\t\t{}: ", field.ident.as_ref().unwrap()).unwrap();
+                                               handle_field_b!(field, field.ident.as_ref().unwrap());
                                        }
                                        writeln!(w, "\n\t\t\t\t}}").unwrap();
                                        write!(w, "\t\t\t}}").unwrap();
+                               } else if let syn::Fields::Unnamed(fields) = &var.fields {
+                                       write!(w, " (").unwrap();
+                                       for (idx, field) in fields.unnamed.iter().enumerate() {
+                                               write!(w, "\n\t\t\t\t\t").unwrap();
+                                               handle_field_b!(field, &syn::Ident::new(&(('a' as u8 + idx as u8) as char).to_string(), Span::call_site()));
+                                       }
+                                       writeln!(w, "\n\t\t\t\t)").unwrap();
+                                       write!(w, "\t\t\t}}").unwrap();
                                }
                                writeln!(w, ",").unwrap();
                        }
index 2b195e2dcb957d630bf4478e3204fc5d76a895c5..e7244039f4bcc5a32ab230b9f0a22640c56f28fd 100644 (file)
@@ -114,16 +114,20 @@ pub fn assert_simple_bound(bound: &syn::TraitBound) {
 /// type), otherwise it is mapped into a transparent, C-compatible version of itself.
 pub fn is_enum_opaque(e: &syn::ItemEnum) -> bool {
        for var in e.variants.iter() {
-               if let syn::Fields::Unit = var.fields {
-               } else if let syn::Fields::Named(fields) = &var.fields {
+               if let syn::Fields::Named(fields) = &var.fields {
                        for field in fields.named.iter() {
                                match export_status(&field.attrs) {
                                        ExportStatus::Export|ExportStatus::TestOnly => {},
                                        ExportStatus::NoExport => return true,
                                }
                        }
-               } else {
-                       return true;
+               } else if let syn::Fields::Unnamed(fields) = &var.fields {
+                       for field in fields.unnamed.iter() {
+                               match export_status(&field.attrs) {
+                                       ExportStatus::Export|ExportStatus::TestOnly => {},
+                                       ExportStatus::NoExport => return true,
+                               }
+                       }
                }
        }
        false
@@ -963,7 +967,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
                                                ").into() }"))
                        },
                        "Vec" if !is_ref => {
-                               Some(("Vec::new(); for item in ", vec![(format!(".drain(..) {{ local_{}.push(", var_name), "item".to_string())], "); }"))
+                               Some(("Vec::new(); for mut item in ", vec![(format!(".drain(..) {{ local_{}.push(", var_name), "item".to_string())], "); }"))
                        },
                        "Slice" => {
                                Some(("Vec::new(); for item in ", vec![(format!(".iter() {{ local_{}.push(", var_name), "**item".to_string())], "); }"))
@@ -1004,8 +1008,8 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
                match full_path {
                        "Result" if !is_ref => {
                                Some(("match ",
-                                               vec![(".result_ok { true => Ok(".to_string(), format!("(*unsafe {{ Box::from_raw(<*mut _>::take_ptr(&mut {}.contents.result)) }})", var_name)),
-                                                    ("), false => Err(".to_string(), format!("(*unsafe {{ Box::from_raw(<*mut _>::take_ptr(&mut {}.contents.err)) }})", var_name))],
+                                               vec![(".result_ok { true => Ok(".to_string(), format!("(*unsafe {{ Box::from_raw(<*mut _>::take_ptr(&mut {}.contents.result)) }})", var_access)),
+                                                    ("), false => Err(".to_string(), format!("(*unsafe {{ Box::from_raw(<*mut _>::take_ptr(&mut {}.contents.err)) }})", var_access))],
                                                ")}"))
                        },
                        "Vec"|"Slice" if !is_ref => {
@@ -1018,9 +1022,9 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
                                if let Some(syn::Type::Path(p)) = single_contained {
                                        if self.c_type_has_inner_from_path(&self.resolve_path(&p.path, generics)) {
                                                if is_ref {
-                                                       return Some(("if ", vec![(".inner.is_null() { None } else { Some((*".to_string(), format!("{}", var_name))], ").clone()) }"))
+                                                       return Some(("if ", vec![(".inner.is_null() { None } else { Some((*".to_string(), format!("{}", var_access))], ").clone()) }"))
                                                } else {
-                                                       return Some(("if ", vec![(".inner.is_null() { None } else { Some(".to_string(), format!("{}", var_name))], ") }"));
+                                                       return Some(("if ", vec![(".inner.is_null() { None } else { Some(".to_string(), format!("{}", var_access))], ") }"));
                                                }
                                        }
                                }
index 0f8bd102a48189be60b5156a686297a54fd2ac60..3f7c4be9d2fe2b9307d51173f15702c995a5949e 100644 (file)
@@ -68,7 +68,7 @@ int main() {
                .free = NULL,
        };
 
-       LDKKeysManager keys = KeysManager_new(&node_seed, net, 0, 0);
+       LDKKeysManager keys = KeysManager_new(&node_seed, 0, 0);
        LDKKeysInterface keys_source = KeysManager_as_KeysInterface(&keys);
 
        LDKUserConfig config = UserConfig_default();
index 32c8d605c119bbafb2a0137644a6de5f9b0bae39..d514946e214ff3dfaf60193a90cc08508db6fc37 100644 (file)
@@ -348,7 +348,7 @@ int main() {
                // Instantiate classes for node 1:
                uint8_t node_seed[32];
                memset(&node_seed, 0, 32);
-               LDK::KeysManager keys1 = KeysManager_new(&node_seed, network, 0, 0);
+               LDK::KeysManager keys1 = KeysManager_new(&node_seed, 0, 0);
                LDK::KeysInterface keys_source1 = KeysManager_as_KeysInterface(&keys1);
                node_secret1 = keys_source1->get_node_secret(keys_source1->this_arg);
 
@@ -370,7 +370,7 @@ int main() {
 
                // Instantiate classes for node 2:
                memset(&node_seed, 1, 32);
-               LDK::KeysManager keys2 = KeysManager_new(&node_seed, network, 0, 0);
+               LDK::KeysManager keys2 = KeysManager_new(&node_seed, 0, 0);
                LDK::KeysInterface keys_source2 = KeysManager_as_KeysInterface(&keys2);
                node_secret2 = keys_source2->get_node_secret(keys_source2->this_arg);
 
@@ -567,7 +567,7 @@ int main() {
        mons_list1->data[0].is_owned = false; // XXX: God this sucks
        uint8_t node_seed[32];
        memset(&node_seed, 0, 32);
-       LDK::KeysManager keys1 = KeysManager_new(&node_seed, network, 1, 0);
+       LDK::KeysManager keys1 = KeysManager_new(&node_seed, 1, 0);
        LDK::KeysInterface keys_source1 = KeysManager_as_KeysInterface(&keys1);
 
        LDK::ChannelManagerReadArgs cm1_args = ChannelManagerReadArgs_new(KeysManager_as_KeysInterface(&keys1), fee_est, mon1, broadcast, logger1, UserConfig_default(), std::move(mons_list1));
@@ -581,7 +581,7 @@ int main() {
        mons_list2->data[0] = *& std::get<1>(mons2.mons[0]); // Note that we need a reference, thus need a raw clone here, which *& does.
        mons_list2->data[0].is_owned = false; // XXX: God this sucks
        memset(&node_seed, 1, 32);
-       LDK::KeysManager keys2 = KeysManager_new(&node_seed, network, 1, 0);
+       LDK::KeysManager keys2 = KeysManager_new(&node_seed, 1, 0);
 
        LDK::ChannelManagerReadArgs cm2_args = ChannelManagerReadArgs_new(KeysManager_as_KeysInterface(&keys2), fee_est, mon2, broadcast, logger2, UserConfig_default(), std::move(mons_list2));
        LDK::CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ cm2_read =
index d5a8b3491c21bb2d36bfca3f01cc817428be74cf..fb39ee62312f1d3a177913641eb029dce1d7502e 100644 (file)
@@ -1551,21 +1551,20 @@ typedef struct LDKCResult_NoneChannelMonitorUpdateErrZ {
 
 
 /**
- * An event to be processed by the ChannelManager.
+ * Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on
+ * chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the
+ * preimage claim backward will lead to loss of funds.
+ *
+ * [`chain::Watch`]: ../trait.Watch.html
  */
-typedef struct MUST_USE_STRUCT LDKMonitorEvent {
+typedef struct MUST_USE_STRUCT LDKHTLCUpdate {
    /**
     * 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.
     */
-   LDKnativeMonitorEvent *inner;
+   LDKnativeHTLCUpdate *inner;
    bool is_owned;
-} LDKMonitorEvent;
-
-typedef struct LDKCVec_MonitorEventZ {
-   struct LDKMonitorEvent *data;
-   uintptr_t datalen;
-} LDKCVec_MonitorEventZ;
+} LDKHTLCUpdate;
 
 
 
@@ -1584,6 +1583,71 @@ typedef struct MUST_USE_STRUCT LDKOutPoint {
    bool is_owned;
 } LDKOutPoint;
 
+/**
+ * An event to be processed by the ChannelManager.
+ */
+typedef enum LDKMonitorEvent_Tag {
+   /**
+    * A monitor event containing an HTLCUpdate.
+    */
+   LDKMonitorEvent_HTLCEvent,
+   /**
+    * A monitor event that the Channel's commitment transaction was broadcasted.
+    */
+   LDKMonitorEvent_CommitmentTxBroadcasted,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKMonitorEvent_Sentinel,
+} LDKMonitorEvent_Tag;
+
+typedef struct MUST_USE_STRUCT LDKMonitorEvent {
+   LDKMonitorEvent_Tag tag;
+   union {
+      struct {
+         struct LDKHTLCUpdate htlc_event;
+      };
+      struct {
+         struct LDKOutPoint commitment_tx_broadcasted;
+      };
+   };
+} LDKMonitorEvent;
+
+typedef struct LDKCVec_MonitorEventZ {
+   struct LDKMonitorEvent *data;
+   uintptr_t datalen;
+} LDKCVec_MonitorEventZ;
+
+
+
+/**
+ * Information about a spendable output to a P2WSH script. See
+ * SpendableOutputDescriptor::DelayedPaymentOutput for more details on how to spend this.
+ */
+typedef struct MUST_USE_STRUCT LDKDelayedPaymentOutputDescriptor {
+   /**
+    * 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.
+    */
+   LDKnativeDelayedPaymentOutputDescriptor *inner;
+   bool is_owned;
+} LDKDelayedPaymentOutputDescriptor;
+
+
+
+/**
+ * Information about a spendable output to our \"payment key\". See
+ * SpendableOutputDescriptor::StaticPaymentOutput for more details on how to spend this.
+ */
+typedef struct MUST_USE_STRUCT LDKStaticPaymentOutputDescriptor {
+   /**
+    * 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.
+    */
+   LDKnativeStaticPaymentOutputDescriptor *inner;
+   bool is_owned;
+} LDKStaticPaymentOutputDescriptor;
+
 /**
  * When on-chain outputs are created by rust-lightning (which our counterparty is not able to
  * claim at any point in the future) an event is generated which you must track and be able to
@@ -1630,7 +1694,7 @@ typedef enum LDKSpendableOutputDescriptor_Tag {
     * (derived as above), and the to_self_delay contained here to
     * chan_utils::get_revokeable_redeemscript.
     */
-   LDKSpendableOutputDescriptor_DynamicOutputP2WSH,
+   LDKSpendableOutputDescriptor_DelayedPaymentOutput,
    /**
     * An output to a P2WPKH, spendable exclusively by our payment key (ie the private key which
     * corresponds to the public key in ChannelKeys::pubkeys().payment_point).
@@ -1640,7 +1704,7 @@ typedef enum LDKSpendableOutputDescriptor_Tag {
     * These are generally the result of our counterparty having broadcast the current state,
     * allowing us to claim the non-HTLC-encumbered outputs immediately.
     */
-   LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment,
+   LDKSpendableOutputDescriptor_StaticPaymentOutput,
    /**
     * Must be last for serialization purposes
     */
@@ -1652,29 +1716,16 @@ typedef struct LDKSpendableOutputDescriptor_LDKStaticOutput_Body {
    struct LDKTxOut output;
 } LDKSpendableOutputDescriptor_LDKStaticOutput_Body;
 
-typedef struct LDKSpendableOutputDescriptor_LDKDynamicOutputP2WSH_Body {
-   struct LDKOutPoint outpoint;
-   struct LDKPublicKey per_commitment_point;
-   uint16_t to_self_delay;
-   struct LDKTxOut output;
-   struct LDKPublicKey revocation_pubkey;
-   struct LDKThirtyTwoBytes channel_keys_id;
-   uint64_t channel_value_satoshis;
-} LDKSpendableOutputDescriptor_LDKDynamicOutputP2WSH_Body;
-
-typedef struct LDKSpendableOutputDescriptor_LDKStaticOutputCounterpartyPayment_Body {
-   struct LDKOutPoint outpoint;
-   struct LDKTxOut output;
-   struct LDKThirtyTwoBytes channel_keys_id;
-   uint64_t channel_value_satoshis;
-} LDKSpendableOutputDescriptor_LDKStaticOutputCounterpartyPayment_Body;
-
 typedef struct MUST_USE_STRUCT LDKSpendableOutputDescriptor {
    LDKSpendableOutputDescriptor_Tag tag;
    union {
       LDKSpendableOutputDescriptor_LDKStaticOutput_Body static_output;
-      LDKSpendableOutputDescriptor_LDKDynamicOutputP2WSH_Body dynamic_output_p2wsh;
-      LDKSpendableOutputDescriptor_LDKStaticOutputCounterpartyPayment_Body static_output_counterparty_payment;
+      struct {
+         struct LDKDelayedPaymentOutputDescriptor delayed_payment_output;
+      };
+      struct {
+         struct LDKStaticPaymentOutputDescriptor static_payment_output;
+      };
    };
 } LDKSpendableOutputDescriptor;
 
@@ -1838,24 +1889,6 @@ typedef struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ {
    bool result_ok;
 } LDKCResult_ChannelMonitorUpdateDecodeErrorZ;
 
-
-
-/**
- * Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on
- * chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the
- * preimage claim backward will lead to loss of funds.
- *
- * [`chain::Watch`]: ../trait.Watch.html
- */
-typedef struct MUST_USE_STRUCT LDKHTLCUpdate {
-   /**
-    * 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.
-    */
-   LDKnativeHTLCUpdate *inner;
-   bool is_owned;
-} LDKHTLCUpdate;
-
 typedef union LDKCResult_HTLCUpdateDecodeErrorZPtr {
    struct LDKHTLCUpdate *result;
    struct LDKDecodeError *err;
@@ -1990,11 +2023,6 @@ typedef struct MUST_USE_STRUCT LDKUnsignedChannelAnnouncement {
  * In any case, ChannelMonitor or fallback watchtowers are always going to be trusted
  * to act, as liveness and breach reply correctness are always going to be hard requirements
  * of LN security model, orthogonal of key management issues.
- *
- * If you're implementing a custom signer, you almost certainly want to implement
- * Readable/Writable to serialize out a unique reference to this set of keys so
- * that you can serialize the full ChannelManager object.
- *
  */
 typedef struct LDKChannelKeys {
    void *this_arg;
@@ -2013,7 +2041,6 @@ typedef struct LDKChannelKeys {
     * May be called more than once for the same index.
     *
     * Note that the commitment number starts at (1 << 48) - 1 and counts backwards.
-    * TODO: return a Result so we can signal a validation error
     */
    struct LDKThirtyTwoBytes (*release_commitment_secret)(const void *this_arg, uint64_t idx);
    /**
@@ -2268,6 +2295,16 @@ typedef struct LDKCResult_NoneAPIErrorZ {
    bool result_ok;
 } LDKCResult_NoneAPIErrorZ;
 
+typedef struct LDKCVec_CResult_NoneAPIErrorZZ {
+   struct LDKCResult_NoneAPIErrorZ *data;
+   uintptr_t datalen;
+} LDKCVec_CResult_NoneAPIErrorZZ;
+
+typedef struct LDKCVec_APIErrorZ {
+   struct LDKAPIError *data;
+   uintptr_t datalen;
+} LDKCVec_APIErrorZ;
+
 
 
 /**
@@ -2287,20 +2324,71 @@ typedef struct LDKCVec_ChannelDetailsZ {
    uintptr_t datalen;
 } LDKCVec_ChannelDetailsZ;
 
-
-
 /**
  * If a payment fails to send, it can be in one of several states. This enum is returned as the
  * Err() type describing which state the payment is in, see the description of individual enum
  * states for more.
  */
-typedef struct MUST_USE_STRUCT LDKPaymentSendFailure {
+typedef enum LDKPaymentSendFailure_Tag {
    /**
-    * 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.
+    * A parameter which was passed to send_payment was invalid, preventing us from attempting to
+    * send the payment at all. No channel state has been changed or messages sent to peers, and
+    * once you've changed the parameter at error, you can freely retry the payment in full.
     */
-   LDKnativePaymentSendFailure *inner;
-   bool is_owned;
+   LDKPaymentSendFailure_ParameterError,
+   /**
+    * A parameter in a single path which was passed to send_payment was invalid, preventing us
+    * from attempting to send the payment at all. No channel state has been changed or messages
+    * sent to peers, and once you've changed the parameter at error, you can freely retry the
+    * payment in full.
+    *
+    * The results here are ordered the same as the paths in the route object which was passed to
+    * send_payment.
+    */
+   LDKPaymentSendFailure_PathParameterError,
+   /**
+    * All paths which were attempted failed to send, with no channel state change taking place.
+    * You can freely retry the payment in full (though you probably want to do so over different
+    * paths than the ones selected).
+    */
+   LDKPaymentSendFailure_AllFailedRetrySafe,
+   /**
+    * Some paths which were attempted failed to send, though possibly not all. At least some
+    * paths have irrevocably committed to the HTLC and retrying the payment in full would result
+    * in over-/re-payment.
+    *
+    * The results here are ordered the same as the paths in the route object which was passed to
+    * send_payment, and any Errs which are not APIError::MonitorUpdateFailed can be safely
+    * retried (though there is currently no API with which to do so).
+    *
+    * Any entries which contain Err(APIError::MonitorUpdateFailed) or Ok(()) MUST NOT be retried
+    * as they will result in over-/re-payment. These HTLCs all either successfully sent (in the
+    * case of Ok(())) or will send once channel_monitor_updated is called on the next-hop channel
+    * with the latest update_id.
+    */
+   LDKPaymentSendFailure_PartialFailure,
+   /**
+    * Must be last for serialization purposes
+    */
+   LDKPaymentSendFailure_Sentinel,
+} LDKPaymentSendFailure_Tag;
+
+typedef struct MUST_USE_STRUCT LDKPaymentSendFailure {
+   LDKPaymentSendFailure_Tag tag;
+   union {
+      struct {
+         struct LDKAPIError parameter_error;
+      };
+      struct {
+         struct LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error;
+      };
+      struct {
+         struct LDKCVec_APIErrorZ all_failed_retry_safe;
+      };
+      struct {
+         struct LDKCVec_CResult_NoneAPIErrorZZ partial_failure;
+      };
+   };
 } LDKPaymentSendFailure;
 
 typedef union LDKCResult_NonePaymentSendFailureZPtr {
@@ -2565,6 +2653,24 @@ typedef struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ {
    bool result_ok;
 } LDKCResult_SpendableOutputDescriptorDecodeErrorZ;
 
+typedef struct LDKCVec_CVec_u8ZZ {
+   struct LDKCVec_u8Z *data;
+   uintptr_t datalen;
+} LDKCVec_CVec_u8ZZ;
+
+typedef union LDKCResult_CVec_CVec_u8ZZNoneZPtr {
+   struct LDKCVec_CVec_u8ZZ *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_CVec_CVec_u8ZZNoneZPtr;
+
+typedef struct LDKCResult_CVec_CVec_u8ZZNoneZ {
+   union LDKCResult_CVec_CVec_u8ZZNoneZPtr contents;
+   bool result_ok;
+} LDKCResult_CVec_CVec_u8ZZNoneZ;
+
 
 
 /**
@@ -2592,6 +2698,24 @@ typedef struct LDKCResult_InMemoryChannelKeysDecodeErrorZ {
    bool result_ok;
 } LDKCResult_InMemoryChannelKeysDecodeErrorZ;
 
+typedef struct LDKCVec_TxOutZ {
+   struct LDKTxOut *data;
+   uintptr_t datalen;
+} LDKCVec_TxOutZ;
+
+typedef union LDKCResult_TransactionNoneZPtr {
+   struct LDKTransaction *result;
+   /**
+    * Note that this value is always NULL, as there are no contents in the Err variant
+    */
+   void *err;
+} LDKCResult_TransactionNoneZPtr;
+
+typedef struct LDKCResult_TransactionNoneZ {
+   union LDKCResult_TransactionNoneZPtr contents;
+   bool result_ok;
+} LDKCResult_TransactionNoneZ;
+
 
 
 /**
@@ -3824,6 +3948,8 @@ extern const uint64_t MIN_RELAY_FEE_SAT_PER_1000_WEIGHT;
 
 extern const uint64_t CLOSED_CHANNEL_UPDATE_ID;
 
+extern const uintptr_t REVOKEABLE_REDEEMSCRIPT_MAX_LENGTH;
+
 void Transaction_free(struct LDKTransaction _res);
 
 void TxOut_free(struct LDKTxOut _res);
@@ -4158,6 +4284,10 @@ void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
 
 struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
 
+void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
+
+void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
+
 void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
 
 struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
@@ -4218,6 +4348,16 @@ void CResult_ChannelKeysDecodeErrorZ_free(struct LDKCResult_ChannelKeysDecodeErr
 
 struct LDKCResult_ChannelKeysDecodeErrorZ CResult_ChannelKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelKeysDecodeErrorZ *NONNULL_PTR orig);
 
+void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
+
+struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
+
+struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
+
+void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
+
+struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
+
 struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
 
 struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
@@ -4226,6 +4366,14 @@ void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChan
 
 struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_clone(const struct LDKCResult_InMemoryChannelKeysDecodeErrorZ *NONNULL_PTR orig);
 
+void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
+
+struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
+
+struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
+
+void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
+
 void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
 
 void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
@@ -5209,6 +5357,130 @@ struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
 
 struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
 
+void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_ptr);
+
+/**
+ * The outpoint which is spendable
+ */
+struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
+/**
+ * The outpoint which is spendable
+ */
+void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+
+/**
+ * Per commitment point to derive delayed_payment_key by key holder
+ */
+struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
+/**
+ * Per commitment point to derive delayed_payment_key by key holder
+ */
+void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * The nSequence value which must be set in the spending input to satisfy the OP_CSV in
+ * the witness_script.
+ */
+uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
+/**
+ * The nSequence value which must be set in the spending input to satisfy the OP_CSV in
+ * the witness_script.
+ */
+void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
+
+/**
+ * The output which is referenced by the given outpoint
+ */
+void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
+
+/**
+ * The revocation point specific to the commitment transaction which was broadcast. Used to
+ * derive the witnessScript for this output.
+ */
+struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
+/**
+ * The revocation point specific to the commitment transaction which was broadcast. Used to
+ * derive the witnessScript for this output.
+ */
+void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+
+/**
+ * Arbitrary identification information returned by a call to
+ * `ChannelKeys::channel_keys_id()`. This may be useful in re-deriving keys used in
+ * the channel to spend the output.
+ */
+const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
+
+/**
+ * Arbitrary identification information returned by a call to
+ * `ChannelKeys::channel_keys_id()`. This may be useful in re-deriving keys used in
+ * the channel to spend the output.
+ */
+void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * The value of the channel which this output originated from, possibly indirectly.
+ */
+uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
+/**
+ * The value of the channel which this output originated from, possibly indirectly.
+ */
+void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
+
+MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKPublicKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
+
+struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
+
+void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_ptr);
+
+/**
+ * The outpoint which is spendable
+ */
+struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
+/**
+ * The outpoint which is spendable
+ */
+void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+
+/**
+ * The output which is referenced by the given outpoint
+ */
+void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
+
+/**
+ * Arbitrary identification information returned by a call to
+ * `ChannelKeys::channel_keys_id()`. This may be useful in re-deriving keys used in
+ * the channel to spend the output.
+ */
+const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
+
+/**
+ * Arbitrary identification information returned by a call to
+ * `ChannelKeys::channel_keys_id()`. This may be useful in re-deriving keys used in
+ * the channel to spend the output.
+ */
+void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+
+/**
+ * The value of the channel which this transactions spends.
+ */
+uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+
+/**
+ * The value of the channel which this transactions spends.
+ */
+void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
+
+MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
+
+struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
+
 void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
 
 struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
@@ -5340,6 +5612,25 @@ MUST_USE_RES struct LDKOutPoint InMemoryChannelKeys_funding_outpoint(const struc
  */
 MUST_USE_RES struct LDKChannelTransactionParameters InMemoryChannelKeys_get_channel_parameters(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
 
+/**
+ * Sign the single input of spend_tx at index `input_idx` which spends the output
+ * described by descriptor, returning the witness stack for the input.
+ *
+ * Returns an Err if the input at input_idx does not exist, has a non-empty script_sig,
+ * or is not spending the outpoint described by `descriptor.outpoint`.
+ */
+MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemoryChannelKeys_sign_counterparty_payment_input(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
+
+/**
+ * Sign the single input of spend_tx at index `input_idx` which spends the output
+ * described by descriptor, returning the witness stack for the input.
+ *
+ * Returns an Err if the input at input_idx does not exist, has a non-empty script_sig,
+ * is not spending the outpoint described by `descriptor.outpoint`, or does not have a
+ * sequence set to `descriptor.to_self_delay`.
+ */
+MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemoryChannelKeys_sign_dynamic_p2wsh_input(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
+
 struct LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
 
 struct LDKCVec_u8Z InMemoryChannelKeys_write(const struct LDKInMemoryChannelKeys *NONNULL_PTR obj);
@@ -5369,7 +5660,7 @@ void KeysManager_free(struct LDKKeysManager this_ptr);
  * versions. Once the library is more fully supported, the docs will be updated to include a
  * detailed description of the guarantee.
  */
-MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], enum LDKNetwork network, uint64_t starting_time_secs, uint32_t starting_time_nanos);
+MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
 
 /**
  * Derive an old set of ChannelKeys for per-channel secrets based on a key derivation
@@ -5380,6 +5671,21 @@ MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], en
  */
 MUST_USE_RES struct LDKInMemoryChannelKeys KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
 
+/**
+ * Creates a Transaction which spends the given descriptors to the given outputs, plus an
+ * output to the given change destination (if sufficient change value remains). The
+ * transaction will have a feerate, at least, of the given value.
+ *
+ * Returns `Err(())` if the output value is greater than the input value minus required fee or
+ * if a descriptor was duplicated.
+ *
+ * We do not enforce that outputs meet the dust limit or that any output scripts are standard.
+ *
+ * May panic if the `SpendableOutputDescriptor`s were not generated by Channels which used
+ * this KeysManager or one of the `InMemoryChannelKeys` created by this KeysManager.
+ */
+MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight);
+
 struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
 
 void ChannelManager_free(struct LDKChannelManager this_ptr);
index 685517b9f60ceec8c5cbe4386d7e803c9917b106..81370fd12034e8a86a74719d5cd298dcc2bfba3b 100644 (file)
@@ -836,6 +836,36 @@ public:
        const LDKChannelManagerReadArgs* operator &() const { return &self; }
        const LDKChannelManagerReadArgs* operator ->() const { return &self; }
 };
+class DelayedPaymentOutputDescriptor {
+private:
+       LDKDelayedPaymentOutputDescriptor self;
+public:
+       DelayedPaymentOutputDescriptor(const DelayedPaymentOutputDescriptor&) = delete;
+       DelayedPaymentOutputDescriptor(DelayedPaymentOutputDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(DelayedPaymentOutputDescriptor)); }
+       DelayedPaymentOutputDescriptor(LDKDelayedPaymentOutputDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKDelayedPaymentOutputDescriptor)); }
+       operator LDKDelayedPaymentOutputDescriptor() && { LDKDelayedPaymentOutputDescriptor res = self; memset(&self, 0, sizeof(LDKDelayedPaymentOutputDescriptor)); return res; }
+       ~DelayedPaymentOutputDescriptor() { DelayedPaymentOutputDescriptor_free(self); }
+       DelayedPaymentOutputDescriptor& operator=(DelayedPaymentOutputDescriptor&& o) { DelayedPaymentOutputDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(DelayedPaymentOutputDescriptor)); return *this; }
+       LDKDelayedPaymentOutputDescriptor* operator &() { return &self; }
+       LDKDelayedPaymentOutputDescriptor* operator ->() { return &self; }
+       const LDKDelayedPaymentOutputDescriptor* operator &() const { return &self; }
+       const LDKDelayedPaymentOutputDescriptor* operator ->() const { return &self; }
+};
+class StaticPaymentOutputDescriptor {
+private:
+       LDKStaticPaymentOutputDescriptor self;
+public:
+       StaticPaymentOutputDescriptor(const StaticPaymentOutputDescriptor&) = delete;
+       StaticPaymentOutputDescriptor(StaticPaymentOutputDescriptor&& o) : self(o.self) { memset(&o, 0, sizeof(StaticPaymentOutputDescriptor)); }
+       StaticPaymentOutputDescriptor(LDKStaticPaymentOutputDescriptor&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKStaticPaymentOutputDescriptor)); }
+       operator LDKStaticPaymentOutputDescriptor() && { LDKStaticPaymentOutputDescriptor res = self; memset(&self, 0, sizeof(LDKStaticPaymentOutputDescriptor)); return res; }
+       ~StaticPaymentOutputDescriptor() { StaticPaymentOutputDescriptor_free(self); }
+       StaticPaymentOutputDescriptor& operator=(StaticPaymentOutputDescriptor&& o) { StaticPaymentOutputDescriptor_free(self); self = o.self; memset(&o, 0, sizeof(StaticPaymentOutputDescriptor)); return *this; }
+       LDKStaticPaymentOutputDescriptor* operator &() { return &self; }
+       LDKStaticPaymentOutputDescriptor* operator ->() { return &self; }
+       const LDKStaticPaymentOutputDescriptor* operator &() const { return &self; }
+       const LDKStaticPaymentOutputDescriptor* operator ->() const { return &self; }
+};
 class SpendableOutputDescriptor {
 private:
        LDKSpendableOutputDescriptor self;
@@ -1571,110 +1601,35 @@ public:
        const LDKCVec_SpendableOutputDescriptorZ* operator &() const { return &self; }
        const LDKCVec_SpendableOutputDescriptorZ* operator ->() const { return &self; }
 };
-class CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
-private:
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ self;
-public:
-       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(const CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ&) = delete;
-       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ)); }
-       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ)); }
-       operator LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ() && { LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ res = self; memset(&self, 0, sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ)); return res; }
-       ~CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ() { CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(self); }
-       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ& operator=(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ&& o) { CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ)); return *this; }
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator &() { return &self; }
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator ->() { return &self; }
-       const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator &() const { return &self; }
-       const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator ->() const { return &self; }
-};
-class CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
-private:
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ self;
-public:
-       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ(const CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ&) = delete;
-       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ)); }
-       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ)); }
-       operator LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ() && { LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ)); return res; }
-       ~CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ() { CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(self); }
-       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ& operator=(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ&& o) { CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ)); return *this; }
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
-private:
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ self;
-public:
-       CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ(const CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ&) = delete;
-       CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ)); }
-       CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ)); }
-       operator LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ() && { LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ)); return res; }
-       ~CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ() { CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(self); }
-       CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ& operator=(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ&& o) { CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ)); return *this; }
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator &() { return &self; }
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator ->() { return &self; }
-       const LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator &() const { return &self; }
-       const LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator ->() const { return &self; }
-};
-class CResult_AcceptChannelDecodeErrorZ {
-private:
-       LDKCResult_AcceptChannelDecodeErrorZ self;
-public:
-       CResult_AcceptChannelDecodeErrorZ(const CResult_AcceptChannelDecodeErrorZ&) = delete;
-       CResult_AcceptChannelDecodeErrorZ(CResult_AcceptChannelDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_AcceptChannelDecodeErrorZ)); }
-       CResult_AcceptChannelDecodeErrorZ(LDKCResult_AcceptChannelDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_AcceptChannelDecodeErrorZ)); }
-       operator LDKCResult_AcceptChannelDecodeErrorZ() && { LDKCResult_AcceptChannelDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_AcceptChannelDecodeErrorZ)); return res; }
-       ~CResult_AcceptChannelDecodeErrorZ() { CResult_AcceptChannelDecodeErrorZ_free(self); }
-       CResult_AcceptChannelDecodeErrorZ& operator=(CResult_AcceptChannelDecodeErrorZ&& o) { CResult_AcceptChannelDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_AcceptChannelDecodeErrorZ)); return *this; }
-       LDKCResult_AcceptChannelDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_AcceptChannelDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_AcceptChannelDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_AcceptChannelDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_UnsignedChannelAnnouncementDecodeErrorZ {
-private:
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ self;
-public:
-       CResult_UnsignedChannelAnnouncementDecodeErrorZ(const CResult_UnsignedChannelAnnouncementDecodeErrorZ&) = delete;
-       CResult_UnsignedChannelAnnouncementDecodeErrorZ(CResult_UnsignedChannelAnnouncementDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UnsignedChannelAnnouncementDecodeErrorZ)); }
-       CResult_UnsignedChannelAnnouncementDecodeErrorZ(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ)); }
-       operator LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ() && { LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ)); return res; }
-       ~CResult_UnsignedChannelAnnouncementDecodeErrorZ() { CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(self); }
-       CResult_UnsignedChannelAnnouncementDecodeErrorZ& operator=(CResult_UnsignedChannelAnnouncementDecodeErrorZ&& o) { CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UnsignedChannelAnnouncementDecodeErrorZ)); return *this; }
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator ->() const { return &self; }
-};
-class C2Tuple_BlockHashChannelManagerZ {
+class CResult_FundingCreatedDecodeErrorZ {
 private:
-       LDKC2Tuple_BlockHashChannelManagerZ self;
+       LDKCResult_FundingCreatedDecodeErrorZ self;
 public:
-       C2Tuple_BlockHashChannelManagerZ(const C2Tuple_BlockHashChannelManagerZ&) = delete;
-       C2Tuple_BlockHashChannelManagerZ(C2Tuple_BlockHashChannelManagerZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_BlockHashChannelManagerZ)); }
-       C2Tuple_BlockHashChannelManagerZ(LDKC2Tuple_BlockHashChannelManagerZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_BlockHashChannelManagerZ)); }
-       operator LDKC2Tuple_BlockHashChannelManagerZ() && { LDKC2Tuple_BlockHashChannelManagerZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_BlockHashChannelManagerZ)); return res; }
-       ~C2Tuple_BlockHashChannelManagerZ() { C2Tuple_BlockHashChannelManagerZ_free(self); }
-       C2Tuple_BlockHashChannelManagerZ& operator=(C2Tuple_BlockHashChannelManagerZ&& o) { C2Tuple_BlockHashChannelManagerZ_free(self); self = o.self; memset(&o, 0, sizeof(C2Tuple_BlockHashChannelManagerZ)); return *this; }
-       LDKC2Tuple_BlockHashChannelManagerZ* operator &() { return &self; }
-       LDKC2Tuple_BlockHashChannelManagerZ* operator ->() { return &self; }
-       const LDKC2Tuple_BlockHashChannelManagerZ* operator &() const { return &self; }
-       const LDKC2Tuple_BlockHashChannelManagerZ* operator ->() const { return &self; }
+       CResult_FundingCreatedDecodeErrorZ(const CResult_FundingCreatedDecodeErrorZ&) = delete;
+       CResult_FundingCreatedDecodeErrorZ(CResult_FundingCreatedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_FundingCreatedDecodeErrorZ)); }
+       CResult_FundingCreatedDecodeErrorZ(LDKCResult_FundingCreatedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_FundingCreatedDecodeErrorZ)); }
+       operator LDKCResult_FundingCreatedDecodeErrorZ() && { LDKCResult_FundingCreatedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_FundingCreatedDecodeErrorZ)); return res; }
+       ~CResult_FundingCreatedDecodeErrorZ() { CResult_FundingCreatedDecodeErrorZ_free(self); }
+       CResult_FundingCreatedDecodeErrorZ& operator=(CResult_FundingCreatedDecodeErrorZ&& o) { CResult_FundingCreatedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_FundingCreatedDecodeErrorZ)); return *this; }
+       LDKCResult_FundingCreatedDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_FundingCreatedDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_FundingCreatedDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_FundingCreatedDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_ChannelTransactionParametersDecodeErrorZ {
+class CResult_ChannelAnnouncementDecodeErrorZ {
 private:
-       LDKCResult_ChannelTransactionParametersDecodeErrorZ self;
+       LDKCResult_ChannelAnnouncementDecodeErrorZ self;
 public:
-       CResult_ChannelTransactionParametersDecodeErrorZ(const CResult_ChannelTransactionParametersDecodeErrorZ&) = delete;
-       CResult_ChannelTransactionParametersDecodeErrorZ(CResult_ChannelTransactionParametersDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelTransactionParametersDecodeErrorZ)); }
-       CResult_ChannelTransactionParametersDecodeErrorZ(LDKCResult_ChannelTransactionParametersDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ)); }
-       operator LDKCResult_ChannelTransactionParametersDecodeErrorZ() && { LDKCResult_ChannelTransactionParametersDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ)); return res; }
-       ~CResult_ChannelTransactionParametersDecodeErrorZ() { CResult_ChannelTransactionParametersDecodeErrorZ_free(self); }
-       CResult_ChannelTransactionParametersDecodeErrorZ& operator=(CResult_ChannelTransactionParametersDecodeErrorZ&& o) { CResult_ChannelTransactionParametersDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelTransactionParametersDecodeErrorZ)); return *this; }
-       LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator ->() const { return &self; }
+       CResult_ChannelAnnouncementDecodeErrorZ(const CResult_ChannelAnnouncementDecodeErrorZ&) = delete;
+       CResult_ChannelAnnouncementDecodeErrorZ(CResult_ChannelAnnouncementDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelAnnouncementDecodeErrorZ)); }
+       CResult_ChannelAnnouncementDecodeErrorZ(LDKCResult_ChannelAnnouncementDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ)); }
+       operator LDKCResult_ChannelAnnouncementDecodeErrorZ() && { LDKCResult_ChannelAnnouncementDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ)); return res; }
+       ~CResult_ChannelAnnouncementDecodeErrorZ() { CResult_ChannelAnnouncementDecodeErrorZ_free(self); }
+       CResult_ChannelAnnouncementDecodeErrorZ& operator=(CResult_ChannelAnnouncementDecodeErrorZ&& o) { CResult_ChannelAnnouncementDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelAnnouncementDecodeErrorZ)); return *this; }
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ChannelAnnouncementDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ChannelAnnouncementDecodeErrorZ* operator ->() const { return &self; }
 };
 class CResult_HTLCUpdateDecodeErrorZ {
 private:
@@ -1691,51 +1646,6 @@ public:
        const LDKCResult_HTLCUpdateDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_HTLCUpdateDecodeErrorZ* operator ->() const { return &self; }
 };
-class CVec_SignatureZ {
-private:
-       LDKCVec_SignatureZ self;
-public:
-       CVec_SignatureZ(const CVec_SignatureZ&) = delete;
-       CVec_SignatureZ(CVec_SignatureZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_SignatureZ)); }
-       CVec_SignatureZ(LDKCVec_SignatureZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_SignatureZ)); }
-       operator LDKCVec_SignatureZ() && { LDKCVec_SignatureZ res = self; memset(&self, 0, sizeof(LDKCVec_SignatureZ)); return res; }
-       ~CVec_SignatureZ() { CVec_SignatureZ_free(self); }
-       CVec_SignatureZ& operator=(CVec_SignatureZ&& o) { CVec_SignatureZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_SignatureZ)); return *this; }
-       LDKCVec_SignatureZ* operator &() { return &self; }
-       LDKCVec_SignatureZ* operator ->() { return &self; }
-       const LDKCVec_SignatureZ* operator &() const { return &self; }
-       const LDKCVec_SignatureZ* operator ->() const { return &self; }
-};
-class CVec_u64Z {
-private:
-       LDKCVec_u64Z self;
-public:
-       CVec_u64Z(const CVec_u64Z&) = delete;
-       CVec_u64Z(CVec_u64Z&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_u64Z)); }
-       CVec_u64Z(LDKCVec_u64Z&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_u64Z)); }
-       operator LDKCVec_u64Z() && { LDKCVec_u64Z res = self; memset(&self, 0, sizeof(LDKCVec_u64Z)); return res; }
-       ~CVec_u64Z() { CVec_u64Z_free(self); }
-       CVec_u64Z& operator=(CVec_u64Z&& o) { CVec_u64Z_free(self); self = o.self; memset(&o, 0, sizeof(CVec_u64Z)); return *this; }
-       LDKCVec_u64Z* operator &() { return &self; }
-       LDKCVec_u64Z* operator ->() { return &self; }
-       const LDKCVec_u64Z* operator &() const { return &self; }
-       const LDKCVec_u64Z* operator ->() const { return &self; }
-};
-class CResult_ChannelInfoDecodeErrorZ {
-private:
-       LDKCResult_ChannelInfoDecodeErrorZ self;
-public:
-       CResult_ChannelInfoDecodeErrorZ(const CResult_ChannelInfoDecodeErrorZ&) = delete;
-       CResult_ChannelInfoDecodeErrorZ(CResult_ChannelInfoDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelInfoDecodeErrorZ)); }
-       CResult_ChannelInfoDecodeErrorZ(LDKCResult_ChannelInfoDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelInfoDecodeErrorZ)); }
-       operator LDKCResult_ChannelInfoDecodeErrorZ() && { LDKCResult_ChannelInfoDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelInfoDecodeErrorZ)); return res; }
-       ~CResult_ChannelInfoDecodeErrorZ() { CResult_ChannelInfoDecodeErrorZ_free(self); }
-       CResult_ChannelInfoDecodeErrorZ& operator=(CResult_ChannelInfoDecodeErrorZ&& o) { CResult_ChannelInfoDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelInfoDecodeErrorZ)); return *this; }
-       LDKCResult_ChannelInfoDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ChannelInfoDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ChannelInfoDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ChannelInfoDecodeErrorZ* operator ->() const { return &self; }
-};
 class CVec_C2Tuple_u32TxOutZZ {
 private:
        LDKCVec_C2Tuple_u32TxOutZZ self;
@@ -1766,35 +1676,20 @@ public:
        const LDKC2Tuple_SignatureCVec_SignatureZZ* operator &() const { return &self; }
        const LDKC2Tuple_SignatureCVec_SignatureZZ* operator ->() const { return &self; }
 };
-class CResult_FundingCreatedDecodeErrorZ {
-private:
-       LDKCResult_FundingCreatedDecodeErrorZ self;
-public:
-       CResult_FundingCreatedDecodeErrorZ(const CResult_FundingCreatedDecodeErrorZ&) = delete;
-       CResult_FundingCreatedDecodeErrorZ(CResult_FundingCreatedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_FundingCreatedDecodeErrorZ)); }
-       CResult_FundingCreatedDecodeErrorZ(LDKCResult_FundingCreatedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_FundingCreatedDecodeErrorZ)); }
-       operator LDKCResult_FundingCreatedDecodeErrorZ() && { LDKCResult_FundingCreatedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_FundingCreatedDecodeErrorZ)); return res; }
-       ~CResult_FundingCreatedDecodeErrorZ() { CResult_FundingCreatedDecodeErrorZ_free(self); }
-       CResult_FundingCreatedDecodeErrorZ& operator=(CResult_FundingCreatedDecodeErrorZ&& o) { CResult_FundingCreatedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_FundingCreatedDecodeErrorZ)); return *this; }
-       LDKCResult_FundingCreatedDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_FundingCreatedDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_FundingCreatedDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_FundingCreatedDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_ChannelAnnouncementDecodeErrorZ {
+class CResult_ChannelInfoDecodeErrorZ {
 private:
-       LDKCResult_ChannelAnnouncementDecodeErrorZ self;
+       LDKCResult_ChannelInfoDecodeErrorZ self;
 public:
-       CResult_ChannelAnnouncementDecodeErrorZ(const CResult_ChannelAnnouncementDecodeErrorZ&) = delete;
-       CResult_ChannelAnnouncementDecodeErrorZ(CResult_ChannelAnnouncementDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelAnnouncementDecodeErrorZ)); }
-       CResult_ChannelAnnouncementDecodeErrorZ(LDKCResult_ChannelAnnouncementDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ)); }
-       operator LDKCResult_ChannelAnnouncementDecodeErrorZ() && { LDKCResult_ChannelAnnouncementDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ)); return res; }
-       ~CResult_ChannelAnnouncementDecodeErrorZ() { CResult_ChannelAnnouncementDecodeErrorZ_free(self); }
-       CResult_ChannelAnnouncementDecodeErrorZ& operator=(CResult_ChannelAnnouncementDecodeErrorZ&& o) { CResult_ChannelAnnouncementDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelAnnouncementDecodeErrorZ)); return *this; }
-       LDKCResult_ChannelAnnouncementDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ChannelAnnouncementDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ChannelAnnouncementDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ChannelAnnouncementDecodeErrorZ* operator ->() const { return &self; }
+       CResult_ChannelInfoDecodeErrorZ(const CResult_ChannelInfoDecodeErrorZ&) = delete;
+       CResult_ChannelInfoDecodeErrorZ(CResult_ChannelInfoDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelInfoDecodeErrorZ)); }
+       CResult_ChannelInfoDecodeErrorZ(LDKCResult_ChannelInfoDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelInfoDecodeErrorZ)); }
+       operator LDKCResult_ChannelInfoDecodeErrorZ() && { LDKCResult_ChannelInfoDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelInfoDecodeErrorZ)); return res; }
+       ~CResult_ChannelInfoDecodeErrorZ() { CResult_ChannelInfoDecodeErrorZ_free(self); }
+       CResult_ChannelInfoDecodeErrorZ& operator=(CResult_ChannelInfoDecodeErrorZ&& o) { CResult_ChannelInfoDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelInfoDecodeErrorZ)); return *this; }
+       LDKCResult_ChannelInfoDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ChannelInfoDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ChannelInfoDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ChannelInfoDecodeErrorZ* operator ->() const { return &self; }
 };
 class CResult_CVec_u8ZPeerHandleErrorZ {
 private:
@@ -1871,21 +1766,6 @@ public:
        const LDKCResult_TxOutAccessErrorZ* operator &() const { return &self; }
        const LDKCResult_TxOutAccessErrorZ* operator ->() const { return &self; }
 };
-class CVec_RouteHintZ {
-private:
-       LDKCVec_RouteHintZ self;
-public:
-       CVec_RouteHintZ(const CVec_RouteHintZ&) = delete;
-       CVec_RouteHintZ(CVec_RouteHintZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_RouteHintZ)); }
-       CVec_RouteHintZ(LDKCVec_RouteHintZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_RouteHintZ)); }
-       operator LDKCVec_RouteHintZ() && { LDKCVec_RouteHintZ res = self; memset(&self, 0, sizeof(LDKCVec_RouteHintZ)); return res; }
-       ~CVec_RouteHintZ() { CVec_RouteHintZ_free(self); }
-       CVec_RouteHintZ& operator=(CVec_RouteHintZ&& o) { CVec_RouteHintZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_RouteHintZ)); return *this; }
-       LDKCVec_RouteHintZ* operator &() { return &self; }
-       LDKCVec_RouteHintZ* operator ->() { return &self; }
-       const LDKCVec_RouteHintZ* operator &() const { return &self; }
-       const LDKCVec_RouteHintZ* operator ->() const { return &self; }
-};
 class CResult_UnsignedNodeAnnouncementDecodeErrorZ {
 private:
        LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ self;
@@ -1916,50 +1796,35 @@ public:
        const LDKCResult_ChannelReestablishDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_ChannelReestablishDecodeErrorZ* operator ->() const { return &self; }
 };
-class CVec_CVec_RouteHopZZ {
+class CResult_CommitmentSignedDecodeErrorZ {
 private:
-       LDKCVec_CVec_RouteHopZZ self;
+       LDKCResult_CommitmentSignedDecodeErrorZ self;
 public:
-       CVec_CVec_RouteHopZZ(const CVec_CVec_RouteHopZZ&) = delete;
-       CVec_CVec_RouteHopZZ(CVec_CVec_RouteHopZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_CVec_RouteHopZZ)); }
-       CVec_CVec_RouteHopZZ(LDKCVec_CVec_RouteHopZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_CVec_RouteHopZZ)); }
-       operator LDKCVec_CVec_RouteHopZZ() && { LDKCVec_CVec_RouteHopZZ res = self; memset(&self, 0, sizeof(LDKCVec_CVec_RouteHopZZ)); return res; }
-       ~CVec_CVec_RouteHopZZ() { CVec_CVec_RouteHopZZ_free(self); }
-       CVec_CVec_RouteHopZZ& operator=(CVec_CVec_RouteHopZZ&& o) { CVec_CVec_RouteHopZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_CVec_RouteHopZZ)); return *this; }
-       LDKCVec_CVec_RouteHopZZ* operator &() { return &self; }
-       LDKCVec_CVec_RouteHopZZ* operator ->() { return &self; }
-       const LDKCVec_CVec_RouteHopZZ* operator &() const { return &self; }
-       const LDKCVec_CVec_RouteHopZZ* operator ->() const { return &self; }
+       CResult_CommitmentSignedDecodeErrorZ(const CResult_CommitmentSignedDecodeErrorZ&) = delete;
+       CResult_CommitmentSignedDecodeErrorZ(CResult_CommitmentSignedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CommitmentSignedDecodeErrorZ)); }
+       CResult_CommitmentSignedDecodeErrorZ(LDKCResult_CommitmentSignedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CommitmentSignedDecodeErrorZ)); }
+       operator LDKCResult_CommitmentSignedDecodeErrorZ() && { LDKCResult_CommitmentSignedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_CommitmentSignedDecodeErrorZ)); return res; }
+       ~CResult_CommitmentSignedDecodeErrorZ() { CResult_CommitmentSignedDecodeErrorZ_free(self); }
+       CResult_CommitmentSignedDecodeErrorZ& operator=(CResult_CommitmentSignedDecodeErrorZ&& o) { CResult_CommitmentSignedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CommitmentSignedDecodeErrorZ)); return *this; }
+       LDKCResult_CommitmentSignedDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_CommitmentSignedDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_CommitmentSignedDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_CommitmentSignedDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_TrustedCommitmentTransactionNoneZ {
+class CVec_UpdateAddHTLCZ {
 private:
-       LDKCResult_TrustedCommitmentTransactionNoneZ self;
+       LDKCVec_UpdateAddHTLCZ self;
 public:
-       CResult_TrustedCommitmentTransactionNoneZ(const CResult_TrustedCommitmentTransactionNoneZ&) = delete;
-       CResult_TrustedCommitmentTransactionNoneZ(CResult_TrustedCommitmentTransactionNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_TrustedCommitmentTransactionNoneZ)); }
-       CResult_TrustedCommitmentTransactionNoneZ(LDKCResult_TrustedCommitmentTransactionNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ)); }
-       operator LDKCResult_TrustedCommitmentTransactionNoneZ() && { LDKCResult_TrustedCommitmentTransactionNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ)); return res; }
-       ~CResult_TrustedCommitmentTransactionNoneZ() { CResult_TrustedCommitmentTransactionNoneZ_free(self); }
-       CResult_TrustedCommitmentTransactionNoneZ& operator=(CResult_TrustedCommitmentTransactionNoneZ&& o) { CResult_TrustedCommitmentTransactionNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_TrustedCommitmentTransactionNoneZ)); return *this; }
-       LDKCResult_TrustedCommitmentTransactionNoneZ* operator &() { return &self; }
-       LDKCResult_TrustedCommitmentTransactionNoneZ* operator ->() { return &self; }
-       const LDKCResult_TrustedCommitmentTransactionNoneZ* operator &() const { return &self; }
-       const LDKCResult_TrustedCommitmentTransactionNoneZ* operator ->() const { return &self; }
-};
-class CResult_NonePeerHandleErrorZ {
-private:
-       LDKCResult_NonePeerHandleErrorZ self;
-public:
-       CResult_NonePeerHandleErrorZ(const CResult_NonePeerHandleErrorZ&) = delete;
-       CResult_NonePeerHandleErrorZ(CResult_NonePeerHandleErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NonePeerHandleErrorZ)); }
-       CResult_NonePeerHandleErrorZ(LDKCResult_NonePeerHandleErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NonePeerHandleErrorZ)); }
-       operator LDKCResult_NonePeerHandleErrorZ() && { LDKCResult_NonePeerHandleErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NonePeerHandleErrorZ)); return res; }
-       ~CResult_NonePeerHandleErrorZ() { CResult_NonePeerHandleErrorZ_free(self); }
-       CResult_NonePeerHandleErrorZ& operator=(CResult_NonePeerHandleErrorZ&& o) { CResult_NonePeerHandleErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NonePeerHandleErrorZ)); return *this; }
-       LDKCResult_NonePeerHandleErrorZ* operator &() { return &self; }
-       LDKCResult_NonePeerHandleErrorZ* operator ->() { return &self; }
-       const LDKCResult_NonePeerHandleErrorZ* operator &() const { return &self; }
-       const LDKCResult_NonePeerHandleErrorZ* operator ->() const { return &self; }
+       CVec_UpdateAddHTLCZ(const CVec_UpdateAddHTLCZ&) = delete;
+       CVec_UpdateAddHTLCZ(CVec_UpdateAddHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateAddHTLCZ)); }
+       CVec_UpdateAddHTLCZ(LDKCVec_UpdateAddHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateAddHTLCZ)); }
+       operator LDKCVec_UpdateAddHTLCZ() && { LDKCVec_UpdateAddHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateAddHTLCZ)); return res; }
+       ~CVec_UpdateAddHTLCZ() { CVec_UpdateAddHTLCZ_free(self); }
+       CVec_UpdateAddHTLCZ& operator=(CVec_UpdateAddHTLCZ&& o) { CVec_UpdateAddHTLCZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_UpdateAddHTLCZ)); return *this; }
+       LDKCVec_UpdateAddHTLCZ* operator &() { return &self; }
+       LDKCVec_UpdateAddHTLCZ* operator ->() { return &self; }
+       const LDKCVec_UpdateAddHTLCZ* operator &() const { return &self; }
+       const LDKCVec_UpdateAddHTLCZ* operator ->() const { return &self; }
 };
 class CResult_InitFeaturesDecodeErrorZ {
 private:
@@ -1976,66 +1841,6 @@ public:
        const LDKCResult_InitFeaturesDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_InitFeaturesDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_NoneLightningErrorZ {
-private:
-       LDKCResult_NoneLightningErrorZ self;
-public:
-       CResult_NoneLightningErrorZ(const CResult_NoneLightningErrorZ&) = delete;
-       CResult_NoneLightningErrorZ(CResult_NoneLightningErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneLightningErrorZ)); }
-       CResult_NoneLightningErrorZ(LDKCResult_NoneLightningErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneLightningErrorZ)); }
-       operator LDKCResult_NoneLightningErrorZ() && { LDKCResult_NoneLightningErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneLightningErrorZ)); return res; }
-       ~CResult_NoneLightningErrorZ() { CResult_NoneLightningErrorZ_free(self); }
-       CResult_NoneLightningErrorZ& operator=(CResult_NoneLightningErrorZ&& o) { CResult_NoneLightningErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneLightningErrorZ)); return *this; }
-       LDKCResult_NoneLightningErrorZ* operator &() { return &self; }
-       LDKCResult_NoneLightningErrorZ* operator ->() { return &self; }
-       const LDKCResult_NoneLightningErrorZ* operator &() const { return &self; }
-       const LDKCResult_NoneLightningErrorZ* operator ->() const { return &self; }
-};
-class CVec_UpdateAddHTLCZ {
-private:
-       LDKCVec_UpdateAddHTLCZ self;
-public:
-       CVec_UpdateAddHTLCZ(const CVec_UpdateAddHTLCZ&) = delete;
-       CVec_UpdateAddHTLCZ(CVec_UpdateAddHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateAddHTLCZ)); }
-       CVec_UpdateAddHTLCZ(LDKCVec_UpdateAddHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateAddHTLCZ)); }
-       operator LDKCVec_UpdateAddHTLCZ() && { LDKCVec_UpdateAddHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateAddHTLCZ)); return res; }
-       ~CVec_UpdateAddHTLCZ() { CVec_UpdateAddHTLCZ_free(self); }
-       CVec_UpdateAddHTLCZ& operator=(CVec_UpdateAddHTLCZ&& o) { CVec_UpdateAddHTLCZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_UpdateAddHTLCZ)); return *this; }
-       LDKCVec_UpdateAddHTLCZ* operator &() { return &self; }
-       LDKCVec_UpdateAddHTLCZ* operator ->() { return &self; }
-       const LDKCVec_UpdateAddHTLCZ* operator &() const { return &self; }
-       const LDKCVec_UpdateAddHTLCZ* operator ->() const { return &self; }
-};
-class CResult_CommitmentSignedDecodeErrorZ {
-private:
-       LDKCResult_CommitmentSignedDecodeErrorZ self;
-public:
-       CResult_CommitmentSignedDecodeErrorZ(const CResult_CommitmentSignedDecodeErrorZ&) = delete;
-       CResult_CommitmentSignedDecodeErrorZ(CResult_CommitmentSignedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CommitmentSignedDecodeErrorZ)); }
-       CResult_CommitmentSignedDecodeErrorZ(LDKCResult_CommitmentSignedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CommitmentSignedDecodeErrorZ)); }
-       operator LDKCResult_CommitmentSignedDecodeErrorZ() && { LDKCResult_CommitmentSignedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_CommitmentSignedDecodeErrorZ)); return res; }
-       ~CResult_CommitmentSignedDecodeErrorZ() { CResult_CommitmentSignedDecodeErrorZ_free(self); }
-       CResult_CommitmentSignedDecodeErrorZ& operator=(CResult_CommitmentSignedDecodeErrorZ&& o) { CResult_CommitmentSignedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CommitmentSignedDecodeErrorZ)); return *this; }
-       LDKCResult_CommitmentSignedDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_CommitmentSignedDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_CommitmentSignedDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_CommitmentSignedDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_CVec_SignatureZNoneZ {
-private:
-       LDKCResult_CVec_SignatureZNoneZ self;
-public:
-       CResult_CVec_SignatureZNoneZ(const CResult_CVec_SignatureZNoneZ&) = delete;
-       CResult_CVec_SignatureZNoneZ(CResult_CVec_SignatureZNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CVec_SignatureZNoneZ)); }
-       CResult_CVec_SignatureZNoneZ(LDKCResult_CVec_SignatureZNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CVec_SignatureZNoneZ)); }
-       operator LDKCResult_CVec_SignatureZNoneZ() && { LDKCResult_CVec_SignatureZNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_CVec_SignatureZNoneZ)); return res; }
-       ~CResult_CVec_SignatureZNoneZ() { CResult_CVec_SignatureZNoneZ_free(self); }
-       CResult_CVec_SignatureZNoneZ& operator=(CResult_CVec_SignatureZNoneZ&& o) { CResult_CVec_SignatureZNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CVec_SignatureZNoneZ)); return *this; }
-       LDKCResult_CVec_SignatureZNoneZ* operator &() { return &self; }
-       LDKCResult_CVec_SignatureZNoneZ* operator ->() { return &self; }
-       const LDKCResult_CVec_SignatureZNoneZ* operator &() const { return &self; }
-       const LDKCResult_CVec_SignatureZNoneZ* operator ->() const { return &self; }
-};
 class CResult_CommitmentTransactionDecodeErrorZ {
 private:
        LDKCResult_CommitmentTransactionDecodeErrorZ self;
@@ -2051,6 +1856,21 @@ public:
        const LDKCResult_CommitmentTransactionDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_CommitmentTransactionDecodeErrorZ* operator ->() const { return &self; }
 };
+class CResult_TransactionNoneZ {
+private:
+       LDKCResult_TransactionNoneZ self;
+public:
+       CResult_TransactionNoneZ(const CResult_TransactionNoneZ&) = delete;
+       CResult_TransactionNoneZ(CResult_TransactionNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_TransactionNoneZ)); }
+       CResult_TransactionNoneZ(LDKCResult_TransactionNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_TransactionNoneZ)); }
+       operator LDKCResult_TransactionNoneZ() && { LDKCResult_TransactionNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_TransactionNoneZ)); return res; }
+       ~CResult_TransactionNoneZ() { CResult_TransactionNoneZ_free(self); }
+       CResult_TransactionNoneZ& operator=(CResult_TransactionNoneZ&& o) { CResult_TransactionNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_TransactionNoneZ)); return *this; }
+       LDKCResult_TransactionNoneZ* operator &() { return &self; }
+       LDKCResult_TransactionNoneZ* operator ->() { return &self; }
+       const LDKCResult_TransactionNoneZ* operator &() const { return &self; }
+       const LDKCResult_TransactionNoneZ* operator ->() const { return &self; }
+};
 class CResult_PingDecodeErrorZ {
 private:
        LDKCResult_PingDecodeErrorZ self;
@@ -2066,21 +1886,6 @@ public:
        const LDKCResult_PingDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_PingDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_RoutingFeesDecodeErrorZ {
-private:
-       LDKCResult_RoutingFeesDecodeErrorZ self;
-public:
-       CResult_RoutingFeesDecodeErrorZ(const CResult_RoutingFeesDecodeErrorZ&) = delete;
-       CResult_RoutingFeesDecodeErrorZ(CResult_RoutingFeesDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RoutingFeesDecodeErrorZ)); }
-       CResult_RoutingFeesDecodeErrorZ(LDKCResult_RoutingFeesDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RoutingFeesDecodeErrorZ)); }
-       operator LDKCResult_RoutingFeesDecodeErrorZ() && { LDKCResult_RoutingFeesDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RoutingFeesDecodeErrorZ)); return res; }
-       ~CResult_RoutingFeesDecodeErrorZ() { CResult_RoutingFeesDecodeErrorZ_free(self); }
-       CResult_RoutingFeesDecodeErrorZ& operator=(CResult_RoutingFeesDecodeErrorZ&& o) { CResult_RoutingFeesDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_RoutingFeesDecodeErrorZ)); return *this; }
-       LDKCResult_RoutingFeesDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_RoutingFeesDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_RoutingFeesDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_RoutingFeesDecodeErrorZ* operator ->() const { return &self; }
-};
 class CResult_ErrorMessageDecodeErrorZ {
 private:
        LDKCResult_ErrorMessageDecodeErrorZ self;
@@ -2111,35 +1916,20 @@ public:
        const LDKCResult_OpenChannelDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_OpenChannelDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_UpdateAddHTLCDecodeErrorZ {
-private:
-       LDKCResult_UpdateAddHTLCDecodeErrorZ self;
-public:
-       CResult_UpdateAddHTLCDecodeErrorZ(const CResult_UpdateAddHTLCDecodeErrorZ&) = delete;
-       CResult_UpdateAddHTLCDecodeErrorZ(CResult_UpdateAddHTLCDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UpdateAddHTLCDecodeErrorZ)); }
-       CResult_UpdateAddHTLCDecodeErrorZ(LDKCResult_UpdateAddHTLCDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ)); }
-       operator LDKCResult_UpdateAddHTLCDecodeErrorZ() && { LDKCResult_UpdateAddHTLCDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ)); return res; }
-       ~CResult_UpdateAddHTLCDecodeErrorZ() { CResult_UpdateAddHTLCDecodeErrorZ_free(self); }
-       CResult_UpdateAddHTLCDecodeErrorZ& operator=(CResult_UpdateAddHTLCDecodeErrorZ&& o) { CResult_UpdateAddHTLCDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UpdateAddHTLCDecodeErrorZ)); return *this; }
-       LDKCResult_UpdateAddHTLCDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_UpdateAddHTLCDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_UpdateAddHTLCDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_UpdateAddHTLCDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_QueryShortChannelIdsDecodeErrorZ {
+class CVec_CVec_u8ZZ {
 private:
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ self;
+       LDKCVec_CVec_u8ZZ self;
 public:
-       CResult_QueryShortChannelIdsDecodeErrorZ(const CResult_QueryShortChannelIdsDecodeErrorZ&) = delete;
-       CResult_QueryShortChannelIdsDecodeErrorZ(CResult_QueryShortChannelIdsDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_QueryShortChannelIdsDecodeErrorZ)); }
-       CResult_QueryShortChannelIdsDecodeErrorZ(LDKCResult_QueryShortChannelIdsDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ)); }
-       operator LDKCResult_QueryShortChannelIdsDecodeErrorZ() && { LDKCResult_QueryShortChannelIdsDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ)); return res; }
-       ~CResult_QueryShortChannelIdsDecodeErrorZ() { CResult_QueryShortChannelIdsDecodeErrorZ_free(self); }
-       CResult_QueryShortChannelIdsDecodeErrorZ& operator=(CResult_QueryShortChannelIdsDecodeErrorZ&& o) { CResult_QueryShortChannelIdsDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_QueryShortChannelIdsDecodeErrorZ)); return *this; }
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator ->() const { return &self; }
+       CVec_CVec_u8ZZ(const CVec_CVec_u8ZZ&) = delete;
+       CVec_CVec_u8ZZ(CVec_CVec_u8ZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_CVec_u8ZZ)); }
+       CVec_CVec_u8ZZ(LDKCVec_CVec_u8ZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_CVec_u8ZZ)); }
+       operator LDKCVec_CVec_u8ZZ() && { LDKCVec_CVec_u8ZZ res = self; memset(&self, 0, sizeof(LDKCVec_CVec_u8ZZ)); return res; }
+       ~CVec_CVec_u8ZZ() { CVec_CVec_u8ZZ_free(self); }
+       CVec_CVec_u8ZZ& operator=(CVec_CVec_u8ZZ&& o) { CVec_CVec_u8ZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_CVec_u8ZZ)); return *this; }
+       LDKCVec_CVec_u8ZZ* operator &() { return &self; }
+       LDKCVec_CVec_u8ZZ* operator ->() { return &self; }
+       const LDKCVec_CVec_u8ZZ* operator &() const { return &self; }
+       const LDKCVec_CVec_u8ZZ* operator ->() const { return &self; }
 };
 class CResult_SecretKeyErrorZ {
 private:
@@ -2156,50 +1946,20 @@ public:
        const LDKCResult_SecretKeyErrorZ* operator &() const { return &self; }
        const LDKCResult_SecretKeyErrorZ* operator ->() const { return &self; }
 };
-class CResult_CounterpartyChannelTransactionParametersDecodeErrorZ {
-private:
-       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ self;
-public:
-       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ(const CResult_CounterpartyChannelTransactionParametersDecodeErrorZ&) = delete;
-       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ(CResult_CounterpartyChannelTransactionParametersDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CounterpartyChannelTransactionParametersDecodeErrorZ)); }
-       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ)); }
-       operator LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ() && { LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ)); return res; }
-       ~CResult_CounterpartyChannelTransactionParametersDecodeErrorZ() { CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(self); }
-       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ& operator=(CResult_CounterpartyChannelTransactionParametersDecodeErrorZ&& o) { CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CounterpartyChannelTransactionParametersDecodeErrorZ)); return *this; }
-       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_NoneAPIErrorZ {
-private:
-       LDKCResult_NoneAPIErrorZ self;
-public:
-       CResult_NoneAPIErrorZ(const CResult_NoneAPIErrorZ&) = delete;
-       CResult_NoneAPIErrorZ(CResult_NoneAPIErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneAPIErrorZ)); }
-       CResult_NoneAPIErrorZ(LDKCResult_NoneAPIErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneAPIErrorZ)); }
-       operator LDKCResult_NoneAPIErrorZ() && { LDKCResult_NoneAPIErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneAPIErrorZ)); return res; }
-       ~CResult_NoneAPIErrorZ() { CResult_NoneAPIErrorZ_free(self); }
-       CResult_NoneAPIErrorZ& operator=(CResult_NoneAPIErrorZ&& o) { CResult_NoneAPIErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneAPIErrorZ)); return *this; }
-       LDKCResult_NoneAPIErrorZ* operator &() { return &self; }
-       LDKCResult_NoneAPIErrorZ* operator ->() { return &self; }
-       const LDKCResult_NoneAPIErrorZ* operator &() const { return &self; }
-       const LDKCResult_NoneAPIErrorZ* operator ->() const { return &self; }
-};
-class CVec_NetAddressZ {
+class CResult_QueryChannelRangeDecodeErrorZ {
 private:
-       LDKCVec_NetAddressZ self;
+       LDKCResult_QueryChannelRangeDecodeErrorZ self;
 public:
-       CVec_NetAddressZ(const CVec_NetAddressZ&) = delete;
-       CVec_NetAddressZ(CVec_NetAddressZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_NetAddressZ)); }
-       CVec_NetAddressZ(LDKCVec_NetAddressZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_NetAddressZ)); }
-       operator LDKCVec_NetAddressZ() && { LDKCVec_NetAddressZ res = self; memset(&self, 0, sizeof(LDKCVec_NetAddressZ)); return res; }
-       ~CVec_NetAddressZ() { CVec_NetAddressZ_free(self); }
-       CVec_NetAddressZ& operator=(CVec_NetAddressZ&& o) { CVec_NetAddressZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_NetAddressZ)); return *this; }
-       LDKCVec_NetAddressZ* operator &() { return &self; }
-       LDKCVec_NetAddressZ* operator ->() { return &self; }
-       const LDKCVec_NetAddressZ* operator &() const { return &self; }
-       const LDKCVec_NetAddressZ* operator ->() const { return &self; }
+       CResult_QueryChannelRangeDecodeErrorZ(const CResult_QueryChannelRangeDecodeErrorZ&) = delete;
+       CResult_QueryChannelRangeDecodeErrorZ(CResult_QueryChannelRangeDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_QueryChannelRangeDecodeErrorZ)); }
+       CResult_QueryChannelRangeDecodeErrorZ(LDKCResult_QueryChannelRangeDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ)); }
+       operator LDKCResult_QueryChannelRangeDecodeErrorZ() && { LDKCResult_QueryChannelRangeDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ)); return res; }
+       ~CResult_QueryChannelRangeDecodeErrorZ() { CResult_QueryChannelRangeDecodeErrorZ_free(self); }
+       CResult_QueryChannelRangeDecodeErrorZ& operator=(CResult_QueryChannelRangeDecodeErrorZ&& o) { CResult_QueryChannelRangeDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_QueryChannelRangeDecodeErrorZ)); return *this; }
+       LDKCResult_QueryChannelRangeDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_QueryChannelRangeDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_QueryChannelRangeDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_QueryChannelRangeDecodeErrorZ* operator ->() const { return &self; }
 };
 class CVec_TransactionZ {
 private:
@@ -2231,21 +1991,6 @@ public:
        const LDKCResult_TxCreationKeysDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_TxCreationKeysDecodeErrorZ* operator ->() const { return &self; }
 };
-class CVec_PublicKeyZ {
-private:
-       LDKCVec_PublicKeyZ self;
-public:
-       CVec_PublicKeyZ(const CVec_PublicKeyZ&) = delete;
-       CVec_PublicKeyZ(CVec_PublicKeyZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_PublicKeyZ)); }
-       CVec_PublicKeyZ(LDKCVec_PublicKeyZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_PublicKeyZ)); }
-       operator LDKCVec_PublicKeyZ() && { LDKCVec_PublicKeyZ res = self; memset(&self, 0, sizeof(LDKCVec_PublicKeyZ)); return res; }
-       ~CVec_PublicKeyZ() { CVec_PublicKeyZ_free(self); }
-       CVec_PublicKeyZ& operator=(CVec_PublicKeyZ&& o) { CVec_PublicKeyZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_PublicKeyZ)); return *this; }
-       LDKCVec_PublicKeyZ* operator &() { return &self; }
-       LDKCVec_PublicKeyZ* operator ->() { return &self; }
-       const LDKCVec_PublicKeyZ* operator &() const { return &self; }
-       const LDKCVec_PublicKeyZ* operator ->() const { return &self; }
-};
 class CResult_ChannelFeaturesDecodeErrorZ {
 private:
        LDKCResult_ChannelFeaturesDecodeErrorZ self;
@@ -2276,21 +2021,6 @@ public:
        const LDKC2Tuple_usizeTransactionZ* operator &() const { return &self; }
        const LDKC2Tuple_usizeTransactionZ* operator ->() const { return &self; }
 };
-class CVec_C2Tuple_usizeTransactionZZ {
-private:
-       LDKCVec_C2Tuple_usizeTransactionZZ self;
-public:
-       CVec_C2Tuple_usizeTransactionZZ(const CVec_C2Tuple_usizeTransactionZZ&) = delete;
-       CVec_C2Tuple_usizeTransactionZZ(CVec_C2Tuple_usizeTransactionZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_C2Tuple_usizeTransactionZZ)); }
-       CVec_C2Tuple_usizeTransactionZZ(LDKCVec_C2Tuple_usizeTransactionZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_C2Tuple_usizeTransactionZZ)); }
-       operator LDKCVec_C2Tuple_usizeTransactionZZ() && { LDKCVec_C2Tuple_usizeTransactionZZ res = self; memset(&self, 0, sizeof(LDKCVec_C2Tuple_usizeTransactionZZ)); return res; }
-       ~CVec_C2Tuple_usizeTransactionZZ() { CVec_C2Tuple_usizeTransactionZZ_free(self); }
-       CVec_C2Tuple_usizeTransactionZZ& operator=(CVec_C2Tuple_usizeTransactionZZ&& o) { CVec_C2Tuple_usizeTransactionZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_C2Tuple_usizeTransactionZZ)); return *this; }
-       LDKCVec_C2Tuple_usizeTransactionZZ* operator &() { return &self; }
-       LDKCVec_C2Tuple_usizeTransactionZZ* operator ->() { return &self; }
-       const LDKCVec_C2Tuple_usizeTransactionZZ* operator &() const { return &self; }
-       const LDKCVec_C2Tuple_usizeTransactionZZ* operator ->() const { return &self; }
-};
 class CVec_ChannelMonitorZ {
 private:
        LDKCVec_ChannelMonitorZ self;
@@ -2321,21 +2051,6 @@ public:
        const LDKCResult_UpdateFeeDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_UpdateFeeDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_DirectionalChannelInfoDecodeErrorZ {
-private:
-       LDKCResult_DirectionalChannelInfoDecodeErrorZ self;
-public:
-       CResult_DirectionalChannelInfoDecodeErrorZ(const CResult_DirectionalChannelInfoDecodeErrorZ&) = delete;
-       CResult_DirectionalChannelInfoDecodeErrorZ(CResult_DirectionalChannelInfoDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_DirectionalChannelInfoDecodeErrorZ)); }
-       CResult_DirectionalChannelInfoDecodeErrorZ(LDKCResult_DirectionalChannelInfoDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ)); }
-       operator LDKCResult_DirectionalChannelInfoDecodeErrorZ() && { LDKCResult_DirectionalChannelInfoDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ)); return res; }
-       ~CResult_DirectionalChannelInfoDecodeErrorZ() { CResult_DirectionalChannelInfoDecodeErrorZ_free(self); }
-       CResult_DirectionalChannelInfoDecodeErrorZ& operator=(CResult_DirectionalChannelInfoDecodeErrorZ&& o) { CResult_DirectionalChannelInfoDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_DirectionalChannelInfoDecodeErrorZ)); return *this; }
-       LDKCResult_DirectionalChannelInfoDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_DirectionalChannelInfoDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_DirectionalChannelInfoDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_DirectionalChannelInfoDecodeErrorZ* operator ->() const { return &self; }
-};
 class CResult_NodeAnnouncementDecodeErrorZ {
 private:
        LDKCResult_NodeAnnouncementDecodeErrorZ self;
@@ -2351,39 +2066,9 @@ public:
        const LDKCResult_NodeAnnouncementDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_NodeAnnouncementDecodeErrorZ* operator ->() const { return &self; }
 };
-class C2Tuple_u32TxOutZ {
-private:
-       LDKC2Tuple_u32TxOutZ self;
-public:
-       C2Tuple_u32TxOutZ(const C2Tuple_u32TxOutZ&) = delete;
-       C2Tuple_u32TxOutZ(C2Tuple_u32TxOutZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_u32TxOutZ)); }
-       C2Tuple_u32TxOutZ(LDKC2Tuple_u32TxOutZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_u32TxOutZ)); }
-       operator LDKC2Tuple_u32TxOutZ() && { LDKC2Tuple_u32TxOutZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_u32TxOutZ)); return res; }
-       ~C2Tuple_u32TxOutZ() { C2Tuple_u32TxOutZ_free(self); }
-       C2Tuple_u32TxOutZ& operator=(C2Tuple_u32TxOutZ&& o) { C2Tuple_u32TxOutZ_free(self); self = o.self; memset(&o, 0, sizeof(C2Tuple_u32TxOutZ)); return *this; }
-       LDKC2Tuple_u32TxOutZ* operator &() { return &self; }
-       LDKC2Tuple_u32TxOutZ* operator ->() { return &self; }
-       const LDKC2Tuple_u32TxOutZ* operator &() const { return &self; }
-       const LDKC2Tuple_u32TxOutZ* operator ->() const { return &self; }
-};
-class CResult_QueryChannelRangeDecodeErrorZ {
+class CResult_HTLCOutputInCommitmentDecodeErrorZ {
 private:
-       LDKCResult_QueryChannelRangeDecodeErrorZ self;
-public:
-       CResult_QueryChannelRangeDecodeErrorZ(const CResult_QueryChannelRangeDecodeErrorZ&) = delete;
-       CResult_QueryChannelRangeDecodeErrorZ(CResult_QueryChannelRangeDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_QueryChannelRangeDecodeErrorZ)); }
-       CResult_QueryChannelRangeDecodeErrorZ(LDKCResult_QueryChannelRangeDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ)); }
-       operator LDKCResult_QueryChannelRangeDecodeErrorZ() && { LDKCResult_QueryChannelRangeDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ)); return res; }
-       ~CResult_QueryChannelRangeDecodeErrorZ() { CResult_QueryChannelRangeDecodeErrorZ_free(self); }
-       CResult_QueryChannelRangeDecodeErrorZ& operator=(CResult_QueryChannelRangeDecodeErrorZ&& o) { CResult_QueryChannelRangeDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_QueryChannelRangeDecodeErrorZ)); return *this; }
-       LDKCResult_QueryChannelRangeDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_QueryChannelRangeDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_QueryChannelRangeDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_QueryChannelRangeDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_HTLCOutputInCommitmentDecodeErrorZ {
-private:
-       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ self;
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ self;
 public:
        CResult_HTLCOutputInCommitmentDecodeErrorZ(const CResult_HTLCOutputInCommitmentDecodeErrorZ&) = delete;
        CResult_HTLCOutputInCommitmentDecodeErrorZ(CResult_HTLCOutputInCommitmentDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_HTLCOutputInCommitmentDecodeErrorZ)); }
@@ -2441,20 +2126,20 @@ public:
        const LDKC2Tuple_BlockHashChannelMonitorZ* operator &() const { return &self; }
        const LDKC2Tuple_BlockHashChannelMonitorZ* operator ->() const { return &self; }
 };
-class CResult_ChannelConfigDecodeErrorZ {
+class CResult_FundingSignedDecodeErrorZ {
 private:
-       LDKCResult_ChannelConfigDecodeErrorZ self;
+       LDKCResult_FundingSignedDecodeErrorZ self;
 public:
-       CResult_ChannelConfigDecodeErrorZ(const CResult_ChannelConfigDecodeErrorZ&) = delete;
-       CResult_ChannelConfigDecodeErrorZ(CResult_ChannelConfigDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelConfigDecodeErrorZ)); }
-       CResult_ChannelConfigDecodeErrorZ(LDKCResult_ChannelConfigDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelConfigDecodeErrorZ)); }
-       operator LDKCResult_ChannelConfigDecodeErrorZ() && { LDKCResult_ChannelConfigDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelConfigDecodeErrorZ)); return res; }
-       ~CResult_ChannelConfigDecodeErrorZ() { CResult_ChannelConfigDecodeErrorZ_free(self); }
-       CResult_ChannelConfigDecodeErrorZ& operator=(CResult_ChannelConfigDecodeErrorZ&& o) { CResult_ChannelConfigDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelConfigDecodeErrorZ)); return *this; }
-       LDKCResult_ChannelConfigDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ChannelConfigDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ChannelConfigDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ChannelConfigDecodeErrorZ* operator ->() const { return &self; }
+       CResult_FundingSignedDecodeErrorZ(const CResult_FundingSignedDecodeErrorZ&) = delete;
+       CResult_FundingSignedDecodeErrorZ(CResult_FundingSignedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_FundingSignedDecodeErrorZ)); }
+       CResult_FundingSignedDecodeErrorZ(LDKCResult_FundingSignedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_FundingSignedDecodeErrorZ)); }
+       operator LDKCResult_FundingSignedDecodeErrorZ() && { LDKCResult_FundingSignedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_FundingSignedDecodeErrorZ)); return res; }
+       ~CResult_FundingSignedDecodeErrorZ() { CResult_FundingSignedDecodeErrorZ_free(self); }
+       CResult_FundingSignedDecodeErrorZ& operator=(CResult_FundingSignedDecodeErrorZ&& o) { CResult_FundingSignedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_FundingSignedDecodeErrorZ)); return *this; }
+       LDKCResult_FundingSignedDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_FundingSignedDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_FundingSignedDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_FundingSignedDecodeErrorZ* operator ->() const { return &self; }
 };
 class CResult_NodeAnnouncementInfoDecodeErrorZ {
 private:
@@ -2471,21 +2156,6 @@ public:
        const LDKCResult_NodeAnnouncementInfoDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_NodeAnnouncementInfoDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_SpendableOutputDescriptorDecodeErrorZ {
-private:
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ self;
-public:
-       CResult_SpendableOutputDescriptorDecodeErrorZ(const CResult_SpendableOutputDescriptorDecodeErrorZ&) = delete;
-       CResult_SpendableOutputDescriptorDecodeErrorZ(CResult_SpendableOutputDescriptorDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_SpendableOutputDescriptorDecodeErrorZ)); }
-       CResult_SpendableOutputDescriptorDecodeErrorZ(LDKCResult_SpendableOutputDescriptorDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ)); }
-       operator LDKCResult_SpendableOutputDescriptorDecodeErrorZ() && { LDKCResult_SpendableOutputDescriptorDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ)); return res; }
-       ~CResult_SpendableOutputDescriptorDecodeErrorZ() { CResult_SpendableOutputDescriptorDecodeErrorZ_free(self); }
-       CResult_SpendableOutputDescriptorDecodeErrorZ& operator=(CResult_SpendableOutputDescriptorDecodeErrorZ&& o) { CResult_SpendableOutputDescriptorDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_SpendableOutputDescriptorDecodeErrorZ)); return *this; }
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator ->() const { return &self; }
-};
 class CResult_NetAddressu8Z {
 private:
        LDKCResult_NetAddressu8Z self;
@@ -2516,66 +2186,6 @@ public:
        const LDKCVec_UpdateFailMalformedHTLCZ* operator &() const { return &self; }
        const LDKCVec_UpdateFailMalformedHTLCZ* operator ->() const { return &self; }
 };
-class CResult_FundingSignedDecodeErrorZ {
-private:
-       LDKCResult_FundingSignedDecodeErrorZ self;
-public:
-       CResult_FundingSignedDecodeErrorZ(const CResult_FundingSignedDecodeErrorZ&) = delete;
-       CResult_FundingSignedDecodeErrorZ(CResult_FundingSignedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_FundingSignedDecodeErrorZ)); }
-       CResult_FundingSignedDecodeErrorZ(LDKCResult_FundingSignedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_FundingSignedDecodeErrorZ)); }
-       operator LDKCResult_FundingSignedDecodeErrorZ() && { LDKCResult_FundingSignedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_FundingSignedDecodeErrorZ)); return res; }
-       ~CResult_FundingSignedDecodeErrorZ() { CResult_FundingSignedDecodeErrorZ_free(self); }
-       CResult_FundingSignedDecodeErrorZ& operator=(CResult_FundingSignedDecodeErrorZ&& o) { CResult_FundingSignedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_FundingSignedDecodeErrorZ)); return *this; }
-       LDKCResult_FundingSignedDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_FundingSignedDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_FundingSignedDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_FundingSignedDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_RevokeAndACKDecodeErrorZ {
-private:
-       LDKCResult_RevokeAndACKDecodeErrorZ self;
-public:
-       CResult_RevokeAndACKDecodeErrorZ(const CResult_RevokeAndACKDecodeErrorZ&) = delete;
-       CResult_RevokeAndACKDecodeErrorZ(CResult_RevokeAndACKDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RevokeAndACKDecodeErrorZ)); }
-       CResult_RevokeAndACKDecodeErrorZ(LDKCResult_RevokeAndACKDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RevokeAndACKDecodeErrorZ)); }
-       operator LDKCResult_RevokeAndACKDecodeErrorZ() && { LDKCResult_RevokeAndACKDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RevokeAndACKDecodeErrorZ)); return res; }
-       ~CResult_RevokeAndACKDecodeErrorZ() { CResult_RevokeAndACKDecodeErrorZ_free(self); }
-       CResult_RevokeAndACKDecodeErrorZ& operator=(CResult_RevokeAndACKDecodeErrorZ&& o) { CResult_RevokeAndACKDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_RevokeAndACKDecodeErrorZ)); return *this; }
-       LDKCResult_RevokeAndACKDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_RevokeAndACKDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_RevokeAndACKDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_RevokeAndACKDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_ShutdownDecodeErrorZ {
-private:
-       LDKCResult_ShutdownDecodeErrorZ self;
-public:
-       CResult_ShutdownDecodeErrorZ(const CResult_ShutdownDecodeErrorZ&) = delete;
-       CResult_ShutdownDecodeErrorZ(CResult_ShutdownDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ShutdownDecodeErrorZ)); }
-       CResult_ShutdownDecodeErrorZ(LDKCResult_ShutdownDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ShutdownDecodeErrorZ)); }
-       operator LDKCResult_ShutdownDecodeErrorZ() && { LDKCResult_ShutdownDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ShutdownDecodeErrorZ)); return res; }
-       ~CResult_ShutdownDecodeErrorZ() { CResult_ShutdownDecodeErrorZ_free(self); }
-       CResult_ShutdownDecodeErrorZ& operator=(CResult_ShutdownDecodeErrorZ&& o) { CResult_ShutdownDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ShutdownDecodeErrorZ)); return *this; }
-       LDKCResult_ShutdownDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ShutdownDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ShutdownDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ShutdownDecodeErrorZ* operator ->() const { return &self; }
-};
-class CVec_EventZ {
-private:
-       LDKCVec_EventZ self;
-public:
-       CVec_EventZ(const CVec_EventZ&) = delete;
-       CVec_EventZ(CVec_EventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_EventZ)); }
-       CVec_EventZ(LDKCVec_EventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_EventZ)); }
-       operator LDKCVec_EventZ() && { LDKCVec_EventZ res = self; memset(&self, 0, sizeof(LDKCVec_EventZ)); return res; }
-       ~CVec_EventZ() { CVec_EventZ_free(self); }
-       CVec_EventZ& operator=(CVec_EventZ&& o) { CVec_EventZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_EventZ)); return *this; }
-       LDKCVec_EventZ* operator &() { return &self; }
-       LDKCVec_EventZ* operator ->() { return &self; }
-       const LDKCVec_EventZ* operator &() const { return &self; }
-       const LDKCVec_EventZ* operator ->() const { return &self; }
-};
 class CResult_NetworkGraphDecodeErrorZ {
 private:
        LDKCResult_NetworkGraphDecodeErrorZ self;
@@ -2591,36 +2201,6 @@ public:
        const LDKCResult_NetworkGraphDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_NetworkGraphDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_UpdateFailHTLCDecodeErrorZ {
-private:
-       LDKCResult_UpdateFailHTLCDecodeErrorZ self;
-public:
-       CResult_UpdateFailHTLCDecodeErrorZ(const CResult_UpdateFailHTLCDecodeErrorZ&) = delete;
-       CResult_UpdateFailHTLCDecodeErrorZ(CResult_UpdateFailHTLCDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UpdateFailHTLCDecodeErrorZ)); }
-       CResult_UpdateFailHTLCDecodeErrorZ(LDKCResult_UpdateFailHTLCDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ)); }
-       operator LDKCResult_UpdateFailHTLCDecodeErrorZ() && { LDKCResult_UpdateFailHTLCDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ)); return res; }
-       ~CResult_UpdateFailHTLCDecodeErrorZ() { CResult_UpdateFailHTLCDecodeErrorZ_free(self); }
-       CResult_UpdateFailHTLCDecodeErrorZ& operator=(CResult_UpdateFailHTLCDecodeErrorZ&& o) { CResult_UpdateFailHTLCDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UpdateFailHTLCDecodeErrorZ)); return *this; }
-       LDKCResult_UpdateFailHTLCDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_UpdateFailHTLCDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_UpdateFailHTLCDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_UpdateFailHTLCDecodeErrorZ* operator ->() const { return &self; }
-};
-class CVec_MonitorEventZ {
-private:
-       LDKCVec_MonitorEventZ self;
-public:
-       CVec_MonitorEventZ(const CVec_MonitorEventZ&) = delete;
-       CVec_MonitorEventZ(CVec_MonitorEventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_MonitorEventZ)); }
-       CVec_MonitorEventZ(LDKCVec_MonitorEventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_MonitorEventZ)); }
-       operator LDKCVec_MonitorEventZ() && { LDKCVec_MonitorEventZ res = self; memset(&self, 0, sizeof(LDKCVec_MonitorEventZ)); return res; }
-       ~CVec_MonitorEventZ() { CVec_MonitorEventZ_free(self); }
-       CVec_MonitorEventZ& operator=(CVec_MonitorEventZ&& o) { CVec_MonitorEventZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_MonitorEventZ)); return *this; }
-       LDKCVec_MonitorEventZ* operator &() { return &self; }
-       LDKCVec_MonitorEventZ* operator ->() { return &self; }
-       const LDKCVec_MonitorEventZ* operator &() const { return &self; }
-       const LDKCVec_MonitorEventZ* operator ->() const { return &self; }
-};
 class CVec_RouteHopZ {
 private:
        LDKCVec_RouteHopZ self;
@@ -2636,36 +2216,6 @@ public:
        const LDKCVec_RouteHopZ* operator &() const { return &self; }
        const LDKCVec_RouteHopZ* operator ->() const { return &self; }
 };
-class CResult_UnsignedChannelUpdateDecodeErrorZ {
-private:
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ self;
-public:
-       CResult_UnsignedChannelUpdateDecodeErrorZ(const CResult_UnsignedChannelUpdateDecodeErrorZ&) = delete;
-       CResult_UnsignedChannelUpdateDecodeErrorZ(CResult_UnsignedChannelUpdateDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UnsignedChannelUpdateDecodeErrorZ)); }
-       CResult_UnsignedChannelUpdateDecodeErrorZ(LDKCResult_UnsignedChannelUpdateDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ)); }
-       operator LDKCResult_UnsignedChannelUpdateDecodeErrorZ() && { LDKCResult_UnsignedChannelUpdateDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ)); return res; }
-       ~CResult_UnsignedChannelUpdateDecodeErrorZ() { CResult_UnsignedChannelUpdateDecodeErrorZ_free(self); }
-       CResult_UnsignedChannelUpdateDecodeErrorZ& operator=(CResult_UnsignedChannelUpdateDecodeErrorZ&& o) { CResult_UnsignedChannelUpdateDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UnsignedChannelUpdateDecodeErrorZ)); return *this; }
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_NoneChannelMonitorUpdateErrZ {
-private:
-       LDKCResult_NoneChannelMonitorUpdateErrZ self;
-public:
-       CResult_NoneChannelMonitorUpdateErrZ(const CResult_NoneChannelMonitorUpdateErrZ&) = delete;
-       CResult_NoneChannelMonitorUpdateErrZ(CResult_NoneChannelMonitorUpdateErrZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneChannelMonitorUpdateErrZ)); }
-       CResult_NoneChannelMonitorUpdateErrZ(LDKCResult_NoneChannelMonitorUpdateErrZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ)); }
-       operator LDKCResult_NoneChannelMonitorUpdateErrZ() && { LDKCResult_NoneChannelMonitorUpdateErrZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ)); return res; }
-       ~CResult_NoneChannelMonitorUpdateErrZ() { CResult_NoneChannelMonitorUpdateErrZ_free(self); }
-       CResult_NoneChannelMonitorUpdateErrZ& operator=(CResult_NoneChannelMonitorUpdateErrZ&& o) { CResult_NoneChannelMonitorUpdateErrZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneChannelMonitorUpdateErrZ)); return *this; }
-       LDKCResult_NoneChannelMonitorUpdateErrZ* operator &() { return &self; }
-       LDKCResult_NoneChannelMonitorUpdateErrZ* operator ->() { return &self; }
-       const LDKCResult_NoneChannelMonitorUpdateErrZ* operator &() const { return &self; }
-       const LDKCResult_NoneChannelMonitorUpdateErrZ* operator ->() const { return &self; }
-};
 class CResult_NodeInfoDecodeErrorZ {
 private:
        LDKCResult_NodeInfoDecodeErrorZ self;
@@ -2711,21 +2261,6 @@ public:
        const LDKCVec_u8Z* operator &() const { return &self; }
        const LDKCVec_u8Z* operator ->() const { return &self; }
 };
-class CResult_PublicKeyErrorZ {
-private:
-       LDKCResult_PublicKeyErrorZ self;
-public:
-       CResult_PublicKeyErrorZ(const CResult_PublicKeyErrorZ&) = delete;
-       CResult_PublicKeyErrorZ(CResult_PublicKeyErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PublicKeyErrorZ)); }
-       CResult_PublicKeyErrorZ(LDKCResult_PublicKeyErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PublicKeyErrorZ)); }
-       operator LDKCResult_PublicKeyErrorZ() && { LDKCResult_PublicKeyErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PublicKeyErrorZ)); return res; }
-       ~CResult_PublicKeyErrorZ() { CResult_PublicKeyErrorZ_free(self); }
-       CResult_PublicKeyErrorZ& operator=(CResult_PublicKeyErrorZ&& o) { CResult_PublicKeyErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_PublicKeyErrorZ)); return *this; }
-       LDKCResult_PublicKeyErrorZ* operator &() { return &self; }
-       LDKCResult_PublicKeyErrorZ* operator ->() { return &self; }
-       const LDKCResult_PublicKeyErrorZ* operator &() const { return &self; }
-       const LDKCResult_PublicKeyErrorZ* operator ->() const { return &self; }
-};
 class CResult_ChannelPublicKeysDecodeErrorZ {
 private:
        LDKCResult_ChannelPublicKeysDecodeErrorZ self;
@@ -2741,21 +2276,6 @@ public:
        const LDKCResult_ChannelPublicKeysDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_ChannelPublicKeysDecodeErrorZ* operator ->() const { return &self; }
 };
-class C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
-private:
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ self;
-public:
-       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(const C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&) = delete;
-       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& o) : self(o.self) { memset(&o, 0, sizeof(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); }
-       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); }
-       operator LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ() && { LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ res = self; memset(&self, 0, sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); return res; }
-       ~C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ() { C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(self); }
-       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ& operator=(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& o) { C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(self); self = o.self; memset(&o, 0, sizeof(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); return *this; }
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() { return &self; }
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() { return &self; }
-       const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() const { return &self; }
-       const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() const { return &self; }
-};
 class CResult_RouteLightningErrorZ {
 private:
        LDKCResult_RouteLightningErrorZ self;
@@ -2771,21 +2291,6 @@ public:
        const LDKCResult_RouteLightningErrorZ* operator &() const { return &self; }
        const LDKCResult_RouteLightningErrorZ* operator ->() const { return &self; }
 };
-class CResult_boolPeerHandleErrorZ {
-private:
-       LDKCResult_boolPeerHandleErrorZ self;
-public:
-       CResult_boolPeerHandleErrorZ(const CResult_boolPeerHandleErrorZ&) = delete;
-       CResult_boolPeerHandleErrorZ(CResult_boolPeerHandleErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_boolPeerHandleErrorZ)); }
-       CResult_boolPeerHandleErrorZ(LDKCResult_boolPeerHandleErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_boolPeerHandleErrorZ)); }
-       operator LDKCResult_boolPeerHandleErrorZ() && { LDKCResult_boolPeerHandleErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_boolPeerHandleErrorZ)); return res; }
-       ~CResult_boolPeerHandleErrorZ() { CResult_boolPeerHandleErrorZ_free(self); }
-       CResult_boolPeerHandleErrorZ& operator=(CResult_boolPeerHandleErrorZ&& o) { CResult_boolPeerHandleErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_boolPeerHandleErrorZ)); return *this; }
-       LDKCResult_boolPeerHandleErrorZ* operator &() { return &self; }
-       LDKCResult_boolPeerHandleErrorZ* operator ->() { return &self; }
-       const LDKCResult_boolPeerHandleErrorZ* operator &() const { return &self; }
-       const LDKCResult_boolPeerHandleErrorZ* operator ->() const { return &self; }
-};
 class CResult_ClosingSignedDecodeErrorZ {
 private:
        LDKCResult_ClosingSignedDecodeErrorZ self;
@@ -2801,21 +2306,6 @@ public:
        const LDKCResult_ClosingSignedDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_ClosingSignedDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_ChannelUpdateDecodeErrorZ {
-private:
-       LDKCResult_ChannelUpdateDecodeErrorZ self;
-public:
-       CResult_ChannelUpdateDecodeErrorZ(const CResult_ChannelUpdateDecodeErrorZ&) = delete;
-       CResult_ChannelUpdateDecodeErrorZ(CResult_ChannelUpdateDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelUpdateDecodeErrorZ)); }
-       CResult_ChannelUpdateDecodeErrorZ(LDKCResult_ChannelUpdateDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelUpdateDecodeErrorZ)); }
-       operator LDKCResult_ChannelUpdateDecodeErrorZ() && { LDKCResult_ChannelUpdateDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelUpdateDecodeErrorZ)); return res; }
-       ~CResult_ChannelUpdateDecodeErrorZ() { CResult_ChannelUpdateDecodeErrorZ_free(self); }
-       CResult_ChannelUpdateDecodeErrorZ& operator=(CResult_ChannelUpdateDecodeErrorZ&& o) { CResult_ChannelUpdateDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelUpdateDecodeErrorZ)); return *this; }
-       LDKCResult_ChannelUpdateDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ChannelUpdateDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ChannelUpdateDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ChannelUpdateDecodeErrorZ* operator ->() const { return &self; }
-};
 class CResult_HolderCommitmentTransactionDecodeErrorZ {
 private:
        LDKCResult_HolderCommitmentTransactionDecodeErrorZ self;
@@ -2831,20 +2321,20 @@ public:
        const LDKCResult_HolderCommitmentTransactionDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_HolderCommitmentTransactionDecodeErrorZ* operator ->() const { return &self; }
 };
-class CVec_UpdateFulfillHTLCZ {
+class CVec_CResult_NoneAPIErrorZZ {
 private:
-       LDKCVec_UpdateFulfillHTLCZ self;
+       LDKCVec_CResult_NoneAPIErrorZZ self;
 public:
-       CVec_UpdateFulfillHTLCZ(const CVec_UpdateFulfillHTLCZ&) = delete;
-       CVec_UpdateFulfillHTLCZ(CVec_UpdateFulfillHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateFulfillHTLCZ)); }
-       CVec_UpdateFulfillHTLCZ(LDKCVec_UpdateFulfillHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateFulfillHTLCZ)); }
-       operator LDKCVec_UpdateFulfillHTLCZ() && { LDKCVec_UpdateFulfillHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateFulfillHTLCZ)); return res; }
-       ~CVec_UpdateFulfillHTLCZ() { CVec_UpdateFulfillHTLCZ_free(self); }
-       CVec_UpdateFulfillHTLCZ& operator=(CVec_UpdateFulfillHTLCZ&& o) { CVec_UpdateFulfillHTLCZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_UpdateFulfillHTLCZ)); return *this; }
-       LDKCVec_UpdateFulfillHTLCZ* operator &() { return &self; }
-       LDKCVec_UpdateFulfillHTLCZ* operator ->() { return &self; }
-       const LDKCVec_UpdateFulfillHTLCZ* operator &() const { return &self; }
-       const LDKCVec_UpdateFulfillHTLCZ* operator ->() const { return &self; }
+       CVec_CResult_NoneAPIErrorZZ(const CVec_CResult_NoneAPIErrorZZ&) = delete;
+       CVec_CResult_NoneAPIErrorZZ(CVec_CResult_NoneAPIErrorZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_CResult_NoneAPIErrorZZ)); }
+       CVec_CResult_NoneAPIErrorZZ(LDKCVec_CResult_NoneAPIErrorZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_CResult_NoneAPIErrorZZ)); }
+       operator LDKCVec_CResult_NoneAPIErrorZZ() && { LDKCVec_CResult_NoneAPIErrorZZ res = self; memset(&self, 0, sizeof(LDKCVec_CResult_NoneAPIErrorZZ)); return res; }
+       ~CVec_CResult_NoneAPIErrorZZ() { CVec_CResult_NoneAPIErrorZZ_free(self); }
+       CVec_CResult_NoneAPIErrorZZ& operator=(CVec_CResult_NoneAPIErrorZZ&& o) { CVec_CResult_NoneAPIErrorZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_CResult_NoneAPIErrorZZ)); return *this; }
+       LDKCVec_CResult_NoneAPIErrorZZ* operator &() { return &self; }
+       LDKCVec_CResult_NoneAPIErrorZZ* operator ->() { return &self; }
+       const LDKCVec_CResult_NoneAPIErrorZZ* operator &() const { return &self; }
+       const LDKCVec_CResult_NoneAPIErrorZZ* operator ->() const { return &self; }
 };
 class CResult_SignatureNoneZ {
 private:
@@ -2876,39 +2366,9 @@ public:
        const LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator &() const { return &self; }
        const LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* operator ->() const { return &self; }
 };
-class CResult_ChannelKeysDecodeErrorZ {
+class CResult_InitDecodeErrorZ {
 private:
-       LDKCResult_ChannelKeysDecodeErrorZ self;
-public:
-       CResult_ChannelKeysDecodeErrorZ(const CResult_ChannelKeysDecodeErrorZ&) = delete;
-       CResult_ChannelKeysDecodeErrorZ(CResult_ChannelKeysDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelKeysDecodeErrorZ)); }
-       CResult_ChannelKeysDecodeErrorZ(LDKCResult_ChannelKeysDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelKeysDecodeErrorZ)); }
-       operator LDKCResult_ChannelKeysDecodeErrorZ() && { LDKCResult_ChannelKeysDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelKeysDecodeErrorZ)); return res; }
-       ~CResult_ChannelKeysDecodeErrorZ() { CResult_ChannelKeysDecodeErrorZ_free(self); }
-       CResult_ChannelKeysDecodeErrorZ& operator=(CResult_ChannelKeysDecodeErrorZ&& o) { CResult_ChannelKeysDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelKeysDecodeErrorZ)); return *this; }
-       LDKCResult_ChannelKeysDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ChannelKeysDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ChannelKeysDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ChannelKeysDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_AnnouncementSignaturesDecodeErrorZ {
-private:
-       LDKCResult_AnnouncementSignaturesDecodeErrorZ self;
-public:
-       CResult_AnnouncementSignaturesDecodeErrorZ(const CResult_AnnouncementSignaturesDecodeErrorZ&) = delete;
-       CResult_AnnouncementSignaturesDecodeErrorZ(CResult_AnnouncementSignaturesDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_AnnouncementSignaturesDecodeErrorZ)); }
-       CResult_AnnouncementSignaturesDecodeErrorZ(LDKCResult_AnnouncementSignaturesDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ)); }
-       operator LDKCResult_AnnouncementSignaturesDecodeErrorZ() && { LDKCResult_AnnouncementSignaturesDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ)); return res; }
-       ~CResult_AnnouncementSignaturesDecodeErrorZ() { CResult_AnnouncementSignaturesDecodeErrorZ_free(self); }
-       CResult_AnnouncementSignaturesDecodeErrorZ& operator=(CResult_AnnouncementSignaturesDecodeErrorZ&& o) { CResult_AnnouncementSignaturesDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_AnnouncementSignaturesDecodeErrorZ)); return *this; }
-       LDKCResult_AnnouncementSignaturesDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_AnnouncementSignaturesDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_AnnouncementSignaturesDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_AnnouncementSignaturesDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_InitDecodeErrorZ {
-private:
-       LDKCResult_InitDecodeErrorZ self;
+       LDKCResult_InitDecodeErrorZ self;
 public:
        CResult_InitDecodeErrorZ(const CResult_InitDecodeErrorZ&) = delete;
        CResult_InitDecodeErrorZ(CResult_InitDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_InitDecodeErrorZ)); }
@@ -2921,51 +2381,6 @@ public:
        const LDKCResult_InitDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_InitDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_NodeFeaturesDecodeErrorZ {
-private:
-       LDKCResult_NodeFeaturesDecodeErrorZ self;
-public:
-       CResult_NodeFeaturesDecodeErrorZ(const CResult_NodeFeaturesDecodeErrorZ&) = delete;
-       CResult_NodeFeaturesDecodeErrorZ(CResult_NodeFeaturesDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NodeFeaturesDecodeErrorZ)); }
-       CResult_NodeFeaturesDecodeErrorZ(LDKCResult_NodeFeaturesDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NodeFeaturesDecodeErrorZ)); }
-       operator LDKCResult_NodeFeaturesDecodeErrorZ() && { LDKCResult_NodeFeaturesDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NodeFeaturesDecodeErrorZ)); return res; }
-       ~CResult_NodeFeaturesDecodeErrorZ() { CResult_NodeFeaturesDecodeErrorZ_free(self); }
-       CResult_NodeFeaturesDecodeErrorZ& operator=(CResult_NodeFeaturesDecodeErrorZ&& o) { CResult_NodeFeaturesDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NodeFeaturesDecodeErrorZ)); return *this; }
-       LDKCResult_NodeFeaturesDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_NodeFeaturesDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_NodeFeaturesDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_NodeFeaturesDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_UpdateFulfillHTLCDecodeErrorZ {
-private:
-       LDKCResult_UpdateFulfillHTLCDecodeErrorZ self;
-public:
-       CResult_UpdateFulfillHTLCDecodeErrorZ(const CResult_UpdateFulfillHTLCDecodeErrorZ&) = delete;
-       CResult_UpdateFulfillHTLCDecodeErrorZ(CResult_UpdateFulfillHTLCDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UpdateFulfillHTLCDecodeErrorZ)); }
-       CResult_UpdateFulfillHTLCDecodeErrorZ(LDKCResult_UpdateFulfillHTLCDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ)); }
-       operator LDKCResult_UpdateFulfillHTLCDecodeErrorZ() && { LDKCResult_UpdateFulfillHTLCDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ)); return res; }
-       ~CResult_UpdateFulfillHTLCDecodeErrorZ() { CResult_UpdateFulfillHTLCDecodeErrorZ_free(self); }
-       CResult_UpdateFulfillHTLCDecodeErrorZ& operator=(CResult_UpdateFulfillHTLCDecodeErrorZ&& o) { CResult_UpdateFulfillHTLCDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UpdateFulfillHTLCDecodeErrorZ)); return *this; }
-       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_UpdateFulfillHTLCDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_UpdateFulfillHTLCDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_ReplyShortChannelIdsEndDecodeErrorZ {
-private:
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ self;
-public:
-       CResult_ReplyShortChannelIdsEndDecodeErrorZ(const CResult_ReplyShortChannelIdsEndDecodeErrorZ&) = delete;
-       CResult_ReplyShortChannelIdsEndDecodeErrorZ(CResult_ReplyShortChannelIdsEndDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ReplyShortChannelIdsEndDecodeErrorZ)); }
-       CResult_ReplyShortChannelIdsEndDecodeErrorZ(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ)); }
-       operator LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ() && { LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ)); return res; }
-       ~CResult_ReplyShortChannelIdsEndDecodeErrorZ() { CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(self); }
-       CResult_ReplyShortChannelIdsEndDecodeErrorZ& operator=(CResult_ReplyShortChannelIdsEndDecodeErrorZ&& o) { CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ReplyShortChannelIdsEndDecodeErrorZ)); return *this; }
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator ->() const { return &self; }
-};
 class CResult_OutPointDecodeErrorZ {
 private:
        LDKCResult_OutPointDecodeErrorZ self;
@@ -2996,21 +2411,6 @@ public:
        const LDKCVec_ChannelDetailsZ* operator &() const { return &self; }
        const LDKCVec_ChannelDetailsZ* operator ->() const { return &self; }
 };
-class CResult_CResult_NetAddressu8ZDecodeErrorZ {
-private:
-       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ self;
-public:
-       CResult_CResult_NetAddressu8ZDecodeErrorZ(const CResult_CResult_NetAddressu8ZDecodeErrorZ&) = delete;
-       CResult_CResult_NetAddressu8ZDecodeErrorZ(CResult_CResult_NetAddressu8ZDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CResult_NetAddressu8ZDecodeErrorZ)); }
-       CResult_CResult_NetAddressu8ZDecodeErrorZ(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ)); }
-       operator LDKCResult_CResult_NetAddressu8ZDecodeErrorZ() && { LDKCResult_CResult_NetAddressu8ZDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ)); return res; }
-       ~CResult_CResult_NetAddressu8ZDecodeErrorZ() { CResult_CResult_NetAddressu8ZDecodeErrorZ_free(self); }
-       CResult_CResult_NetAddressu8ZDecodeErrorZ& operator=(CResult_CResult_NetAddressu8ZDecodeErrorZ&& o) { CResult_CResult_NetAddressu8ZDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CResult_NetAddressu8ZDecodeErrorZ)); return *this; }
-       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator ->() const { return &self; }
-};
 class CVec_MessageSendEventZ {
 private:
        LDKCVec_MessageSendEventZ self;
@@ -3041,36 +2441,6 @@ public:
        const LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator &() const { return &self; }
        const LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ* operator ->() const { return &self; }
 };
-class CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
-private:
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ self;
-public:
-       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ(const CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ&) = delete;
-       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ)); }
-       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ)); }
-       operator LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ() && { LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ)); return res; }
-       ~CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ() { CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(self); }
-       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ& operator=(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ&& o) { CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ)); return *this; }
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_BuiltCommitmentTransactionDecodeErrorZ {
-private:
-       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ self;
-public:
-       CResult_BuiltCommitmentTransactionDecodeErrorZ(const CResult_BuiltCommitmentTransactionDecodeErrorZ&) = delete;
-       CResult_BuiltCommitmentTransactionDecodeErrorZ(CResult_BuiltCommitmentTransactionDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_BuiltCommitmentTransactionDecodeErrorZ)); }
-       CResult_BuiltCommitmentTransactionDecodeErrorZ(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ)); }
-       operator LDKCResult_BuiltCommitmentTransactionDecodeErrorZ() && { LDKCResult_BuiltCommitmentTransactionDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ)); return res; }
-       ~CResult_BuiltCommitmentTransactionDecodeErrorZ() { CResult_BuiltCommitmentTransactionDecodeErrorZ_free(self); }
-       CResult_BuiltCommitmentTransactionDecodeErrorZ& operator=(CResult_BuiltCommitmentTransactionDecodeErrorZ&& o) { CResult_BuiltCommitmentTransactionDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_BuiltCommitmentTransactionDecodeErrorZ)); return *this; }
-       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* operator ->() const { return &self; }
-};
 class C2Tuple_OutPointScriptZ {
 private:
        LDKC2Tuple_OutPointScriptZ self;
@@ -3101,20 +2471,20 @@ public:
        const LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator &() const { return &self; }
        const LDKCResult_InMemoryChannelKeysDecodeErrorZ* operator ->() const { return &self; }
 };
-class CResult_RouteDecodeErrorZ {
+class CResult_UpdateFailMalformedHTLCDecodeErrorZ {
 private:
-       LDKCResult_RouteDecodeErrorZ self;
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ self;
 public:
-       CResult_RouteDecodeErrorZ(const CResult_RouteDecodeErrorZ&) = delete;
-       CResult_RouteDecodeErrorZ(CResult_RouteDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RouteDecodeErrorZ)); }
-       CResult_RouteDecodeErrorZ(LDKCResult_RouteDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RouteDecodeErrorZ)); }
-       operator LDKCResult_RouteDecodeErrorZ() && { LDKCResult_RouteDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RouteDecodeErrorZ)); return res; }
-       ~CResult_RouteDecodeErrorZ() { CResult_RouteDecodeErrorZ_free(self); }
-       CResult_RouteDecodeErrorZ& operator=(CResult_RouteDecodeErrorZ&& o) { CResult_RouteDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_RouteDecodeErrorZ)); return *this; }
-       LDKCResult_RouteDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_RouteDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_RouteDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_RouteDecodeErrorZ* operator ->() const { return &self; }
+       CResult_UpdateFailMalformedHTLCDecodeErrorZ(const CResult_UpdateFailMalformedHTLCDecodeErrorZ&) = delete;
+       CResult_UpdateFailMalformedHTLCDecodeErrorZ(CResult_UpdateFailMalformedHTLCDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UpdateFailMalformedHTLCDecodeErrorZ)); }
+       CResult_UpdateFailMalformedHTLCDecodeErrorZ(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ)); }
+       operator LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ() && { LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ)); return res; }
+       ~CResult_UpdateFailMalformedHTLCDecodeErrorZ() { CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(self); }
+       CResult_UpdateFailMalformedHTLCDecodeErrorZ& operator=(CResult_UpdateFailMalformedHTLCDecodeErrorZ&& o) { CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UpdateFailMalformedHTLCDecodeErrorZ)); return *this; }
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* operator ->() const { return &self; }
 };
 class CVec_NodeAnnouncementZ {
 private:
@@ -3131,50 +2501,20 @@ public:
        const LDKCVec_NodeAnnouncementZ* operator &() const { return &self; }
        const LDKCVec_NodeAnnouncementZ* operator ->() const { return &self; }
 };
-class CVec_UpdateFailHTLCZ {
-private:
-       LDKCVec_UpdateFailHTLCZ self;
-public:
-       CVec_UpdateFailHTLCZ(const CVec_UpdateFailHTLCZ&) = delete;
-       CVec_UpdateFailHTLCZ(CVec_UpdateFailHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateFailHTLCZ)); }
-       CVec_UpdateFailHTLCZ(LDKCVec_UpdateFailHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateFailHTLCZ)); }
-       operator LDKCVec_UpdateFailHTLCZ() && { LDKCVec_UpdateFailHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateFailHTLCZ)); return res; }
-       ~CVec_UpdateFailHTLCZ() { CVec_UpdateFailHTLCZ_free(self); }
-       CVec_UpdateFailHTLCZ& operator=(CVec_UpdateFailHTLCZ&& o) { CVec_UpdateFailHTLCZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_UpdateFailHTLCZ)); return *this; }
-       LDKCVec_UpdateFailHTLCZ* operator &() { return &self; }
-       LDKCVec_UpdateFailHTLCZ* operator ->() { return &self; }
-       const LDKCVec_UpdateFailHTLCZ* operator &() const { return &self; }
-       const LDKCVec_UpdateFailHTLCZ* operator ->() const { return &self; }
-};
-class CResult_FundingLockedDecodeErrorZ {
-private:
-       LDKCResult_FundingLockedDecodeErrorZ self;
-public:
-       CResult_FundingLockedDecodeErrorZ(const CResult_FundingLockedDecodeErrorZ&) = delete;
-       CResult_FundingLockedDecodeErrorZ(CResult_FundingLockedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_FundingLockedDecodeErrorZ)); }
-       CResult_FundingLockedDecodeErrorZ(LDKCResult_FundingLockedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_FundingLockedDecodeErrorZ)); }
-       operator LDKCResult_FundingLockedDecodeErrorZ() && { LDKCResult_FundingLockedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_FundingLockedDecodeErrorZ)); return res; }
-       ~CResult_FundingLockedDecodeErrorZ() { CResult_FundingLockedDecodeErrorZ_free(self); }
-       CResult_FundingLockedDecodeErrorZ& operator=(CResult_FundingLockedDecodeErrorZ&& o) { CResult_FundingLockedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_FundingLockedDecodeErrorZ)); return *this; }
-       LDKCResult_FundingLockedDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_FundingLockedDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_FundingLockedDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_FundingLockedDecodeErrorZ* operator ->() const { return &self; }
-};
-class CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+class CResult_UnsignedChannelAnnouncementDecodeErrorZ {
 private:
-       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ self;
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ self;
 public:
-       CResult_UpdateFailMalformedHTLCDecodeErrorZ(const CResult_UpdateFailMalformedHTLCDecodeErrorZ&) = delete;
-       CResult_UpdateFailMalformedHTLCDecodeErrorZ(CResult_UpdateFailMalformedHTLCDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UpdateFailMalformedHTLCDecodeErrorZ)); }
-       CResult_UpdateFailMalformedHTLCDecodeErrorZ(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ)); }
-       operator LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ() && { LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ)); return res; }
-       ~CResult_UpdateFailMalformedHTLCDecodeErrorZ() { CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(self); }
-       CResult_UpdateFailMalformedHTLCDecodeErrorZ& operator=(CResult_UpdateFailMalformedHTLCDecodeErrorZ&& o) { CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UpdateFailMalformedHTLCDecodeErrorZ)); return *this; }
-       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* operator &() { return &self; }
-       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* operator ->() { return &self; }
-       const LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* operator &() const { return &self; }
-       const LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* operator ->() const { return &self; }
+       CResult_UnsignedChannelAnnouncementDecodeErrorZ(const CResult_UnsignedChannelAnnouncementDecodeErrorZ&) = delete;
+       CResult_UnsignedChannelAnnouncementDecodeErrorZ(CResult_UnsignedChannelAnnouncementDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UnsignedChannelAnnouncementDecodeErrorZ)); }
+       CResult_UnsignedChannelAnnouncementDecodeErrorZ(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ)); }
+       operator LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ() && { LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ)); return res; }
+       ~CResult_UnsignedChannelAnnouncementDecodeErrorZ() { CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(self); }
+       CResult_UnsignedChannelAnnouncementDecodeErrorZ& operator=(CResult_UnsignedChannelAnnouncementDecodeErrorZ&& o) { CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UnsignedChannelAnnouncementDecodeErrorZ)); return *this; }
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* operator ->() const { return &self; }
 };
 class CResult_PongDecodeErrorZ {
 private:
@@ -3206,4 +2546,784 @@ public:
        const LDKCResult_NoneMonitorUpdateErrorZ* operator &() const { return &self; }
        const LDKCResult_NoneMonitorUpdateErrorZ* operator ->() const { return &self; }
 };
+class CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
+private:
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ self;
+public:
+       CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ(const CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ&) = delete;
+       CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ)); }
+       CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ)); }
+       operator LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ() && { LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ)); return res; }
+       ~CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ() { CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(self); }
+       CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ& operator=(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ&& o) { CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ)); return *this; }
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator &() { return &self; }
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator ->() { return &self; }
+       const LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator &() const { return &self; }
+       const LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* operator ->() const { return &self; }
+};
+class CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
+private:
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ self;
+public:
+       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(const CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ&) = delete;
+       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ)); }
+       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ)); }
+       operator LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ() && { LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ res = self; memset(&self, 0, sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ)); return res; }
+       ~CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ() { CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(self); }
+       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ& operator=(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ&& o) { CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ)); return *this; }
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator &() { return &self; }
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator ->() { return &self; }
+       const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator &() const { return &self; }
+       const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ* operator ->() const { return &self; }
+};
+class CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
+private:
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ self;
+public:
+       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ(const CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ&) = delete;
+       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ)); }
+       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ)); }
+       operator LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ() && { LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ)); return res; }
+       ~CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ() { CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(self); }
+       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ& operator=(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ&& o) { CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ)); return *this; }
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_CVec_CVec_u8ZZNoneZ {
+private:
+       LDKCResult_CVec_CVec_u8ZZNoneZ self;
+public:
+       CResult_CVec_CVec_u8ZZNoneZ(const CResult_CVec_CVec_u8ZZNoneZ&) = delete;
+       CResult_CVec_CVec_u8ZZNoneZ(CResult_CVec_CVec_u8ZZNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CVec_CVec_u8ZZNoneZ)); }
+       CResult_CVec_CVec_u8ZZNoneZ(LDKCResult_CVec_CVec_u8ZZNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ)); }
+       operator LDKCResult_CVec_CVec_u8ZZNoneZ() && { LDKCResult_CVec_CVec_u8ZZNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ)); return res; }
+       ~CResult_CVec_CVec_u8ZZNoneZ() { CResult_CVec_CVec_u8ZZNoneZ_free(self); }
+       CResult_CVec_CVec_u8ZZNoneZ& operator=(CResult_CVec_CVec_u8ZZNoneZ&& o) { CResult_CVec_CVec_u8ZZNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CVec_CVec_u8ZZNoneZ)); return *this; }
+       LDKCResult_CVec_CVec_u8ZZNoneZ* operator &() { return &self; }
+       LDKCResult_CVec_CVec_u8ZZNoneZ* operator ->() { return &self; }
+       const LDKCResult_CVec_CVec_u8ZZNoneZ* operator &() const { return &self; }
+       const LDKCResult_CVec_CVec_u8ZZNoneZ* operator ->() const { return &self; }
+};
+class CResult_AcceptChannelDecodeErrorZ {
+private:
+       LDKCResult_AcceptChannelDecodeErrorZ self;
+public:
+       CResult_AcceptChannelDecodeErrorZ(const CResult_AcceptChannelDecodeErrorZ&) = delete;
+       CResult_AcceptChannelDecodeErrorZ(CResult_AcceptChannelDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_AcceptChannelDecodeErrorZ)); }
+       CResult_AcceptChannelDecodeErrorZ(LDKCResult_AcceptChannelDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_AcceptChannelDecodeErrorZ)); }
+       operator LDKCResult_AcceptChannelDecodeErrorZ() && { LDKCResult_AcceptChannelDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_AcceptChannelDecodeErrorZ)); return res; }
+       ~CResult_AcceptChannelDecodeErrorZ() { CResult_AcceptChannelDecodeErrorZ_free(self); }
+       CResult_AcceptChannelDecodeErrorZ& operator=(CResult_AcceptChannelDecodeErrorZ&& o) { CResult_AcceptChannelDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_AcceptChannelDecodeErrorZ)); return *this; }
+       LDKCResult_AcceptChannelDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_AcceptChannelDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_AcceptChannelDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_AcceptChannelDecodeErrorZ* operator ->() const { return &self; }
+};
+class C2Tuple_BlockHashChannelManagerZ {
+private:
+       LDKC2Tuple_BlockHashChannelManagerZ self;
+public:
+       C2Tuple_BlockHashChannelManagerZ(const C2Tuple_BlockHashChannelManagerZ&) = delete;
+       C2Tuple_BlockHashChannelManagerZ(C2Tuple_BlockHashChannelManagerZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_BlockHashChannelManagerZ)); }
+       C2Tuple_BlockHashChannelManagerZ(LDKC2Tuple_BlockHashChannelManagerZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_BlockHashChannelManagerZ)); }
+       operator LDKC2Tuple_BlockHashChannelManagerZ() && { LDKC2Tuple_BlockHashChannelManagerZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_BlockHashChannelManagerZ)); return res; }
+       ~C2Tuple_BlockHashChannelManagerZ() { C2Tuple_BlockHashChannelManagerZ_free(self); }
+       C2Tuple_BlockHashChannelManagerZ& operator=(C2Tuple_BlockHashChannelManagerZ&& o) { C2Tuple_BlockHashChannelManagerZ_free(self); self = o.self; memset(&o, 0, sizeof(C2Tuple_BlockHashChannelManagerZ)); return *this; }
+       LDKC2Tuple_BlockHashChannelManagerZ* operator &() { return &self; }
+       LDKC2Tuple_BlockHashChannelManagerZ* operator ->() { return &self; }
+       const LDKC2Tuple_BlockHashChannelManagerZ* operator &() const { return &self; }
+       const LDKC2Tuple_BlockHashChannelManagerZ* operator ->() const { return &self; }
+};
+class CResult_ChannelTransactionParametersDecodeErrorZ {
+private:
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ self;
+public:
+       CResult_ChannelTransactionParametersDecodeErrorZ(const CResult_ChannelTransactionParametersDecodeErrorZ&) = delete;
+       CResult_ChannelTransactionParametersDecodeErrorZ(CResult_ChannelTransactionParametersDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelTransactionParametersDecodeErrorZ)); }
+       CResult_ChannelTransactionParametersDecodeErrorZ(LDKCResult_ChannelTransactionParametersDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ)); }
+       operator LDKCResult_ChannelTransactionParametersDecodeErrorZ() && { LDKCResult_ChannelTransactionParametersDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ)); return res; }
+       ~CResult_ChannelTransactionParametersDecodeErrorZ() { CResult_ChannelTransactionParametersDecodeErrorZ_free(self); }
+       CResult_ChannelTransactionParametersDecodeErrorZ& operator=(CResult_ChannelTransactionParametersDecodeErrorZ&& o) { CResult_ChannelTransactionParametersDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelTransactionParametersDecodeErrorZ)); return *this; }
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ChannelTransactionParametersDecodeErrorZ* operator ->() const { return &self; }
+};
+class CVec_SignatureZ {
+private:
+       LDKCVec_SignatureZ self;
+public:
+       CVec_SignatureZ(const CVec_SignatureZ&) = delete;
+       CVec_SignatureZ(CVec_SignatureZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_SignatureZ)); }
+       CVec_SignatureZ(LDKCVec_SignatureZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_SignatureZ)); }
+       operator LDKCVec_SignatureZ() && { LDKCVec_SignatureZ res = self; memset(&self, 0, sizeof(LDKCVec_SignatureZ)); return res; }
+       ~CVec_SignatureZ() { CVec_SignatureZ_free(self); }
+       CVec_SignatureZ& operator=(CVec_SignatureZ&& o) { CVec_SignatureZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_SignatureZ)); return *this; }
+       LDKCVec_SignatureZ* operator &() { return &self; }
+       LDKCVec_SignatureZ* operator ->() { return &self; }
+       const LDKCVec_SignatureZ* operator &() const { return &self; }
+       const LDKCVec_SignatureZ* operator ->() const { return &self; }
+};
+class CVec_u64Z {
+private:
+       LDKCVec_u64Z self;
+public:
+       CVec_u64Z(const CVec_u64Z&) = delete;
+       CVec_u64Z(CVec_u64Z&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_u64Z)); }
+       CVec_u64Z(LDKCVec_u64Z&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_u64Z)); }
+       operator LDKCVec_u64Z() && { LDKCVec_u64Z res = self; memset(&self, 0, sizeof(LDKCVec_u64Z)); return res; }
+       ~CVec_u64Z() { CVec_u64Z_free(self); }
+       CVec_u64Z& operator=(CVec_u64Z&& o) { CVec_u64Z_free(self); self = o.self; memset(&o, 0, sizeof(CVec_u64Z)); return *this; }
+       LDKCVec_u64Z* operator &() { return &self; }
+       LDKCVec_u64Z* operator ->() { return &self; }
+       const LDKCVec_u64Z* operator &() const { return &self; }
+       const LDKCVec_u64Z* operator ->() const { return &self; }
+};
+class CVec_RouteHintZ {
+private:
+       LDKCVec_RouteHintZ self;
+public:
+       CVec_RouteHintZ(const CVec_RouteHintZ&) = delete;
+       CVec_RouteHintZ(CVec_RouteHintZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_RouteHintZ)); }
+       CVec_RouteHintZ(LDKCVec_RouteHintZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_RouteHintZ)); }
+       operator LDKCVec_RouteHintZ() && { LDKCVec_RouteHintZ res = self; memset(&self, 0, sizeof(LDKCVec_RouteHintZ)); return res; }
+       ~CVec_RouteHintZ() { CVec_RouteHintZ_free(self); }
+       CVec_RouteHintZ& operator=(CVec_RouteHintZ&& o) { CVec_RouteHintZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_RouteHintZ)); return *this; }
+       LDKCVec_RouteHintZ* operator &() { return &self; }
+       LDKCVec_RouteHintZ* operator ->() { return &self; }
+       const LDKCVec_RouteHintZ* operator &() const { return &self; }
+       const LDKCVec_RouteHintZ* operator ->() const { return &self; }
+};
+class CVec_CVec_RouteHopZZ {
+private:
+       LDKCVec_CVec_RouteHopZZ self;
+public:
+       CVec_CVec_RouteHopZZ(const CVec_CVec_RouteHopZZ&) = delete;
+       CVec_CVec_RouteHopZZ(CVec_CVec_RouteHopZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_CVec_RouteHopZZ)); }
+       CVec_CVec_RouteHopZZ(LDKCVec_CVec_RouteHopZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_CVec_RouteHopZZ)); }
+       operator LDKCVec_CVec_RouteHopZZ() && { LDKCVec_CVec_RouteHopZZ res = self; memset(&self, 0, sizeof(LDKCVec_CVec_RouteHopZZ)); return res; }
+       ~CVec_CVec_RouteHopZZ() { CVec_CVec_RouteHopZZ_free(self); }
+       CVec_CVec_RouteHopZZ& operator=(CVec_CVec_RouteHopZZ&& o) { CVec_CVec_RouteHopZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_CVec_RouteHopZZ)); return *this; }
+       LDKCVec_CVec_RouteHopZZ* operator &() { return &self; }
+       LDKCVec_CVec_RouteHopZZ* operator ->() { return &self; }
+       const LDKCVec_CVec_RouteHopZZ* operator &() const { return &self; }
+       const LDKCVec_CVec_RouteHopZZ* operator ->() const { return &self; }
+};
+class CResult_TrustedCommitmentTransactionNoneZ {
+private:
+       LDKCResult_TrustedCommitmentTransactionNoneZ self;
+public:
+       CResult_TrustedCommitmentTransactionNoneZ(const CResult_TrustedCommitmentTransactionNoneZ&) = delete;
+       CResult_TrustedCommitmentTransactionNoneZ(CResult_TrustedCommitmentTransactionNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_TrustedCommitmentTransactionNoneZ)); }
+       CResult_TrustedCommitmentTransactionNoneZ(LDKCResult_TrustedCommitmentTransactionNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ)); }
+       operator LDKCResult_TrustedCommitmentTransactionNoneZ() && { LDKCResult_TrustedCommitmentTransactionNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ)); return res; }
+       ~CResult_TrustedCommitmentTransactionNoneZ() { CResult_TrustedCommitmentTransactionNoneZ_free(self); }
+       CResult_TrustedCommitmentTransactionNoneZ& operator=(CResult_TrustedCommitmentTransactionNoneZ&& o) { CResult_TrustedCommitmentTransactionNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_TrustedCommitmentTransactionNoneZ)); return *this; }
+       LDKCResult_TrustedCommitmentTransactionNoneZ* operator &() { return &self; }
+       LDKCResult_TrustedCommitmentTransactionNoneZ* operator ->() { return &self; }
+       const LDKCResult_TrustedCommitmentTransactionNoneZ* operator &() const { return &self; }
+       const LDKCResult_TrustedCommitmentTransactionNoneZ* operator ->() const { return &self; }
+};
+class CResult_NonePeerHandleErrorZ {
+private:
+       LDKCResult_NonePeerHandleErrorZ self;
+public:
+       CResult_NonePeerHandleErrorZ(const CResult_NonePeerHandleErrorZ&) = delete;
+       CResult_NonePeerHandleErrorZ(CResult_NonePeerHandleErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NonePeerHandleErrorZ)); }
+       CResult_NonePeerHandleErrorZ(LDKCResult_NonePeerHandleErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NonePeerHandleErrorZ)); }
+       operator LDKCResult_NonePeerHandleErrorZ() && { LDKCResult_NonePeerHandleErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NonePeerHandleErrorZ)); return res; }
+       ~CResult_NonePeerHandleErrorZ() { CResult_NonePeerHandleErrorZ_free(self); }
+       CResult_NonePeerHandleErrorZ& operator=(CResult_NonePeerHandleErrorZ&& o) { CResult_NonePeerHandleErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NonePeerHandleErrorZ)); return *this; }
+       LDKCResult_NonePeerHandleErrorZ* operator &() { return &self; }
+       LDKCResult_NonePeerHandleErrorZ* operator ->() { return &self; }
+       const LDKCResult_NonePeerHandleErrorZ* operator &() const { return &self; }
+       const LDKCResult_NonePeerHandleErrorZ* operator ->() const { return &self; }
+};
+class CResult_NoneLightningErrorZ {
+private:
+       LDKCResult_NoneLightningErrorZ self;
+public:
+       CResult_NoneLightningErrorZ(const CResult_NoneLightningErrorZ&) = delete;
+       CResult_NoneLightningErrorZ(CResult_NoneLightningErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneLightningErrorZ)); }
+       CResult_NoneLightningErrorZ(LDKCResult_NoneLightningErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneLightningErrorZ)); }
+       operator LDKCResult_NoneLightningErrorZ() && { LDKCResult_NoneLightningErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneLightningErrorZ)); return res; }
+       ~CResult_NoneLightningErrorZ() { CResult_NoneLightningErrorZ_free(self); }
+       CResult_NoneLightningErrorZ& operator=(CResult_NoneLightningErrorZ&& o) { CResult_NoneLightningErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneLightningErrorZ)); return *this; }
+       LDKCResult_NoneLightningErrorZ* operator &() { return &self; }
+       LDKCResult_NoneLightningErrorZ* operator ->() { return &self; }
+       const LDKCResult_NoneLightningErrorZ* operator &() const { return &self; }
+       const LDKCResult_NoneLightningErrorZ* operator ->() const { return &self; }
+};
+class CResult_CVec_SignatureZNoneZ {
+private:
+       LDKCResult_CVec_SignatureZNoneZ self;
+public:
+       CResult_CVec_SignatureZNoneZ(const CResult_CVec_SignatureZNoneZ&) = delete;
+       CResult_CVec_SignatureZNoneZ(CResult_CVec_SignatureZNoneZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CVec_SignatureZNoneZ)); }
+       CResult_CVec_SignatureZNoneZ(LDKCResult_CVec_SignatureZNoneZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CVec_SignatureZNoneZ)); }
+       operator LDKCResult_CVec_SignatureZNoneZ() && { LDKCResult_CVec_SignatureZNoneZ res = self; memset(&self, 0, sizeof(LDKCResult_CVec_SignatureZNoneZ)); return res; }
+       ~CResult_CVec_SignatureZNoneZ() { CResult_CVec_SignatureZNoneZ_free(self); }
+       CResult_CVec_SignatureZNoneZ& operator=(CResult_CVec_SignatureZNoneZ&& o) { CResult_CVec_SignatureZNoneZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CVec_SignatureZNoneZ)); return *this; }
+       LDKCResult_CVec_SignatureZNoneZ* operator &() { return &self; }
+       LDKCResult_CVec_SignatureZNoneZ* operator ->() { return &self; }
+       const LDKCResult_CVec_SignatureZNoneZ* operator &() const { return &self; }
+       const LDKCResult_CVec_SignatureZNoneZ* operator ->() const { return &self; }
+};
+class CResult_RoutingFeesDecodeErrorZ {
+private:
+       LDKCResult_RoutingFeesDecodeErrorZ self;
+public:
+       CResult_RoutingFeesDecodeErrorZ(const CResult_RoutingFeesDecodeErrorZ&) = delete;
+       CResult_RoutingFeesDecodeErrorZ(CResult_RoutingFeesDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RoutingFeesDecodeErrorZ)); }
+       CResult_RoutingFeesDecodeErrorZ(LDKCResult_RoutingFeesDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RoutingFeesDecodeErrorZ)); }
+       operator LDKCResult_RoutingFeesDecodeErrorZ() && { LDKCResult_RoutingFeesDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RoutingFeesDecodeErrorZ)); return res; }
+       ~CResult_RoutingFeesDecodeErrorZ() { CResult_RoutingFeesDecodeErrorZ_free(self); }
+       CResult_RoutingFeesDecodeErrorZ& operator=(CResult_RoutingFeesDecodeErrorZ&& o) { CResult_RoutingFeesDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_RoutingFeesDecodeErrorZ)); return *this; }
+       LDKCResult_RoutingFeesDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_RoutingFeesDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_RoutingFeesDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_RoutingFeesDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_QueryShortChannelIdsDecodeErrorZ {
+private:
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ self;
+public:
+       CResult_QueryShortChannelIdsDecodeErrorZ(const CResult_QueryShortChannelIdsDecodeErrorZ&) = delete;
+       CResult_QueryShortChannelIdsDecodeErrorZ(CResult_QueryShortChannelIdsDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_QueryShortChannelIdsDecodeErrorZ)); }
+       CResult_QueryShortChannelIdsDecodeErrorZ(LDKCResult_QueryShortChannelIdsDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ)); }
+       operator LDKCResult_QueryShortChannelIdsDecodeErrorZ() && { LDKCResult_QueryShortChannelIdsDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ)); return res; }
+       ~CResult_QueryShortChannelIdsDecodeErrorZ() { CResult_QueryShortChannelIdsDecodeErrorZ_free(self); }
+       CResult_QueryShortChannelIdsDecodeErrorZ& operator=(CResult_QueryShortChannelIdsDecodeErrorZ&& o) { CResult_QueryShortChannelIdsDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_QueryShortChannelIdsDecodeErrorZ)); return *this; }
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_QueryShortChannelIdsDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_UpdateAddHTLCDecodeErrorZ {
+private:
+       LDKCResult_UpdateAddHTLCDecodeErrorZ self;
+public:
+       CResult_UpdateAddHTLCDecodeErrorZ(const CResult_UpdateAddHTLCDecodeErrorZ&) = delete;
+       CResult_UpdateAddHTLCDecodeErrorZ(CResult_UpdateAddHTLCDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UpdateAddHTLCDecodeErrorZ)); }
+       CResult_UpdateAddHTLCDecodeErrorZ(LDKCResult_UpdateAddHTLCDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ)); }
+       operator LDKCResult_UpdateAddHTLCDecodeErrorZ() && { LDKCResult_UpdateAddHTLCDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ)); return res; }
+       ~CResult_UpdateAddHTLCDecodeErrorZ() { CResult_UpdateAddHTLCDecodeErrorZ_free(self); }
+       CResult_UpdateAddHTLCDecodeErrorZ& operator=(CResult_UpdateAddHTLCDecodeErrorZ&& o) { CResult_UpdateAddHTLCDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UpdateAddHTLCDecodeErrorZ)); return *this; }
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_UpdateAddHTLCDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_UpdateAddHTLCDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_CounterpartyChannelTransactionParametersDecodeErrorZ {
+private:
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ self;
+public:
+       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ(const CResult_CounterpartyChannelTransactionParametersDecodeErrorZ&) = delete;
+       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ(CResult_CounterpartyChannelTransactionParametersDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CounterpartyChannelTransactionParametersDecodeErrorZ)); }
+       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ)); }
+       operator LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ() && { LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ)); return res; }
+       ~CResult_CounterpartyChannelTransactionParametersDecodeErrorZ() { CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(self); }
+       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ& operator=(CResult_CounterpartyChannelTransactionParametersDecodeErrorZ&& o) { CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CounterpartyChannelTransactionParametersDecodeErrorZ)); return *this; }
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_NoneAPIErrorZ {
+private:
+       LDKCResult_NoneAPIErrorZ self;
+public:
+       CResult_NoneAPIErrorZ(const CResult_NoneAPIErrorZ&) = delete;
+       CResult_NoneAPIErrorZ(CResult_NoneAPIErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneAPIErrorZ)); }
+       CResult_NoneAPIErrorZ(LDKCResult_NoneAPIErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneAPIErrorZ)); }
+       operator LDKCResult_NoneAPIErrorZ() && { LDKCResult_NoneAPIErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneAPIErrorZ)); return res; }
+       ~CResult_NoneAPIErrorZ() { CResult_NoneAPIErrorZ_free(self); }
+       CResult_NoneAPIErrorZ& operator=(CResult_NoneAPIErrorZ&& o) { CResult_NoneAPIErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneAPIErrorZ)); return *this; }
+       LDKCResult_NoneAPIErrorZ* operator &() { return &self; }
+       LDKCResult_NoneAPIErrorZ* operator ->() { return &self; }
+       const LDKCResult_NoneAPIErrorZ* operator &() const { return &self; }
+       const LDKCResult_NoneAPIErrorZ* operator ->() const { return &self; }
+};
+class CVec_NetAddressZ {
+private:
+       LDKCVec_NetAddressZ self;
+public:
+       CVec_NetAddressZ(const CVec_NetAddressZ&) = delete;
+       CVec_NetAddressZ(CVec_NetAddressZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_NetAddressZ)); }
+       CVec_NetAddressZ(LDKCVec_NetAddressZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_NetAddressZ)); }
+       operator LDKCVec_NetAddressZ() && { LDKCVec_NetAddressZ res = self; memset(&self, 0, sizeof(LDKCVec_NetAddressZ)); return res; }
+       ~CVec_NetAddressZ() { CVec_NetAddressZ_free(self); }
+       CVec_NetAddressZ& operator=(CVec_NetAddressZ&& o) { CVec_NetAddressZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_NetAddressZ)); return *this; }
+       LDKCVec_NetAddressZ* operator &() { return &self; }
+       LDKCVec_NetAddressZ* operator ->() { return &self; }
+       const LDKCVec_NetAddressZ* operator &() const { return &self; }
+       const LDKCVec_NetAddressZ* operator ->() const { return &self; }
+};
+class CVec_PublicKeyZ {
+private:
+       LDKCVec_PublicKeyZ self;
+public:
+       CVec_PublicKeyZ(const CVec_PublicKeyZ&) = delete;
+       CVec_PublicKeyZ(CVec_PublicKeyZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_PublicKeyZ)); }
+       CVec_PublicKeyZ(LDKCVec_PublicKeyZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_PublicKeyZ)); }
+       operator LDKCVec_PublicKeyZ() && { LDKCVec_PublicKeyZ res = self; memset(&self, 0, sizeof(LDKCVec_PublicKeyZ)); return res; }
+       ~CVec_PublicKeyZ() { CVec_PublicKeyZ_free(self); }
+       CVec_PublicKeyZ& operator=(CVec_PublicKeyZ&& o) { CVec_PublicKeyZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_PublicKeyZ)); return *this; }
+       LDKCVec_PublicKeyZ* operator &() { return &self; }
+       LDKCVec_PublicKeyZ* operator ->() { return &self; }
+       const LDKCVec_PublicKeyZ* operator &() const { return &self; }
+       const LDKCVec_PublicKeyZ* operator ->() const { return &self; }
+};
+class CVec_C2Tuple_usizeTransactionZZ {
+private:
+       LDKCVec_C2Tuple_usizeTransactionZZ self;
+public:
+       CVec_C2Tuple_usizeTransactionZZ(const CVec_C2Tuple_usizeTransactionZZ&) = delete;
+       CVec_C2Tuple_usizeTransactionZZ(CVec_C2Tuple_usizeTransactionZZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_C2Tuple_usizeTransactionZZ)); }
+       CVec_C2Tuple_usizeTransactionZZ(LDKCVec_C2Tuple_usizeTransactionZZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_C2Tuple_usizeTransactionZZ)); }
+       operator LDKCVec_C2Tuple_usizeTransactionZZ() && { LDKCVec_C2Tuple_usizeTransactionZZ res = self; memset(&self, 0, sizeof(LDKCVec_C2Tuple_usizeTransactionZZ)); return res; }
+       ~CVec_C2Tuple_usizeTransactionZZ() { CVec_C2Tuple_usizeTransactionZZ_free(self); }
+       CVec_C2Tuple_usizeTransactionZZ& operator=(CVec_C2Tuple_usizeTransactionZZ&& o) { CVec_C2Tuple_usizeTransactionZZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_C2Tuple_usizeTransactionZZ)); return *this; }
+       LDKCVec_C2Tuple_usizeTransactionZZ* operator &() { return &self; }
+       LDKCVec_C2Tuple_usizeTransactionZZ* operator ->() { return &self; }
+       const LDKCVec_C2Tuple_usizeTransactionZZ* operator &() const { return &self; }
+       const LDKCVec_C2Tuple_usizeTransactionZZ* operator ->() const { return &self; }
+};
+class CResult_DirectionalChannelInfoDecodeErrorZ {
+private:
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ self;
+public:
+       CResult_DirectionalChannelInfoDecodeErrorZ(const CResult_DirectionalChannelInfoDecodeErrorZ&) = delete;
+       CResult_DirectionalChannelInfoDecodeErrorZ(CResult_DirectionalChannelInfoDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_DirectionalChannelInfoDecodeErrorZ)); }
+       CResult_DirectionalChannelInfoDecodeErrorZ(LDKCResult_DirectionalChannelInfoDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ)); }
+       operator LDKCResult_DirectionalChannelInfoDecodeErrorZ() && { LDKCResult_DirectionalChannelInfoDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ)); return res; }
+       ~CResult_DirectionalChannelInfoDecodeErrorZ() { CResult_DirectionalChannelInfoDecodeErrorZ_free(self); }
+       CResult_DirectionalChannelInfoDecodeErrorZ& operator=(CResult_DirectionalChannelInfoDecodeErrorZ&& o) { CResult_DirectionalChannelInfoDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_DirectionalChannelInfoDecodeErrorZ)); return *this; }
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_DirectionalChannelInfoDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_DirectionalChannelInfoDecodeErrorZ* operator ->() const { return &self; }
+};
+class C2Tuple_u32TxOutZ {
+private:
+       LDKC2Tuple_u32TxOutZ self;
+public:
+       C2Tuple_u32TxOutZ(const C2Tuple_u32TxOutZ&) = delete;
+       C2Tuple_u32TxOutZ(C2Tuple_u32TxOutZ&& o) : self(o.self) { memset(&o, 0, sizeof(C2Tuple_u32TxOutZ)); }
+       C2Tuple_u32TxOutZ(LDKC2Tuple_u32TxOutZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC2Tuple_u32TxOutZ)); }
+       operator LDKC2Tuple_u32TxOutZ() && { LDKC2Tuple_u32TxOutZ res = self; memset(&self, 0, sizeof(LDKC2Tuple_u32TxOutZ)); return res; }
+       ~C2Tuple_u32TxOutZ() { C2Tuple_u32TxOutZ_free(self); }
+       C2Tuple_u32TxOutZ& operator=(C2Tuple_u32TxOutZ&& o) { C2Tuple_u32TxOutZ_free(self); self = o.self; memset(&o, 0, sizeof(C2Tuple_u32TxOutZ)); return *this; }
+       LDKC2Tuple_u32TxOutZ* operator &() { return &self; }
+       LDKC2Tuple_u32TxOutZ* operator ->() { return &self; }
+       const LDKC2Tuple_u32TxOutZ* operator &() const { return &self; }
+       const LDKC2Tuple_u32TxOutZ* operator ->() const { return &self; }
+};
+class CResult_UpdateFailHTLCDecodeErrorZ {
+private:
+       LDKCResult_UpdateFailHTLCDecodeErrorZ self;
+public:
+       CResult_UpdateFailHTLCDecodeErrorZ(const CResult_UpdateFailHTLCDecodeErrorZ&) = delete;
+       CResult_UpdateFailHTLCDecodeErrorZ(CResult_UpdateFailHTLCDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UpdateFailHTLCDecodeErrorZ)); }
+       CResult_UpdateFailHTLCDecodeErrorZ(LDKCResult_UpdateFailHTLCDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ)); }
+       operator LDKCResult_UpdateFailHTLCDecodeErrorZ() && { LDKCResult_UpdateFailHTLCDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ)); return res; }
+       ~CResult_UpdateFailHTLCDecodeErrorZ() { CResult_UpdateFailHTLCDecodeErrorZ_free(self); }
+       CResult_UpdateFailHTLCDecodeErrorZ& operator=(CResult_UpdateFailHTLCDecodeErrorZ&& o) { CResult_UpdateFailHTLCDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UpdateFailHTLCDecodeErrorZ)); return *this; }
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_UpdateFailHTLCDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_UpdateFailHTLCDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_ChannelConfigDecodeErrorZ {
+private:
+       LDKCResult_ChannelConfigDecodeErrorZ self;
+public:
+       CResult_ChannelConfigDecodeErrorZ(const CResult_ChannelConfigDecodeErrorZ&) = delete;
+       CResult_ChannelConfigDecodeErrorZ(CResult_ChannelConfigDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelConfigDecodeErrorZ)); }
+       CResult_ChannelConfigDecodeErrorZ(LDKCResult_ChannelConfigDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelConfigDecodeErrorZ)); }
+       operator LDKCResult_ChannelConfigDecodeErrorZ() && { LDKCResult_ChannelConfigDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelConfigDecodeErrorZ)); return res; }
+       ~CResult_ChannelConfigDecodeErrorZ() { CResult_ChannelConfigDecodeErrorZ_free(self); }
+       CResult_ChannelConfigDecodeErrorZ& operator=(CResult_ChannelConfigDecodeErrorZ&& o) { CResult_ChannelConfigDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelConfigDecodeErrorZ)); return *this; }
+       LDKCResult_ChannelConfigDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ChannelConfigDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ChannelConfigDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ChannelConfigDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_RevokeAndACKDecodeErrorZ {
+private:
+       LDKCResult_RevokeAndACKDecodeErrorZ self;
+public:
+       CResult_RevokeAndACKDecodeErrorZ(const CResult_RevokeAndACKDecodeErrorZ&) = delete;
+       CResult_RevokeAndACKDecodeErrorZ(CResult_RevokeAndACKDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RevokeAndACKDecodeErrorZ)); }
+       CResult_RevokeAndACKDecodeErrorZ(LDKCResult_RevokeAndACKDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RevokeAndACKDecodeErrorZ)); }
+       operator LDKCResult_RevokeAndACKDecodeErrorZ() && { LDKCResult_RevokeAndACKDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RevokeAndACKDecodeErrorZ)); return res; }
+       ~CResult_RevokeAndACKDecodeErrorZ() { CResult_RevokeAndACKDecodeErrorZ_free(self); }
+       CResult_RevokeAndACKDecodeErrorZ& operator=(CResult_RevokeAndACKDecodeErrorZ&& o) { CResult_RevokeAndACKDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_RevokeAndACKDecodeErrorZ)); return *this; }
+       LDKCResult_RevokeAndACKDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_RevokeAndACKDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_RevokeAndACKDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_RevokeAndACKDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_SpendableOutputDescriptorDecodeErrorZ {
+private:
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ self;
+public:
+       CResult_SpendableOutputDescriptorDecodeErrorZ(const CResult_SpendableOutputDescriptorDecodeErrorZ&) = delete;
+       CResult_SpendableOutputDescriptorDecodeErrorZ(CResult_SpendableOutputDescriptorDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_SpendableOutputDescriptorDecodeErrorZ)); }
+       CResult_SpendableOutputDescriptorDecodeErrorZ(LDKCResult_SpendableOutputDescriptorDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ)); }
+       operator LDKCResult_SpendableOutputDescriptorDecodeErrorZ() && { LDKCResult_SpendableOutputDescriptorDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_SpendableOutputDescriptorDecodeErrorZ)); return res; }
+       ~CResult_SpendableOutputDescriptorDecodeErrorZ() { CResult_SpendableOutputDescriptorDecodeErrorZ_free(self); }
+       CResult_SpendableOutputDescriptorDecodeErrorZ& operator=(CResult_SpendableOutputDescriptorDecodeErrorZ&& o) { CResult_SpendableOutputDescriptorDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_SpendableOutputDescriptorDecodeErrorZ)); return *this; }
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_UnsignedChannelUpdateDecodeErrorZ {
+private:
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ self;
+public:
+       CResult_UnsignedChannelUpdateDecodeErrorZ(const CResult_UnsignedChannelUpdateDecodeErrorZ&) = delete;
+       CResult_UnsignedChannelUpdateDecodeErrorZ(CResult_UnsignedChannelUpdateDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UnsignedChannelUpdateDecodeErrorZ)); }
+       CResult_UnsignedChannelUpdateDecodeErrorZ(LDKCResult_UnsignedChannelUpdateDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ)); }
+       operator LDKCResult_UnsignedChannelUpdateDecodeErrorZ() && { LDKCResult_UnsignedChannelUpdateDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ)); return res; }
+       ~CResult_UnsignedChannelUpdateDecodeErrorZ() { CResult_UnsignedChannelUpdateDecodeErrorZ_free(self); }
+       CResult_UnsignedChannelUpdateDecodeErrorZ& operator=(CResult_UnsignedChannelUpdateDecodeErrorZ&& o) { CResult_UnsignedChannelUpdateDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UnsignedChannelUpdateDecodeErrorZ)); return *this; }
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_UnsignedChannelUpdateDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_ShutdownDecodeErrorZ {
+private:
+       LDKCResult_ShutdownDecodeErrorZ self;
+public:
+       CResult_ShutdownDecodeErrorZ(const CResult_ShutdownDecodeErrorZ&) = delete;
+       CResult_ShutdownDecodeErrorZ(CResult_ShutdownDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ShutdownDecodeErrorZ)); }
+       CResult_ShutdownDecodeErrorZ(LDKCResult_ShutdownDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ShutdownDecodeErrorZ)); }
+       operator LDKCResult_ShutdownDecodeErrorZ() && { LDKCResult_ShutdownDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ShutdownDecodeErrorZ)); return res; }
+       ~CResult_ShutdownDecodeErrorZ() { CResult_ShutdownDecodeErrorZ_free(self); }
+       CResult_ShutdownDecodeErrorZ& operator=(CResult_ShutdownDecodeErrorZ&& o) { CResult_ShutdownDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ShutdownDecodeErrorZ)); return *this; }
+       LDKCResult_ShutdownDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ShutdownDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ShutdownDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ShutdownDecodeErrorZ* operator ->() const { return &self; }
+};
+class CVec_EventZ {
+private:
+       LDKCVec_EventZ self;
+public:
+       CVec_EventZ(const CVec_EventZ&) = delete;
+       CVec_EventZ(CVec_EventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_EventZ)); }
+       CVec_EventZ(LDKCVec_EventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_EventZ)); }
+       operator LDKCVec_EventZ() && { LDKCVec_EventZ res = self; memset(&self, 0, sizeof(LDKCVec_EventZ)); return res; }
+       ~CVec_EventZ() { CVec_EventZ_free(self); }
+       CVec_EventZ& operator=(CVec_EventZ&& o) { CVec_EventZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_EventZ)); return *this; }
+       LDKCVec_EventZ* operator &() { return &self; }
+       LDKCVec_EventZ* operator ->() { return &self; }
+       const LDKCVec_EventZ* operator &() const { return &self; }
+       const LDKCVec_EventZ* operator ->() const { return &self; }
+};
+class CVec_MonitorEventZ {
+private:
+       LDKCVec_MonitorEventZ self;
+public:
+       CVec_MonitorEventZ(const CVec_MonitorEventZ&) = delete;
+       CVec_MonitorEventZ(CVec_MonitorEventZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_MonitorEventZ)); }
+       CVec_MonitorEventZ(LDKCVec_MonitorEventZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_MonitorEventZ)); }
+       operator LDKCVec_MonitorEventZ() && { LDKCVec_MonitorEventZ res = self; memset(&self, 0, sizeof(LDKCVec_MonitorEventZ)); return res; }
+       ~CVec_MonitorEventZ() { CVec_MonitorEventZ_free(self); }
+       CVec_MonitorEventZ& operator=(CVec_MonitorEventZ&& o) { CVec_MonitorEventZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_MonitorEventZ)); return *this; }
+       LDKCVec_MonitorEventZ* operator &() { return &self; }
+       LDKCVec_MonitorEventZ* operator ->() { return &self; }
+       const LDKCVec_MonitorEventZ* operator &() const { return &self; }
+       const LDKCVec_MonitorEventZ* operator ->() const { return &self; }
+};
+class CResult_NoneChannelMonitorUpdateErrZ {
+private:
+       LDKCResult_NoneChannelMonitorUpdateErrZ self;
+public:
+       CResult_NoneChannelMonitorUpdateErrZ(const CResult_NoneChannelMonitorUpdateErrZ&) = delete;
+       CResult_NoneChannelMonitorUpdateErrZ(CResult_NoneChannelMonitorUpdateErrZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NoneChannelMonitorUpdateErrZ)); }
+       CResult_NoneChannelMonitorUpdateErrZ(LDKCResult_NoneChannelMonitorUpdateErrZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ)); }
+       operator LDKCResult_NoneChannelMonitorUpdateErrZ() && { LDKCResult_NoneChannelMonitorUpdateErrZ res = self; memset(&self, 0, sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ)); return res; }
+       ~CResult_NoneChannelMonitorUpdateErrZ() { CResult_NoneChannelMonitorUpdateErrZ_free(self); }
+       CResult_NoneChannelMonitorUpdateErrZ& operator=(CResult_NoneChannelMonitorUpdateErrZ&& o) { CResult_NoneChannelMonitorUpdateErrZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NoneChannelMonitorUpdateErrZ)); return *this; }
+       LDKCResult_NoneChannelMonitorUpdateErrZ* operator &() { return &self; }
+       LDKCResult_NoneChannelMonitorUpdateErrZ* operator ->() { return &self; }
+       const LDKCResult_NoneChannelMonitorUpdateErrZ* operator &() const { return &self; }
+       const LDKCResult_NoneChannelMonitorUpdateErrZ* operator ->() const { return &self; }
+};
+class CResult_PublicKeyErrorZ {
+private:
+       LDKCResult_PublicKeyErrorZ self;
+public:
+       CResult_PublicKeyErrorZ(const CResult_PublicKeyErrorZ&) = delete;
+       CResult_PublicKeyErrorZ(CResult_PublicKeyErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_PublicKeyErrorZ)); }
+       CResult_PublicKeyErrorZ(LDKCResult_PublicKeyErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_PublicKeyErrorZ)); }
+       operator LDKCResult_PublicKeyErrorZ() && { LDKCResult_PublicKeyErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_PublicKeyErrorZ)); return res; }
+       ~CResult_PublicKeyErrorZ() { CResult_PublicKeyErrorZ_free(self); }
+       CResult_PublicKeyErrorZ& operator=(CResult_PublicKeyErrorZ&& o) { CResult_PublicKeyErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_PublicKeyErrorZ)); return *this; }
+       LDKCResult_PublicKeyErrorZ* operator &() { return &self; }
+       LDKCResult_PublicKeyErrorZ* operator ->() { return &self; }
+       const LDKCResult_PublicKeyErrorZ* operator &() const { return &self; }
+       const LDKCResult_PublicKeyErrorZ* operator ->() const { return &self; }
+};
+class C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
+private:
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ self;
+public:
+       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(const C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&) = delete;
+       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& o) : self(o.self) { memset(&o, 0, sizeof(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); }
+       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); }
+       operator LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ() && { LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ res = self; memset(&self, 0, sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); return res; }
+       ~C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ() { C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(self); }
+       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ& operator=(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ&& o) { C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(self); self = o.self; memset(&o, 0, sizeof(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ)); return *this; }
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() { return &self; }
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() { return &self; }
+       const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator &() const { return &self; }
+       const LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* operator ->() const { return &self; }
+};
+class CResult_boolPeerHandleErrorZ {
+private:
+       LDKCResult_boolPeerHandleErrorZ self;
+public:
+       CResult_boolPeerHandleErrorZ(const CResult_boolPeerHandleErrorZ&) = delete;
+       CResult_boolPeerHandleErrorZ(CResult_boolPeerHandleErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_boolPeerHandleErrorZ)); }
+       CResult_boolPeerHandleErrorZ(LDKCResult_boolPeerHandleErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_boolPeerHandleErrorZ)); }
+       operator LDKCResult_boolPeerHandleErrorZ() && { LDKCResult_boolPeerHandleErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_boolPeerHandleErrorZ)); return res; }
+       ~CResult_boolPeerHandleErrorZ() { CResult_boolPeerHandleErrorZ_free(self); }
+       CResult_boolPeerHandleErrorZ& operator=(CResult_boolPeerHandleErrorZ&& o) { CResult_boolPeerHandleErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_boolPeerHandleErrorZ)); return *this; }
+       LDKCResult_boolPeerHandleErrorZ* operator &() { return &self; }
+       LDKCResult_boolPeerHandleErrorZ* operator ->() { return &self; }
+       const LDKCResult_boolPeerHandleErrorZ* operator &() const { return &self; }
+       const LDKCResult_boolPeerHandleErrorZ* operator ->() const { return &self; }
+};
+class CResult_ChannelUpdateDecodeErrorZ {
+private:
+       LDKCResult_ChannelUpdateDecodeErrorZ self;
+public:
+       CResult_ChannelUpdateDecodeErrorZ(const CResult_ChannelUpdateDecodeErrorZ&) = delete;
+       CResult_ChannelUpdateDecodeErrorZ(CResult_ChannelUpdateDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelUpdateDecodeErrorZ)); }
+       CResult_ChannelUpdateDecodeErrorZ(LDKCResult_ChannelUpdateDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelUpdateDecodeErrorZ)); }
+       operator LDKCResult_ChannelUpdateDecodeErrorZ() && { LDKCResult_ChannelUpdateDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelUpdateDecodeErrorZ)); return res; }
+       ~CResult_ChannelUpdateDecodeErrorZ() { CResult_ChannelUpdateDecodeErrorZ_free(self); }
+       CResult_ChannelUpdateDecodeErrorZ& operator=(CResult_ChannelUpdateDecodeErrorZ&& o) { CResult_ChannelUpdateDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelUpdateDecodeErrorZ)); return *this; }
+       LDKCResult_ChannelUpdateDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ChannelUpdateDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ChannelUpdateDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ChannelUpdateDecodeErrorZ* operator ->() const { return &self; }
+};
+class CVec_APIErrorZ {
+private:
+       LDKCVec_APIErrorZ self;
+public:
+       CVec_APIErrorZ(const CVec_APIErrorZ&) = delete;
+       CVec_APIErrorZ(CVec_APIErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_APIErrorZ)); }
+       CVec_APIErrorZ(LDKCVec_APIErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_APIErrorZ)); }
+       operator LDKCVec_APIErrorZ() && { LDKCVec_APIErrorZ res = self; memset(&self, 0, sizeof(LDKCVec_APIErrorZ)); return res; }
+       ~CVec_APIErrorZ() { CVec_APIErrorZ_free(self); }
+       CVec_APIErrorZ& operator=(CVec_APIErrorZ&& o) { CVec_APIErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_APIErrorZ)); return *this; }
+       LDKCVec_APIErrorZ* operator &() { return &self; }
+       LDKCVec_APIErrorZ* operator ->() { return &self; }
+       const LDKCVec_APIErrorZ* operator &() const { return &self; }
+       const LDKCVec_APIErrorZ* operator ->() const { return &self; }
+};
+class CVec_UpdateFulfillHTLCZ {
+private:
+       LDKCVec_UpdateFulfillHTLCZ self;
+public:
+       CVec_UpdateFulfillHTLCZ(const CVec_UpdateFulfillHTLCZ&) = delete;
+       CVec_UpdateFulfillHTLCZ(CVec_UpdateFulfillHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateFulfillHTLCZ)); }
+       CVec_UpdateFulfillHTLCZ(LDKCVec_UpdateFulfillHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateFulfillHTLCZ)); }
+       operator LDKCVec_UpdateFulfillHTLCZ() && { LDKCVec_UpdateFulfillHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateFulfillHTLCZ)); return res; }
+       ~CVec_UpdateFulfillHTLCZ() { CVec_UpdateFulfillHTLCZ_free(self); }
+       CVec_UpdateFulfillHTLCZ& operator=(CVec_UpdateFulfillHTLCZ&& o) { CVec_UpdateFulfillHTLCZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_UpdateFulfillHTLCZ)); return *this; }
+       LDKCVec_UpdateFulfillHTLCZ* operator &() { return &self; }
+       LDKCVec_UpdateFulfillHTLCZ* operator ->() { return &self; }
+       const LDKCVec_UpdateFulfillHTLCZ* operator &() const { return &self; }
+       const LDKCVec_UpdateFulfillHTLCZ* operator ->() const { return &self; }
+};
+class CResult_AnnouncementSignaturesDecodeErrorZ {
+private:
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ self;
+public:
+       CResult_AnnouncementSignaturesDecodeErrorZ(const CResult_AnnouncementSignaturesDecodeErrorZ&) = delete;
+       CResult_AnnouncementSignaturesDecodeErrorZ(CResult_AnnouncementSignaturesDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_AnnouncementSignaturesDecodeErrorZ)); }
+       CResult_AnnouncementSignaturesDecodeErrorZ(LDKCResult_AnnouncementSignaturesDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ)); }
+       operator LDKCResult_AnnouncementSignaturesDecodeErrorZ() && { LDKCResult_AnnouncementSignaturesDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ)); return res; }
+       ~CResult_AnnouncementSignaturesDecodeErrorZ() { CResult_AnnouncementSignaturesDecodeErrorZ_free(self); }
+       CResult_AnnouncementSignaturesDecodeErrorZ& operator=(CResult_AnnouncementSignaturesDecodeErrorZ&& o) { CResult_AnnouncementSignaturesDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_AnnouncementSignaturesDecodeErrorZ)); return *this; }
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_AnnouncementSignaturesDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_AnnouncementSignaturesDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_UpdateFulfillHTLCDecodeErrorZ {
+private:
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ self;
+public:
+       CResult_UpdateFulfillHTLCDecodeErrorZ(const CResult_UpdateFulfillHTLCDecodeErrorZ&) = delete;
+       CResult_UpdateFulfillHTLCDecodeErrorZ(CResult_UpdateFulfillHTLCDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_UpdateFulfillHTLCDecodeErrorZ)); }
+       CResult_UpdateFulfillHTLCDecodeErrorZ(LDKCResult_UpdateFulfillHTLCDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ)); }
+       operator LDKCResult_UpdateFulfillHTLCDecodeErrorZ() && { LDKCResult_UpdateFulfillHTLCDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ)); return res; }
+       ~CResult_UpdateFulfillHTLCDecodeErrorZ() { CResult_UpdateFulfillHTLCDecodeErrorZ_free(self); }
+       CResult_UpdateFulfillHTLCDecodeErrorZ& operator=(CResult_UpdateFulfillHTLCDecodeErrorZ&& o) { CResult_UpdateFulfillHTLCDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_UpdateFulfillHTLCDecodeErrorZ)); return *this; }
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_UpdateFulfillHTLCDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_UpdateFulfillHTLCDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_ChannelKeysDecodeErrorZ {
+private:
+       LDKCResult_ChannelKeysDecodeErrorZ self;
+public:
+       CResult_ChannelKeysDecodeErrorZ(const CResult_ChannelKeysDecodeErrorZ&) = delete;
+       CResult_ChannelKeysDecodeErrorZ(CResult_ChannelKeysDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ChannelKeysDecodeErrorZ)); }
+       CResult_ChannelKeysDecodeErrorZ(LDKCResult_ChannelKeysDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ChannelKeysDecodeErrorZ)); }
+       operator LDKCResult_ChannelKeysDecodeErrorZ() && { LDKCResult_ChannelKeysDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ChannelKeysDecodeErrorZ)); return res; }
+       ~CResult_ChannelKeysDecodeErrorZ() { CResult_ChannelKeysDecodeErrorZ_free(self); }
+       CResult_ChannelKeysDecodeErrorZ& operator=(CResult_ChannelKeysDecodeErrorZ&& o) { CResult_ChannelKeysDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ChannelKeysDecodeErrorZ)); return *this; }
+       LDKCResult_ChannelKeysDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ChannelKeysDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ChannelKeysDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ChannelKeysDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_NodeFeaturesDecodeErrorZ {
+private:
+       LDKCResult_NodeFeaturesDecodeErrorZ self;
+public:
+       CResult_NodeFeaturesDecodeErrorZ(const CResult_NodeFeaturesDecodeErrorZ&) = delete;
+       CResult_NodeFeaturesDecodeErrorZ(CResult_NodeFeaturesDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NodeFeaturesDecodeErrorZ)); }
+       CResult_NodeFeaturesDecodeErrorZ(LDKCResult_NodeFeaturesDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NodeFeaturesDecodeErrorZ)); }
+       operator LDKCResult_NodeFeaturesDecodeErrorZ() && { LDKCResult_NodeFeaturesDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_NodeFeaturesDecodeErrorZ)); return res; }
+       ~CResult_NodeFeaturesDecodeErrorZ() { CResult_NodeFeaturesDecodeErrorZ_free(self); }
+       CResult_NodeFeaturesDecodeErrorZ& operator=(CResult_NodeFeaturesDecodeErrorZ&& o) { CResult_NodeFeaturesDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_NodeFeaturesDecodeErrorZ)); return *this; }
+       LDKCResult_NodeFeaturesDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_NodeFeaturesDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_NodeFeaturesDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_NodeFeaturesDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+private:
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ self;
+public:
+       CResult_ReplyShortChannelIdsEndDecodeErrorZ(const CResult_ReplyShortChannelIdsEndDecodeErrorZ&) = delete;
+       CResult_ReplyShortChannelIdsEndDecodeErrorZ(CResult_ReplyShortChannelIdsEndDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_ReplyShortChannelIdsEndDecodeErrorZ)); }
+       CResult_ReplyShortChannelIdsEndDecodeErrorZ(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ)); }
+       operator LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ() && { LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ)); return res; }
+       ~CResult_ReplyShortChannelIdsEndDecodeErrorZ() { CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(self); }
+       CResult_ReplyShortChannelIdsEndDecodeErrorZ& operator=(CResult_ReplyShortChannelIdsEndDecodeErrorZ&& o) { CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_ReplyShortChannelIdsEndDecodeErrorZ)); return *this; }
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_CResult_NetAddressu8ZDecodeErrorZ {
+private:
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ self;
+public:
+       CResult_CResult_NetAddressu8ZDecodeErrorZ(const CResult_CResult_NetAddressu8ZDecodeErrorZ&) = delete;
+       CResult_CResult_NetAddressu8ZDecodeErrorZ(CResult_CResult_NetAddressu8ZDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CResult_NetAddressu8ZDecodeErrorZ)); }
+       CResult_CResult_NetAddressu8ZDecodeErrorZ(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ)); }
+       operator LDKCResult_CResult_NetAddressu8ZDecodeErrorZ() && { LDKCResult_CResult_NetAddressu8ZDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ)); return res; }
+       ~CResult_CResult_NetAddressu8ZDecodeErrorZ() { CResult_CResult_NetAddressu8ZDecodeErrorZ_free(self); }
+       CResult_CResult_NetAddressu8ZDecodeErrorZ& operator=(CResult_CResult_NetAddressu8ZDecodeErrorZ&& o) { CResult_CResult_NetAddressu8ZDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_CResult_NetAddressu8ZDecodeErrorZ)); return *this; }
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
+private:
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ self;
+public:
+       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ(const CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ&) = delete;
+       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ)); }
+       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ)); }
+       operator LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ() && { LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ)); return res; }
+       ~CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ() { CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(self); }
+       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ& operator=(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ&& o) { CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ)); return *this; }
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_BuiltCommitmentTransactionDecodeErrorZ {
+private:
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ self;
+public:
+       CResult_BuiltCommitmentTransactionDecodeErrorZ(const CResult_BuiltCommitmentTransactionDecodeErrorZ&) = delete;
+       CResult_BuiltCommitmentTransactionDecodeErrorZ(CResult_BuiltCommitmentTransactionDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_BuiltCommitmentTransactionDecodeErrorZ)); }
+       CResult_BuiltCommitmentTransactionDecodeErrorZ(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ)); }
+       operator LDKCResult_BuiltCommitmentTransactionDecodeErrorZ() && { LDKCResult_BuiltCommitmentTransactionDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ)); return res; }
+       ~CResult_BuiltCommitmentTransactionDecodeErrorZ() { CResult_BuiltCommitmentTransactionDecodeErrorZ_free(self); }
+       CResult_BuiltCommitmentTransactionDecodeErrorZ& operator=(CResult_BuiltCommitmentTransactionDecodeErrorZ&& o) { CResult_BuiltCommitmentTransactionDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_BuiltCommitmentTransactionDecodeErrorZ)); return *this; }
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* operator ->() const { return &self; }
+};
+class CResult_RouteDecodeErrorZ {
+private:
+       LDKCResult_RouteDecodeErrorZ self;
+public:
+       CResult_RouteDecodeErrorZ(const CResult_RouteDecodeErrorZ&) = delete;
+       CResult_RouteDecodeErrorZ(CResult_RouteDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_RouteDecodeErrorZ)); }
+       CResult_RouteDecodeErrorZ(LDKCResult_RouteDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_RouteDecodeErrorZ)); }
+       operator LDKCResult_RouteDecodeErrorZ() && { LDKCResult_RouteDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_RouteDecodeErrorZ)); return res; }
+       ~CResult_RouteDecodeErrorZ() { CResult_RouteDecodeErrorZ_free(self); }
+       CResult_RouteDecodeErrorZ& operator=(CResult_RouteDecodeErrorZ&& o) { CResult_RouteDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_RouteDecodeErrorZ)); return *this; }
+       LDKCResult_RouteDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_RouteDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_RouteDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_RouteDecodeErrorZ* operator ->() const { return &self; }
+};
+class CVec_TxOutZ {
+private:
+       LDKCVec_TxOutZ self;
+public:
+       CVec_TxOutZ(const CVec_TxOutZ&) = delete;
+       CVec_TxOutZ(CVec_TxOutZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_TxOutZ)); }
+       CVec_TxOutZ(LDKCVec_TxOutZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_TxOutZ)); }
+       operator LDKCVec_TxOutZ() && { LDKCVec_TxOutZ res = self; memset(&self, 0, sizeof(LDKCVec_TxOutZ)); return res; }
+       ~CVec_TxOutZ() { CVec_TxOutZ_free(self); }
+       CVec_TxOutZ& operator=(CVec_TxOutZ&& o) { CVec_TxOutZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_TxOutZ)); return *this; }
+       LDKCVec_TxOutZ* operator &() { return &self; }
+       LDKCVec_TxOutZ* operator ->() { return &self; }
+       const LDKCVec_TxOutZ* operator &() const { return &self; }
+       const LDKCVec_TxOutZ* operator ->() const { return &self; }
+};
+class CVec_UpdateFailHTLCZ {
+private:
+       LDKCVec_UpdateFailHTLCZ self;
+public:
+       CVec_UpdateFailHTLCZ(const CVec_UpdateFailHTLCZ&) = delete;
+       CVec_UpdateFailHTLCZ(CVec_UpdateFailHTLCZ&& o) : self(o.self) { memset(&o, 0, sizeof(CVec_UpdateFailHTLCZ)); }
+       CVec_UpdateFailHTLCZ(LDKCVec_UpdateFailHTLCZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCVec_UpdateFailHTLCZ)); }
+       operator LDKCVec_UpdateFailHTLCZ() && { LDKCVec_UpdateFailHTLCZ res = self; memset(&self, 0, sizeof(LDKCVec_UpdateFailHTLCZ)); return res; }
+       ~CVec_UpdateFailHTLCZ() { CVec_UpdateFailHTLCZ_free(self); }
+       CVec_UpdateFailHTLCZ& operator=(CVec_UpdateFailHTLCZ&& o) { CVec_UpdateFailHTLCZ_free(self); self = o.self; memset(&o, 0, sizeof(CVec_UpdateFailHTLCZ)); return *this; }
+       LDKCVec_UpdateFailHTLCZ* operator &() { return &self; }
+       LDKCVec_UpdateFailHTLCZ* operator ->() { return &self; }
+       const LDKCVec_UpdateFailHTLCZ* operator &() const { return &self; }
+       const LDKCVec_UpdateFailHTLCZ* operator ->() const { return &self; }
+};
+class CResult_FundingLockedDecodeErrorZ {
+private:
+       LDKCResult_FundingLockedDecodeErrorZ self;
+public:
+       CResult_FundingLockedDecodeErrorZ(const CResult_FundingLockedDecodeErrorZ&) = delete;
+       CResult_FundingLockedDecodeErrorZ(CResult_FundingLockedDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_FundingLockedDecodeErrorZ)); }
+       CResult_FundingLockedDecodeErrorZ(LDKCResult_FundingLockedDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_FundingLockedDecodeErrorZ)); }
+       operator LDKCResult_FundingLockedDecodeErrorZ() && { LDKCResult_FundingLockedDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_FundingLockedDecodeErrorZ)); return res; }
+       ~CResult_FundingLockedDecodeErrorZ() { CResult_FundingLockedDecodeErrorZ_free(self); }
+       CResult_FundingLockedDecodeErrorZ& operator=(CResult_FundingLockedDecodeErrorZ&& o) { CResult_FundingLockedDecodeErrorZ_free(self); self = o.self; memset(&o, 0, sizeof(CResult_FundingLockedDecodeErrorZ)); return *this; }
+       LDKCResult_FundingLockedDecodeErrorZ* operator &() { return &self; }
+       LDKCResult_FundingLockedDecodeErrorZ* operator ->() { return &self; }
+       const LDKCResult_FundingLockedDecodeErrorZ* operator &() const { return &self; }
+       const LDKCResult_FundingLockedDecodeErrorZ* operator ->() const { return &self; }
+};
 }
index 9c8d6ee52151c2f2bf1b9971853e5680e72e1def..d76b09afe59f5951ba78286e9d31fddf437e1fb0 100644 (file)
@@ -75,8 +75,6 @@ struct nativeChannelMonitorUpdateOpaque;
 typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
 struct nativeMonitorUpdateErrorOpaque;
 typedef struct nativeMonitorUpdateErrorOpaque LDKnativeMonitorUpdateError;
-struct nativeMonitorEventOpaque;
-typedef struct nativeMonitorEventOpaque LDKnativeMonitorEvent;
 struct nativeHTLCUpdateOpaque;
 typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
 struct nativeChannelMonitorOpaque;
@@ -85,10 +83,12 @@ struct nativeChannelManagerOpaque;
 typedef struct nativeChannelManagerOpaque LDKnativeChannelManager;
 struct nativeChannelDetailsOpaque;
 typedef struct nativeChannelDetailsOpaque LDKnativeChannelDetails;
-struct nativePaymentSendFailureOpaque;
-typedef struct nativePaymentSendFailureOpaque LDKnativePaymentSendFailure;
 struct nativeChannelManagerReadArgsOpaque;
 typedef struct nativeChannelManagerReadArgsOpaque LDKnativeChannelManagerReadArgs;
+struct nativeDelayedPaymentOutputDescriptorOpaque;
+typedef struct nativeDelayedPaymentOutputDescriptorOpaque LDKnativeDelayedPaymentOutputDescriptor;
+struct nativeStaticPaymentOutputDescriptorOpaque;
+typedef struct nativeStaticPaymentOutputDescriptorOpaque LDKnativeStaticPaymentOutputDescriptor;
 struct LDKChannelKeys;
 typedef struct LDKChannelKeys LDKChannelKeys;
 struct nativeInMemoryChannelKeysOpaque;
index 06eabf3c0d22288fde97dd14dc9eb105df2af981..2ea8d6ff9dae5e5c43ccaa218db34b563935d131 100644 (file)
@@ -3286,6 +3286,86 @@ impl Clone for CResult_NoneAPIErrorZ {
 #[no_mangle]
 pub extern "C" fn CResult_NoneAPIErrorZ_clone(orig: &CResult_NoneAPIErrorZ) -> CResult_NoneAPIErrorZ { orig.clone() }
 #[repr(C)]
+pub struct CVec_CResult_NoneAPIErrorZZ {
+       pub data: *mut crate::c_types::derived::CResult_NoneAPIErrorZ,
+       pub datalen: usize
+}
+impl CVec_CResult_NoneAPIErrorZZ {
+       #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::CResult_NoneAPIErrorZ> {
+               if self.datalen == 0 { return Vec::new(); }
+               let ret = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+               self.data = std::ptr::null_mut();
+               self.datalen = 0;
+               ret
+       }
+       #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::CResult_NoneAPIErrorZ] {
+               unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) }
+       }
+}
+impl From<Vec<crate::c_types::derived::CResult_NoneAPIErrorZ>> for CVec_CResult_NoneAPIErrorZZ {
+       fn from(v: Vec<crate::c_types::derived::CResult_NoneAPIErrorZ>) -> Self {
+               let datalen = v.len();
+               let data = Box::into_raw(v.into_boxed_slice());
+               Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+       }
+}
+#[no_mangle]
+pub extern "C" fn CVec_CResult_NoneAPIErrorZZ_free(_res: CVec_CResult_NoneAPIErrorZZ) { }
+impl Drop for CVec_CResult_NoneAPIErrorZZ {
+       fn drop(&mut self) {
+               if self.datalen == 0 { return; }
+               unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
+       }
+}
+impl Clone for CVec_CResult_NoneAPIErrorZZ {
+       fn clone(&self) -> Self {
+               let mut res = Vec::new();
+               if self.datalen == 0 { return Self::from(res); }
+               res.extend_from_slice(unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) });
+               Self::from(res)
+       }
+}
+#[repr(C)]
+pub struct CVec_APIErrorZ {
+       pub data: *mut crate::util::errors::APIError,
+       pub datalen: usize
+}
+impl CVec_APIErrorZ {
+       #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::util::errors::APIError> {
+               if self.datalen == 0 { return Vec::new(); }
+               let ret = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+               self.data = std::ptr::null_mut();
+               self.datalen = 0;
+               ret
+       }
+       #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::util::errors::APIError] {
+               unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) }
+       }
+}
+impl From<Vec<crate::util::errors::APIError>> for CVec_APIErrorZ {
+       fn from(v: Vec<crate::util::errors::APIError>) -> Self {
+               let datalen = v.len();
+               let data = Box::into_raw(v.into_boxed_slice());
+               Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+       }
+}
+#[no_mangle]
+pub extern "C" fn CVec_APIErrorZ_free(_res: CVec_APIErrorZ) { }
+impl Drop for CVec_APIErrorZ {
+       fn drop(&mut self) {
+               if self.datalen == 0 { return; }
+               unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
+       }
+}
+impl Clone for CVec_APIErrorZ {
+       fn clone(&self) -> Self {
+               let mut res = Vec::new();
+               if self.datalen == 0 { return Self::from(res); }
+               res.extend_from_slice(unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) });
+               Self::from(res)
+       }
+}
+#[repr(C)]
 pub struct CVec_ChannelDetailsZ {
        pub data: *mut crate::ln::channelmanager::ChannelDetails,
        pub datalen: usize
@@ -3847,6 +3927,119 @@ impl Clone for CResult_ChannelKeysDecodeErrorZ {
 #[no_mangle]
 pub extern "C" fn CResult_ChannelKeysDecodeErrorZ_clone(orig: &CResult_ChannelKeysDecodeErrorZ) -> CResult_ChannelKeysDecodeErrorZ { orig.clone() }
 #[repr(C)]
+pub struct CVec_CVec_u8ZZ {
+       pub data: *mut crate::c_types::derived::CVec_u8Z,
+       pub datalen: usize
+}
+impl CVec_CVec_u8ZZ {
+       #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::CVec_u8Z> {
+               if self.datalen == 0 { return Vec::new(); }
+               let ret = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+               self.data = std::ptr::null_mut();
+               self.datalen = 0;
+               ret
+       }
+       #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::CVec_u8Z] {
+               unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) }
+       }
+}
+impl From<Vec<crate::c_types::derived::CVec_u8Z>> for CVec_CVec_u8ZZ {
+       fn from(v: Vec<crate::c_types::derived::CVec_u8Z>) -> Self {
+               let datalen = v.len();
+               let data = Box::into_raw(v.into_boxed_slice());
+               Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+       }
+}
+#[no_mangle]
+pub extern "C" fn CVec_CVec_u8ZZ_free(_res: CVec_CVec_u8ZZ) { }
+impl Drop for CVec_CVec_u8ZZ {
+       fn drop(&mut self) {
+               if self.datalen == 0 { return; }
+               unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
+       }
+}
+impl Clone for CVec_CVec_u8ZZ {
+       fn clone(&self) -> Self {
+               let mut res = Vec::new();
+               if self.datalen == 0 { return Self::from(res); }
+               res.extend_from_slice(unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) });
+               Self::from(res)
+       }
+}
+#[repr(C)]
+pub union CResult_CVec_CVec_u8ZZNoneZPtr {
+       pub result: *mut crate::c_types::derived::CVec_CVec_u8ZZ,
+       /// Note that this value is always NULL, as there are no contents in the Err variant
+       pub err: *mut std::ffi::c_void,
+}
+#[repr(C)]
+pub struct CResult_CVec_CVec_u8ZZNoneZ {
+       pub contents: CResult_CVec_CVec_u8ZZNoneZPtr,
+       pub result_ok: bool,
+}
+#[no_mangle]
+pub extern "C" fn CResult_CVec_CVec_u8ZZNoneZ_ok(o: crate::c_types::derived::CVec_CVec_u8ZZ) -> CResult_CVec_CVec_u8ZZNoneZ {
+       CResult_CVec_CVec_u8ZZNoneZ {
+               contents: CResult_CVec_CVec_u8ZZNoneZPtr {
+                       result: Box::into_raw(Box::new(o)),
+               },
+               result_ok: true,
+       }
+}
+#[no_mangle]
+pub extern "C" fn CResult_CVec_CVec_u8ZZNoneZ_err() -> CResult_CVec_CVec_u8ZZNoneZ {
+       CResult_CVec_CVec_u8ZZNoneZ {
+               contents: CResult_CVec_CVec_u8ZZNoneZPtr {
+                       err: std::ptr::null_mut(),
+               },
+               result_ok: false,
+       }
+}
+#[no_mangle]
+pub extern "C" fn CResult_CVec_CVec_u8ZZNoneZ_free(_res: CResult_CVec_CVec_u8ZZNoneZ) { }
+impl Drop for CResult_CVec_CVec_u8ZZNoneZ {
+       fn drop(&mut self) {
+               if self.result_ok {
+                       if unsafe { !(self.contents.result as *mut ()).is_null() } {
+                               let _ = unsafe { Box::from_raw(self.contents.result) };
+                       }
+               } else {
+               }
+       }
+}
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_CVec_u8ZZ, u8>> for CResult_CVec_CVec_u8ZZNoneZ {
+       fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_CVec_u8ZZ, u8>) -> Self {
+               let contents = if o.result_ok {
+                       let result = unsafe { o.contents.result };
+                       unsafe { o.contents.result = std::ptr::null_mut() };
+                       CResult_CVec_CVec_u8ZZNoneZPtr { result }
+               } else {
+                       let _ = unsafe { Box::from_raw(o.contents.err) };
+                       o.contents.err = std::ptr::null_mut();
+                       CResult_CVec_CVec_u8ZZNoneZPtr { err: std::ptr::null_mut() }
+               };
+               Self {
+                       contents,
+                       result_ok: o.result_ok,
+               }
+       }
+}
+impl Clone for CResult_CVec_CVec_u8ZZNoneZ {
+       fn clone(&self) -> Self {
+               if self.result_ok {
+                       Self { result_ok: true, contents: CResult_CVec_CVec_u8ZZNoneZPtr {
+                               result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_CVec_u8ZZ>::clone(unsafe { &*self.contents.result })))
+                       } }
+               } else {
+                       Self { result_ok: false, contents: CResult_CVec_CVec_u8ZZNoneZPtr {
+                               err: std::ptr::null_mut()
+                       } }
+               }
+       }
+}
+#[no_mangle]
+pub extern "C" fn CResult_CVec_CVec_u8ZZNoneZ_clone(orig: &CResult_CVec_CVec_u8ZZNoneZ) -> CResult_CVec_CVec_u8ZZNoneZ { orig.clone() }
+#[repr(C)]
 pub union CResult_InMemoryChannelKeysDecodeErrorZPtr {
        pub result: *mut crate::chain::keysinterface::InMemoryChannelKeys,
        pub err: *mut crate::ln::msgs::DecodeError,
@@ -3922,6 +4115,104 @@ impl Clone for CResult_InMemoryChannelKeysDecodeErrorZ {
 #[no_mangle]
 pub extern "C" fn CResult_InMemoryChannelKeysDecodeErrorZ_clone(orig: &CResult_InMemoryChannelKeysDecodeErrorZ) -> CResult_InMemoryChannelKeysDecodeErrorZ { orig.clone() }
 #[repr(C)]
+pub struct CVec_TxOutZ {
+       pub data: *mut crate::c_types::TxOut,
+       pub datalen: usize
+}
+impl CVec_TxOutZ {
+       #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::TxOut> {
+               if self.datalen == 0 { return Vec::new(); }
+               let ret = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+               self.data = std::ptr::null_mut();
+               self.datalen = 0;
+               ret
+       }
+       #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::TxOut] {
+               unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) }
+       }
+}
+impl From<Vec<crate::c_types::TxOut>> for CVec_TxOutZ {
+       fn from(v: Vec<crate::c_types::TxOut>) -> Self {
+               let datalen = v.len();
+               let data = Box::into_raw(v.into_boxed_slice());
+               Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+       }
+}
+#[no_mangle]
+pub extern "C" fn CVec_TxOutZ_free(_res: CVec_TxOutZ) { }
+impl Drop for CVec_TxOutZ {
+       fn drop(&mut self) {
+               if self.datalen == 0 { return; }
+               unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
+       }
+}
+impl Clone for CVec_TxOutZ {
+       fn clone(&self) -> Self {
+               let mut res = Vec::new();
+               if self.datalen == 0 { return Self::from(res); }
+               res.extend_from_slice(unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) });
+               Self::from(res)
+       }
+}
+#[repr(C)]
+pub union CResult_TransactionNoneZPtr {
+       pub result: *mut crate::c_types::Transaction,
+       /// Note that this value is always NULL, as there are no contents in the Err variant
+       pub err: *mut std::ffi::c_void,
+}
+#[repr(C)]
+pub struct CResult_TransactionNoneZ {
+       pub contents: CResult_TransactionNoneZPtr,
+       pub result_ok: bool,
+}
+#[no_mangle]
+pub extern "C" fn CResult_TransactionNoneZ_ok(o: crate::c_types::Transaction) -> CResult_TransactionNoneZ {
+       CResult_TransactionNoneZ {
+               contents: CResult_TransactionNoneZPtr {
+                       result: Box::into_raw(Box::new(o)),
+               },
+               result_ok: true,
+       }
+}
+#[no_mangle]
+pub extern "C" fn CResult_TransactionNoneZ_err() -> CResult_TransactionNoneZ {
+       CResult_TransactionNoneZ {
+               contents: CResult_TransactionNoneZPtr {
+                       err: std::ptr::null_mut(),
+               },
+               result_ok: false,
+       }
+}
+#[no_mangle]
+pub extern "C" fn CResult_TransactionNoneZ_free(_res: CResult_TransactionNoneZ) { }
+impl Drop for CResult_TransactionNoneZ {
+       fn drop(&mut self) {
+               if self.result_ok {
+                       if unsafe { !(self.contents.result as *mut ()).is_null() } {
+                               let _ = unsafe { Box::from_raw(self.contents.result) };
+                       }
+               } else {
+               }
+       }
+}
+impl From<crate::c_types::CResultTempl<crate::c_types::Transaction, u8>> for CResult_TransactionNoneZ {
+       fn from(mut o: crate::c_types::CResultTempl<crate::c_types::Transaction, u8>) -> Self {
+               let contents = if o.result_ok {
+                       let result = unsafe { o.contents.result };
+                       unsafe { o.contents.result = std::ptr::null_mut() };
+                       CResult_TransactionNoneZPtr { result }
+               } else {
+                       let _ = unsafe { Box::from_raw(o.contents.err) };
+                       o.contents.err = std::ptr::null_mut();
+                       CResult_TransactionNoneZPtr { err: std::ptr::null_mut() }
+               };
+               Self {
+                       contents,
+                       result_ok: o.result_ok,
+               }
+       }
+}
+#[repr(C)]
 pub struct CVec_RouteHopZ {
        pub data: *mut crate::routing::router::RouteHop,
        pub datalen: usize
index 0e8c4dd0e77c1aaacd4a821997d81888444e2d74..f4d5262dd46e6493e48a5586ee29a40dcd757983 100644 (file)
@@ -153,7 +153,7 @@ extern "C" fn ChainMonitor_Watch_update_channel(this_arg: *const c_void, mut fun
 #[must_use]
 extern "C" fn ChainMonitor_Watch_release_pending_monitor_events(this_arg: *const c_void) -> crate::c_types::derived::CVec_MonitorEventZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeChainMonitor) }.release_pending_monitor_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::chain::channelmonitor::MonitorEvent { inner: Box::into_raw(Box::new(item)), is_owned: true } }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::chain::channelmonitor::MonitorEvent::native_into(item) }); };
        local_ret.into()
 }
 
@@ -179,7 +179,7 @@ use lightning::util::events::EventsProvider as EventsProviderTraitImport;
 #[must_use]
 extern "C" fn ChainMonitor_EventsProvider_get_and_clear_pending_events(this_arg: *const c_void) -> crate::c_types::derived::CVec_EventZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeChainMonitor) }.get_and_clear_pending_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::util::events::Event::native_into(item) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::util::events::Event::native_into(item) }); };
        local_ret.into()
 }
 
index 8b9a3afc8e157758bcbe7e62e2d19bbd5fb3f220..f1f39e6d0fb1d90914186b288f8d8f37ee105cdd 100644 (file)
@@ -283,58 +283,85 @@ pub(crate) extern "C" fn MonitorUpdateError_clone_void(this_ptr: *const c_void)
 pub extern "C" fn MonitorUpdateError_clone(orig: &MonitorUpdateError) -> MonitorUpdateError {
        orig.clone()
 }
-
-use lightning::chain::channelmonitor::MonitorEvent as nativeMonitorEventImport;
-type nativeMonitorEvent = nativeMonitorEventImport;
-
 /// An event to be processed by the ChannelManager.
 #[must_use]
+#[derive(Clone)]
 #[repr(C)]
-pub struct MonitorEvent {
-       /// 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.
-       pub inner: *mut nativeMonitorEvent,
-       pub is_owned: bool,
+pub enum MonitorEvent {
+       /// A monitor event containing an HTLCUpdate.
+       HTLCEvent(crate::chain::channelmonitor::HTLCUpdate),
+       /// A monitor event that the Channel's commitment transaction was broadcasted.
+       CommitmentTxBroadcasted(crate::chain::transaction::OutPoint),
 }
-
-impl Drop for MonitorEvent {
-       fn drop(&mut self) {
-               if self.is_owned && !self.inner.is_null() {
-                       let _ = unsafe { Box::from_raw(self.inner) };
+use lightning::chain::channelmonitor::MonitorEvent as nativeMonitorEvent;
+impl MonitorEvent {
+       #[allow(unused)]
+       pub(crate) fn to_native(&self) -> nativeMonitorEvent {
+               match self {
+                       MonitorEvent::HTLCEvent (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               nativeMonitorEvent::HTLCEvent (
+                                       *unsafe { Box::from_raw(a_nonref.take_inner()) },
+                               )
+                       },
+                       MonitorEvent::CommitmentTxBroadcasted (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               nativeMonitorEvent::CommitmentTxBroadcasted (
+                                       *unsafe { Box::from_raw(a_nonref.take_inner()) },
+                               )
+                       },
                }
        }
-}
-#[no_mangle]
-pub extern "C" fn MonitorEvent_free(this_ptr: MonitorEvent) { }
-#[allow(unused)]
-/// Used only if an object of this type is returned as a trait impl by a method
-extern "C" fn MonitorEvent_free_void(this_ptr: *mut c_void) {
-       unsafe { let _ = Box::from_raw(this_ptr as *mut nativeMonitorEvent); }
-}
-#[allow(unused)]
-/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
-impl MonitorEvent {
-       pub(crate) fn take_inner(mut self) -> *mut nativeMonitorEvent {
-               assert!(self.is_owned);
-               let ret = self.inner;
-               self.inner = std::ptr::null_mut();
-               ret
+       #[allow(unused)]
+       pub(crate) fn into_native(self) -> nativeMonitorEvent {
+               match self {
+                       MonitorEvent::HTLCEvent (mut a, ) => {
+                               nativeMonitorEvent::HTLCEvent (
+                                       *unsafe { Box::from_raw(a.take_inner()) },
+                               )
+                       },
+                       MonitorEvent::CommitmentTxBroadcasted (mut a, ) => {
+                               nativeMonitorEvent::CommitmentTxBroadcasted (
+                                       *unsafe { Box::from_raw(a.take_inner()) },
+                               )
+                       },
+               }
        }
-}
-impl Clone for MonitorEvent {
-       fn clone(&self) -> Self {
-               Self {
-                       inner: if self.inner.is_null() { std::ptr::null_mut() } else {
-                               Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
-                       is_owned: true,
+       #[allow(unused)]
+       pub(crate) fn from_native(native: &nativeMonitorEvent) -> Self {
+               match native {
+                       nativeMonitorEvent::HTLCEvent (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               MonitorEvent::HTLCEvent (
+                                       crate::chain::channelmonitor::HTLCUpdate { inner: Box::into_raw(Box::new(a_nonref)), is_owned: true },
+                               )
+                       },
+                       nativeMonitorEvent::CommitmentTxBroadcasted (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               MonitorEvent::CommitmentTxBroadcasted (
+                                       crate::chain::transaction::OutPoint { inner: Box::into_raw(Box::new(a_nonref)), is_owned: true },
+                               )
+                       },
+               }
+       }
+       #[allow(unused)]
+       pub(crate) fn native_into(native: nativeMonitorEvent) -> Self {
+               match native {
+                       nativeMonitorEvent::HTLCEvent (mut a, ) => {
+                               MonitorEvent::HTLCEvent (
+                                       crate::chain::channelmonitor::HTLCUpdate { inner: Box::into_raw(Box::new(a)), is_owned: true },
+                               )
+                       },
+                       nativeMonitorEvent::CommitmentTxBroadcasted (mut a, ) => {
+                               MonitorEvent::CommitmentTxBroadcasted (
+                                       crate::chain::transaction::OutPoint { inner: Box::into_raw(Box::new(a)), is_owned: true },
+                               )
+                       },
                }
        }
 }
-#[allow(unused)]
-/// Used only if an object of this type is returned as a trait impl by a method
-pub(crate) extern "C" fn MonitorEvent_clone_void(this_ptr: *const c_void) -> *mut c_void {
-       Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeMonitorEvent)).clone() })) as *mut c_void
-}
+#[no_mangle]
+pub extern "C" fn MonitorEvent_free(this_ptr: MonitorEvent) { }
 #[no_mangle]
 pub extern "C" fn MonitorEvent_clone(orig: &MonitorEvent) -> MonitorEvent {
        orig.clone()
@@ -512,7 +539,7 @@ pub extern "C" fn ChannelMonitor_get_funding_txo(this_arg: &ChannelMonitor) -> c
 #[no_mangle]
 pub extern "C" fn ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: &mut ChannelMonitor) -> crate::c_types::derived::CVec_MonitorEventZ {
        let mut ret = unsafe { &mut (*(this_arg.inner as *mut nativeChannelMonitor)) }.get_and_clear_pending_monitor_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::chain::channelmonitor::MonitorEvent { inner: Box::into_raw(Box::new(item)), is_owned: true } }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::chain::channelmonitor::MonitorEvent::native_into(item) }); };
        local_ret.into()
 }
 
@@ -526,7 +553,7 @@ pub extern "C" fn ChannelMonitor_get_and_clear_pending_monitor_events(this_arg:
 #[no_mangle]
 pub extern "C" fn ChannelMonitor_get_and_clear_pending_events(this_arg: &mut ChannelMonitor) -> crate::c_types::derived::CVec_EventZ {
        let mut ret = unsafe { &mut (*(this_arg.inner as *mut nativeChannelMonitor)) }.get_and_clear_pending_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::util::events::Event::native_into(item) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::util::events::Event::native_into(item) }); };
        local_ret.into()
 }
 
@@ -543,7 +570,7 @@ pub extern "C" fn ChannelMonitor_get_and_clear_pending_events(this_arg: &mut Cha
 #[no_mangle]
 pub extern "C" fn ChannelMonitor_get_latest_holder_commitment_txn(this_arg: &mut ChannelMonitor, logger: &crate::util::logger::Logger) -> crate::c_types::derived::CVec_TransactionZ {
        let mut ret = unsafe { &mut (*(this_arg.inner as *mut nativeChannelMonitor)) }.get_latest_holder_commitment_txn(logger);
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { let mut local_ret_0 = ::bitcoin::consensus::encode::serialize(&item); crate::c_types::Transaction::from_vec(local_ret_0) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { let mut local_ret_0 = ::bitcoin::consensus::encode::serialize(&item); crate::c_types::Transaction::from_vec(local_ret_0) }); };
        local_ret.into()
 }
 
@@ -563,7 +590,7 @@ pub extern "C" fn ChannelMonitor_get_latest_holder_commitment_txn(this_arg: &mut
 pub extern "C" fn ChannelMonitor_block_connected(this_arg: &mut ChannelMonitor, header: *const [u8; 80], mut txdata: crate::c_types::derived::CVec_C2Tuple_usizeTransactionZZ, mut height: u32, mut broadcaster: crate::chain::chaininterface::BroadcasterInterface, mut fee_estimator: crate::chain::chaininterface::FeeEstimator, mut logger: crate::util::logger::Logger) -> crate::c_types::derived::CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ {
        let mut local_txdata = Vec::new(); for mut item in txdata.into_rust().drain(..) { local_txdata.push( { let (mut orig_txdata_0_0, mut orig_txdata_0_1) = item.to_rust(); let mut local_txdata_0 = (orig_txdata_0_0, orig_txdata_0_1.into_bitcoin()); local_txdata_0 }); };
        let mut ret = unsafe { &mut (*(this_arg.inner as *mut nativeChannelMonitor)) }.block_connected(&::bitcoin::consensus::encode::deserialize(unsafe { &*header }).unwrap(), &local_txdata.iter().map(|(a, b)| (*a, b)).collect::<Vec<_>>()[..], height, broadcaster, fee_estimator, logger);
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { let (mut orig_ret_0_0, mut orig_ret_0_1) = item; let mut local_orig_ret_0_1 = Vec::new(); for item in orig_ret_0_1.drain(..) { local_orig_ret_0_1.push( { let (mut orig_orig_ret_0_1_0_0, mut orig_orig_ret_0_1_0_1) = item; let mut local_orig_ret_0_1_0 = (orig_orig_ret_0_1_0_0, crate::c_types::TxOut::from_rust(orig_orig_ret_0_1_0_1)).into(); local_orig_ret_0_1_0 }); }; let mut local_ret_0 = (crate::c_types::ThirtyTwoBytes { data: orig_ret_0_0.into_inner() }, local_orig_ret_0_1.into()).into(); local_ret_0 }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { let (mut orig_ret_0_0, mut orig_ret_0_1) = item; let mut local_orig_ret_0_1 = Vec::new(); for mut item in orig_ret_0_1.drain(..) { local_orig_ret_0_1.push( { let (mut orig_orig_ret_0_1_0_0, mut orig_orig_ret_0_1_0_1) = item; let mut local_orig_ret_0_1_0 = (orig_orig_ret_0_1_0_0, crate::c_types::TxOut::from_rust(orig_orig_ret_0_1_0_1)).into(); local_orig_ret_0_1_0 }); }; let mut local_ret_0 = (crate::c_types::ThirtyTwoBytes { data: orig_ret_0_0.into_inner() }, local_orig_ret_0_1.into()).into(); local_ret_0 }); };
        local_ret.into()
 }
 
index 3083f0b90567eda6e6917e4cd36b59581da35aba..7642138ed684e772ce5b3e361d2a86b43ada1d59 100644 (file)
@@ -6,6 +6,264 @@ use std::ffi::c_void;
 use bitcoin::hashes::Hash;
 use crate::c_types::*;
 
+
+use lightning::chain::keysinterface::DelayedPaymentOutputDescriptor as nativeDelayedPaymentOutputDescriptorImport;
+type nativeDelayedPaymentOutputDescriptor = nativeDelayedPaymentOutputDescriptorImport;
+
+/// Information about a spendable output to a P2WSH script. See
+/// SpendableOutputDescriptor::DelayedPaymentOutput for more details on how to spend this.
+#[must_use]
+#[repr(C)]
+pub struct DelayedPaymentOutputDescriptor {
+       /// 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.
+       pub inner: *mut nativeDelayedPaymentOutputDescriptor,
+       pub is_owned: bool,
+}
+
+impl Drop for DelayedPaymentOutputDescriptor {
+       fn drop(&mut self) {
+               if self.is_owned && !self.inner.is_null() {
+                       let _ = unsafe { Box::from_raw(self.inner) };
+               }
+       }
+}
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_free(this_ptr: DelayedPaymentOutputDescriptor) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+extern "C" fn DelayedPaymentOutputDescriptor_free_void(this_ptr: *mut c_void) {
+       unsafe { let _ = Box::from_raw(this_ptr as *mut nativeDelayedPaymentOutputDescriptor); }
+}
+#[allow(unused)]
+/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+impl DelayedPaymentOutputDescriptor {
+       pub(crate) fn take_inner(mut self) -> *mut nativeDelayedPaymentOutputDescriptor {
+               assert!(self.is_owned);
+               let ret = self.inner;
+               self.inner = std::ptr::null_mut();
+               ret
+       }
+}
+/// The outpoint which is spendable
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: &DelayedPaymentOutputDescriptor) -> crate::chain::transaction::OutPoint {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.outpoint;
+       crate::chain::transaction::OutPoint { inner: unsafe { ( (&((*inner_val)) as *const _) as *mut _) }, is_owned: false }
+}
+/// The outpoint which is spendable
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: &mut DelayedPaymentOutputDescriptor, mut val: crate::chain::transaction::OutPoint) {
+       unsafe { &mut *this_ptr.inner }.outpoint = *unsafe { Box::from_raw(val.take_inner()) };
+}
+/// Per commitment point to derive delayed_payment_key by key holder
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: &DelayedPaymentOutputDescriptor) -> crate::c_types::PublicKey {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.per_commitment_point;
+       crate::c_types::PublicKey::from_rust(&(*inner_val))
+}
+/// Per commitment point to derive delayed_payment_key by key holder
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: &mut DelayedPaymentOutputDescriptor, mut val: crate::c_types::PublicKey) {
+       unsafe { &mut *this_ptr.inner }.per_commitment_point = val.into_rust();
+}
+/// The nSequence value which must be set in the spending input to satisfy the OP_CSV in
+/// the witness_script.
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: &DelayedPaymentOutputDescriptor) -> u16 {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.to_self_delay;
+       (*inner_val)
+}
+/// The nSequence value which must be set in the spending input to satisfy the OP_CSV in
+/// the witness_script.
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: &mut DelayedPaymentOutputDescriptor, mut val: u16) {
+       unsafe { &mut *this_ptr.inner }.to_self_delay = val;
+}
+/// The output which is referenced by the given outpoint
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_set_output(this_ptr: &mut DelayedPaymentOutputDescriptor, mut val: crate::c_types::TxOut) {
+       unsafe { &mut *this_ptr.inner }.output = val.into_rust();
+}
+/// The revocation point specific to the commitment transaction which was broadcast. Used to
+/// derive the witnessScript for this output.
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: &DelayedPaymentOutputDescriptor) -> crate::c_types::PublicKey {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.revocation_pubkey;
+       crate::c_types::PublicKey::from_rust(&(*inner_val))
+}
+/// The revocation point specific to the commitment transaction which was broadcast. Used to
+/// derive the witnessScript for this output.
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: &mut DelayedPaymentOutputDescriptor, mut val: crate::c_types::PublicKey) {
+       unsafe { &mut *this_ptr.inner }.revocation_pubkey = val.into_rust();
+}
+/// Arbitrary identification information returned by a call to
+/// `ChannelKeys::channel_keys_id()`. This may be useful in re-deriving keys used in
+/// the channel to spend the output.
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: &DelayedPaymentOutputDescriptor) -> *const [u8; 32] {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.channel_keys_id;
+       &(*inner_val)
+}
+/// Arbitrary identification information returned by a call to
+/// `ChannelKeys::channel_keys_id()`. This may be useful in re-deriving keys used in
+/// the channel to spend the output.
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: &mut DelayedPaymentOutputDescriptor, mut val: crate::c_types::ThirtyTwoBytes) {
+       unsafe { &mut *this_ptr.inner }.channel_keys_id = val.data;
+}
+/// The value of the channel which this output originated from, possibly indirectly.
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: &DelayedPaymentOutputDescriptor) -> u64 {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.channel_value_satoshis;
+       (*inner_val)
+}
+/// The value of the channel which this output originated from, possibly indirectly.
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: &mut DelayedPaymentOutputDescriptor, mut val: u64) {
+       unsafe { &mut *this_ptr.inner }.channel_value_satoshis = val;
+}
+#[must_use]
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_new(mut outpoint_arg: crate::chain::transaction::OutPoint, mut per_commitment_point_arg: crate::c_types::PublicKey, mut to_self_delay_arg: u16, mut output_arg: crate::c_types::TxOut, mut revocation_pubkey_arg: crate::c_types::PublicKey, mut channel_keys_id_arg: crate::c_types::ThirtyTwoBytes, mut channel_value_satoshis_arg: u64) -> DelayedPaymentOutputDescriptor {
+       DelayedPaymentOutputDescriptor { inner: Box::into_raw(Box::new(nativeDelayedPaymentOutputDescriptor {
+               outpoint: *unsafe { Box::from_raw(outpoint_arg.take_inner()) },
+               per_commitment_point: per_commitment_point_arg.into_rust(),
+               to_self_delay: to_self_delay_arg,
+               output: output_arg.into_rust(),
+               revocation_pubkey: revocation_pubkey_arg.into_rust(),
+               channel_keys_id: channel_keys_id_arg.data,
+               channel_value_satoshis: channel_value_satoshis_arg,
+       })), is_owned: true }
+}
+impl Clone for DelayedPaymentOutputDescriptor {
+       fn clone(&self) -> Self {
+               Self {
+                       inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+                               Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
+                       is_owned: true,
+               }
+       }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn DelayedPaymentOutputDescriptor_clone_void(this_ptr: *const c_void) -> *mut c_void {
+       Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeDelayedPaymentOutputDescriptor)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn DelayedPaymentOutputDescriptor_clone(orig: &DelayedPaymentOutputDescriptor) -> DelayedPaymentOutputDescriptor {
+       orig.clone()
+}
+
+use lightning::chain::keysinterface::StaticPaymentOutputDescriptor as nativeStaticPaymentOutputDescriptorImport;
+type nativeStaticPaymentOutputDescriptor = nativeStaticPaymentOutputDescriptorImport;
+
+/// Information about a spendable output to our \"payment key\". See
+/// SpendableOutputDescriptor::StaticPaymentOutput for more details on how to spend this.
+#[must_use]
+#[repr(C)]
+pub struct StaticPaymentOutputDescriptor {
+       /// 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.
+       pub inner: *mut nativeStaticPaymentOutputDescriptor,
+       pub is_owned: bool,
+}
+
+impl Drop for StaticPaymentOutputDescriptor {
+       fn drop(&mut self) {
+               if self.is_owned && !self.inner.is_null() {
+                       let _ = unsafe { Box::from_raw(self.inner) };
+               }
+       }
+}
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_free(this_ptr: StaticPaymentOutputDescriptor) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+extern "C" fn StaticPaymentOutputDescriptor_free_void(this_ptr: *mut c_void) {
+       unsafe { let _ = Box::from_raw(this_ptr as *mut nativeStaticPaymentOutputDescriptor); }
+}
+#[allow(unused)]
+/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+impl StaticPaymentOutputDescriptor {
+       pub(crate) fn take_inner(mut self) -> *mut nativeStaticPaymentOutputDescriptor {
+               assert!(self.is_owned);
+               let ret = self.inner;
+               self.inner = std::ptr::null_mut();
+               ret
+       }
+}
+/// The outpoint which is spendable
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_get_outpoint(this_ptr: &StaticPaymentOutputDescriptor) -> crate::chain::transaction::OutPoint {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.outpoint;
+       crate::chain::transaction::OutPoint { inner: unsafe { ( (&((*inner_val)) as *const _) as *mut _) }, is_owned: false }
+}
+/// The outpoint which is spendable
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_set_outpoint(this_ptr: &mut StaticPaymentOutputDescriptor, mut val: crate::chain::transaction::OutPoint) {
+       unsafe { &mut *this_ptr.inner }.outpoint = *unsafe { Box::from_raw(val.take_inner()) };
+}
+/// The output which is referenced by the given outpoint
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_set_output(this_ptr: &mut StaticPaymentOutputDescriptor, mut val: crate::c_types::TxOut) {
+       unsafe { &mut *this_ptr.inner }.output = val.into_rust();
+}
+/// Arbitrary identification information returned by a call to
+/// `ChannelKeys::channel_keys_id()`. This may be useful in re-deriving keys used in
+/// the channel to spend the output.
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: &StaticPaymentOutputDescriptor) -> *const [u8; 32] {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.channel_keys_id;
+       &(*inner_val)
+}
+/// Arbitrary identification information returned by a call to
+/// `ChannelKeys::channel_keys_id()`. This may be useful in re-deriving keys used in
+/// the channel to spend the output.
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: &mut StaticPaymentOutputDescriptor, mut val: crate::c_types::ThirtyTwoBytes) {
+       unsafe { &mut *this_ptr.inner }.channel_keys_id = val.data;
+}
+/// The value of the channel which this transactions spends.
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: &StaticPaymentOutputDescriptor) -> u64 {
+       let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.channel_value_satoshis;
+       (*inner_val)
+}
+/// The value of the channel which this transactions spends.
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: &mut StaticPaymentOutputDescriptor, mut val: u64) {
+       unsafe { &mut *this_ptr.inner }.channel_value_satoshis = val;
+}
+#[must_use]
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_new(mut outpoint_arg: crate::chain::transaction::OutPoint, mut output_arg: crate::c_types::TxOut, mut channel_keys_id_arg: crate::c_types::ThirtyTwoBytes, mut channel_value_satoshis_arg: u64) -> StaticPaymentOutputDescriptor {
+       StaticPaymentOutputDescriptor { inner: Box::into_raw(Box::new(nativeStaticPaymentOutputDescriptor {
+               outpoint: *unsafe { Box::from_raw(outpoint_arg.take_inner()) },
+               output: output_arg.into_rust(),
+               channel_keys_id: channel_keys_id_arg.data,
+               channel_value_satoshis: channel_value_satoshis_arg,
+       })), is_owned: true }
+}
+impl Clone for StaticPaymentOutputDescriptor {
+       fn clone(&self) -> Self {
+               Self {
+                       inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+                               Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
+                       is_owned: true,
+               }
+       }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn StaticPaymentOutputDescriptor_clone_void(this_ptr: *const c_void) -> *mut c_void {
+       Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeStaticPaymentOutputDescriptor)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn StaticPaymentOutputDescriptor_clone(orig: &StaticPaymentOutputDescriptor) -> StaticPaymentOutputDescriptor {
+       orig.clone()
+}
 /// When on-chain outputs are created by rust-lightning (which our counterparty is not able to
 /// claim at any point in the future) an event is generated which you must track and be able to
 /// spend on-chain. The information needed to do this is provided in this enum, including the
@@ -52,15 +310,7 @@ pub enum SpendableOutputDescriptor {
        /// regenerated by passing the revocation_pubkey (derived as above), our delayed_payment pubkey
        /// (derived as above), and the to_self_delay contained here to
        /// chan_utils::get_revokeable_redeemscript.
-       DynamicOutputP2WSH {
-               outpoint: crate::chain::transaction::OutPoint,
-               per_commitment_point: crate::c_types::PublicKey,
-               to_self_delay: u16,
-               output: crate::c_types::TxOut,
-               revocation_pubkey: crate::c_types::PublicKey,
-               channel_keys_id: crate::c_types::ThirtyTwoBytes,
-               channel_value_satoshis: u64,
-       },
+       DelayedPaymentOutput(crate::chain::keysinterface::DelayedPaymentOutputDescriptor),
        /// An output to a P2WPKH, spendable exclusively by our payment key (ie the private key which
        /// corresponds to the public key in ChannelKeys::pubkeys().payment_point).
        /// The witness in the spending input, is, thus, simply:
@@ -68,12 +318,7 @@ pub enum SpendableOutputDescriptor {
        ///
        /// These are generally the result of our counterparty having broadcast the current state,
        /// allowing us to claim the non-HTLC-encumbered outputs immediately.
-       StaticOutputCounterpartyPayment {
-               outpoint: crate::chain::transaction::OutPoint,
-               output: crate::c_types::TxOut,
-               channel_keys_id: crate::c_types::ThirtyTwoBytes,
-               channel_value_satoshis: u64,
-       },
+       StaticPaymentOutput(crate::chain::keysinterface::StaticPaymentOutputDescriptor),
 }
 use lightning::chain::keysinterface::SpendableOutputDescriptor as nativeSpendableOutputDescriptor;
 impl SpendableOutputDescriptor {
@@ -88,35 +333,17 @@ impl SpendableOutputDescriptor {
                                        output: output_nonref.into_rust(),
                                }
                        },
-                       SpendableOutputDescriptor::DynamicOutputP2WSH {ref outpoint, ref per_commitment_point, ref to_self_delay, ref output, ref revocation_pubkey, ref channel_keys_id, ref channel_value_satoshis, } => {
-                               let mut outpoint_nonref = (*outpoint).clone();
-                               let mut per_commitment_point_nonref = (*per_commitment_point).clone();
-                               let mut to_self_delay_nonref = (*to_self_delay).clone();
-                               let mut output_nonref = (*output).clone();
-                               let mut revocation_pubkey_nonref = (*revocation_pubkey).clone();
-                               let mut channel_keys_id_nonref = (*channel_keys_id).clone();
-                               let mut channel_value_satoshis_nonref = (*channel_value_satoshis).clone();
-                               nativeSpendableOutputDescriptor::DynamicOutputP2WSH {
-                                       outpoint: *unsafe { Box::from_raw(outpoint_nonref.take_inner()) },
-                                       per_commitment_point: per_commitment_point_nonref.into_rust(),
-                                       to_self_delay: to_self_delay_nonref,
-                                       output: output_nonref.into_rust(),
-                                       revocation_pubkey: revocation_pubkey_nonref.into_rust(),
-                                       channel_keys_id: channel_keys_id_nonref.data,
-                                       channel_value_satoshis: channel_value_satoshis_nonref,
-                               }
+                       SpendableOutputDescriptor::DelayedPaymentOutput (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               nativeSpendableOutputDescriptor::DelayedPaymentOutput (
+                                       *unsafe { Box::from_raw(a_nonref.take_inner()) },
+                               )
                        },
-                       SpendableOutputDescriptor::StaticOutputCounterpartyPayment {ref outpoint, ref output, ref channel_keys_id, ref channel_value_satoshis, } => {
-                               let mut outpoint_nonref = (*outpoint).clone();
-                               let mut output_nonref = (*output).clone();
-                               let mut channel_keys_id_nonref = (*channel_keys_id).clone();
-                               let mut channel_value_satoshis_nonref = (*channel_value_satoshis).clone();
-                               nativeSpendableOutputDescriptor::StaticOutputCounterpartyPayment {
-                                       outpoint: *unsafe { Box::from_raw(outpoint_nonref.take_inner()) },
-                                       output: output_nonref.into_rust(),
-                                       channel_keys_id: channel_keys_id_nonref.data,
-                                       channel_value_satoshis: channel_value_satoshis_nonref,
-                               }
+                       SpendableOutputDescriptor::StaticPaymentOutput (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               nativeSpendableOutputDescriptor::StaticPaymentOutput (
+                                       *unsafe { Box::from_raw(a_nonref.take_inner()) },
+                               )
                        },
                }
        }
@@ -129,24 +356,15 @@ impl SpendableOutputDescriptor {
                                        output: output.into_rust(),
                                }
                        },
-                       SpendableOutputDescriptor::DynamicOutputP2WSH {mut outpoint, mut per_commitment_point, mut to_self_delay, mut output, mut revocation_pubkey, mut channel_keys_id, mut channel_value_satoshis, } => {
-                               nativeSpendableOutputDescriptor::DynamicOutputP2WSH {
-                                       outpoint: *unsafe { Box::from_raw(outpoint.take_inner()) },
-                                       per_commitment_point: per_commitment_point.into_rust(),
-                                       to_self_delay: to_self_delay,
-                                       output: output.into_rust(),
-                                       revocation_pubkey: revocation_pubkey.into_rust(),
-                                       channel_keys_id: channel_keys_id.data,
-                                       channel_value_satoshis: channel_value_satoshis,
-                               }
+                       SpendableOutputDescriptor::DelayedPaymentOutput (mut a, ) => {
+                               nativeSpendableOutputDescriptor::DelayedPaymentOutput (
+                                       *unsafe { Box::from_raw(a.take_inner()) },
+                               )
                        },
-                       SpendableOutputDescriptor::StaticOutputCounterpartyPayment {mut outpoint, mut output, mut channel_keys_id, mut channel_value_satoshis, } => {
-                               nativeSpendableOutputDescriptor::StaticOutputCounterpartyPayment {
-                                       outpoint: *unsafe { Box::from_raw(outpoint.take_inner()) },
-                                       output: output.into_rust(),
-                                       channel_keys_id: channel_keys_id.data,
-                                       channel_value_satoshis: channel_value_satoshis,
-                               }
+                       SpendableOutputDescriptor::StaticPaymentOutput (mut a, ) => {
+                               nativeSpendableOutputDescriptor::StaticPaymentOutput (
+                                       *unsafe { Box::from_raw(a.take_inner()) },
+                               )
                        },
                }
        }
@@ -161,35 +379,17 @@ impl SpendableOutputDescriptor {
                                        output: crate::c_types::TxOut::from_rust(output_nonref),
                                }
                        },
-                       nativeSpendableOutputDescriptor::DynamicOutputP2WSH {ref outpoint, ref per_commitment_point, ref to_self_delay, ref output, ref revocation_pubkey, ref channel_keys_id, ref channel_value_satoshis, } => {
-                               let mut outpoint_nonref = (*outpoint).clone();
-                               let mut per_commitment_point_nonref = (*per_commitment_point).clone();
-                               let mut to_self_delay_nonref = (*to_self_delay).clone();
-                               let mut output_nonref = (*output).clone();
-                               let mut revocation_pubkey_nonref = (*revocation_pubkey).clone();
-                               let mut channel_keys_id_nonref = (*channel_keys_id).clone();
-                               let mut channel_value_satoshis_nonref = (*channel_value_satoshis).clone();
-                               SpendableOutputDescriptor::DynamicOutputP2WSH {
-                                       outpoint: crate::chain::transaction::OutPoint { inner: Box::into_raw(Box::new(outpoint_nonref)), is_owned: true },
-                                       per_commitment_point: crate::c_types::PublicKey::from_rust(&per_commitment_point_nonref),
-                                       to_self_delay: to_self_delay_nonref,
-                                       output: crate::c_types::TxOut::from_rust(output_nonref),
-                                       revocation_pubkey: crate::c_types::PublicKey::from_rust(&revocation_pubkey_nonref),
-                                       channel_keys_id: crate::c_types::ThirtyTwoBytes { data: channel_keys_id_nonref },
-                                       channel_value_satoshis: channel_value_satoshis_nonref,
-                               }
+                       nativeSpendableOutputDescriptor::DelayedPaymentOutput (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               SpendableOutputDescriptor::DelayedPaymentOutput (
+                                       crate::chain::keysinterface::DelayedPaymentOutputDescriptor { inner: Box::into_raw(Box::new(a_nonref)), is_owned: true },
+                               )
                        },
-                       nativeSpendableOutputDescriptor::StaticOutputCounterpartyPayment {ref outpoint, ref output, ref channel_keys_id, ref channel_value_satoshis, } => {
-                               let mut outpoint_nonref = (*outpoint).clone();
-                               let mut output_nonref = (*output).clone();
-                               let mut channel_keys_id_nonref = (*channel_keys_id).clone();
-                               let mut channel_value_satoshis_nonref = (*channel_value_satoshis).clone();
-                               SpendableOutputDescriptor::StaticOutputCounterpartyPayment {
-                                       outpoint: crate::chain::transaction::OutPoint { inner: Box::into_raw(Box::new(outpoint_nonref)), is_owned: true },
-                                       output: crate::c_types::TxOut::from_rust(output_nonref),
-                                       channel_keys_id: crate::c_types::ThirtyTwoBytes { data: channel_keys_id_nonref },
-                                       channel_value_satoshis: channel_value_satoshis_nonref,
-                               }
+                       nativeSpendableOutputDescriptor::StaticPaymentOutput (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               SpendableOutputDescriptor::StaticPaymentOutput (
+                                       crate::chain::keysinterface::StaticPaymentOutputDescriptor { inner: Box::into_raw(Box::new(a_nonref)), is_owned: true },
+                               )
                        },
                }
        }
@@ -202,24 +402,15 @@ impl SpendableOutputDescriptor {
                                        output: crate::c_types::TxOut::from_rust(output),
                                }
                        },
-                       nativeSpendableOutputDescriptor::DynamicOutputP2WSH {mut outpoint, mut per_commitment_point, mut to_self_delay, mut output, mut revocation_pubkey, mut channel_keys_id, mut channel_value_satoshis, } => {
-                               SpendableOutputDescriptor::DynamicOutputP2WSH {
-                                       outpoint: crate::chain::transaction::OutPoint { inner: Box::into_raw(Box::new(outpoint)), is_owned: true },
-                                       per_commitment_point: crate::c_types::PublicKey::from_rust(&per_commitment_point),
-                                       to_self_delay: to_self_delay,
-                                       output: crate::c_types::TxOut::from_rust(output),
-                                       revocation_pubkey: crate::c_types::PublicKey::from_rust(&revocation_pubkey),
-                                       channel_keys_id: crate::c_types::ThirtyTwoBytes { data: channel_keys_id },
-                                       channel_value_satoshis: channel_value_satoshis,
-                               }
+                       nativeSpendableOutputDescriptor::DelayedPaymentOutput (mut a, ) => {
+                               SpendableOutputDescriptor::DelayedPaymentOutput (
+                                       crate::chain::keysinterface::DelayedPaymentOutputDescriptor { inner: Box::into_raw(Box::new(a)), is_owned: true },
+                               )
                        },
-                       nativeSpendableOutputDescriptor::StaticOutputCounterpartyPayment {mut outpoint, mut output, mut channel_keys_id, mut channel_value_satoshis, } => {
-                               SpendableOutputDescriptor::StaticOutputCounterpartyPayment {
-                                       outpoint: crate::chain::transaction::OutPoint { inner: Box::into_raw(Box::new(outpoint)), is_owned: true },
-                                       output: crate::c_types::TxOut::from_rust(output),
-                                       channel_keys_id: crate::c_types::ThirtyTwoBytes { data: channel_keys_id },
-                                       channel_value_satoshis: channel_value_satoshis,
-                               }
+                       nativeSpendableOutputDescriptor::StaticPaymentOutput (mut a, ) => {
+                               SpendableOutputDescriptor::StaticPaymentOutput (
+                                       crate::chain::keysinterface::StaticPaymentOutputDescriptor { inner: Box::into_raw(Box::new(a)), is_owned: true },
+                               )
                        },
                }
        }
@@ -257,11 +448,6 @@ pub extern "C" fn SpendableOutputDescriptor_read(ser: crate::c_types::u8slice) -
 /// In any case, ChannelMonitor or fallback watchtowers are always going to be trusted
 /// to act, as liveness and breach reply correctness are always going to be hard requirements
 /// of LN security model, orthogonal of key management issues.
-///
-/// If you're implementing a custom signer, you almost certainly want to implement
-/// Readable/Writable to serialize out a unique reference to this set of keys so
-/// that you can serialize the full ChannelManager object.
-///
 #[repr(C)]
 pub struct ChannelKeys {
        pub this_arg: *mut c_void,
@@ -278,7 +464,6 @@ pub struct ChannelKeys {
        /// May be called more than once for the same index.
        ///
        /// Note that the commitment number starts at (1 << 48) - 1 and counts backwards.
-       /// TODO: return a Result so we can signal a validation error
        #[must_use]
        pub release_commitment_secret: extern "C" fn (this_arg: *const c_void, idx: u64) -> crate::c_types::ThirtyTwoBytes,
        /// Gets the holder's channel public keys and basepoints
@@ -779,6 +964,33 @@ pub extern "C" fn InMemoryChannelKeys_get_channel_parameters(this_arg: &InMemory
        crate::ln::chan_utils::ChannelTransactionParameters { inner: unsafe { ( (&(*ret) as *const _) as *mut _) }, is_owned: false }
 }
 
+/// Sign the single input of spend_tx at index `input_idx` which spends the output
+/// described by descriptor, returning the witness stack for the input.
+///
+/// Returns an Err if the input at input_idx does not exist, has a non-empty script_sig,
+/// or is not spending the outpoint described by `descriptor.outpoint`.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn InMemoryChannelKeys_sign_counterparty_payment_input(this_arg: &InMemoryChannelKeys, mut spend_tx: crate::c_types::Transaction, mut input_idx: usize, descriptor: &crate::chain::keysinterface::StaticPaymentOutputDescriptor) -> crate::c_types::derived::CResult_CVec_CVec_u8ZZNoneZ {
+       let mut ret = unsafe { &*this_arg.inner }.sign_counterparty_payment_input(&spend_tx.into_bitcoin(), input_idx, unsafe { &*descriptor.inner }, &bitcoin::secp256k1::Secp256k1::new());
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let mut local_ret_0 = Vec::new(); for mut item in o.drain(..) { local_ret_0.push( { let mut local_ret_0_0 = Vec::new(); for mut item in item.drain(..) { local_ret_0_0.push( { item }); }; local_ret_0_0.into() }); }; local_ret_0.into() }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
+       local_ret
+}
+
+/// Sign the single input of spend_tx at index `input_idx` which spends the output
+/// described by descriptor, returning the witness stack for the input.
+///
+/// Returns an Err if the input at input_idx does not exist, has a non-empty script_sig,
+/// is not spending the outpoint described by `descriptor.outpoint`, or does not have a
+/// sequence set to `descriptor.to_self_delay`.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn InMemoryChannelKeys_sign_dynamic_p2wsh_input(this_arg: &InMemoryChannelKeys, mut spend_tx: crate::c_types::Transaction, mut input_idx: usize, descriptor: &crate::chain::keysinterface::DelayedPaymentOutputDescriptor) -> crate::c_types::derived::CResult_CVec_CVec_u8ZZNoneZ {
+       let mut ret = unsafe { &*this_arg.inner }.sign_dynamic_p2wsh_input(&spend_tx.into_bitcoin(), input_idx, unsafe { &*descriptor.inner }, &bitcoin::secp256k1::Secp256k1::new());
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let mut local_ret_0 = Vec::new(); for mut item in o.drain(..) { local_ret_0.push( { let mut local_ret_0_0 = Vec::new(); for mut item in item.drain(..) { local_ret_0_0.push( { item }); }; local_ret_0_0.into() }); }; local_ret_0.into() }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
+       local_ret
+}
+
 impl From<nativeInMemoryChannelKeys> for crate::chain::keysinterface::ChannelKeys {
        fn from(obj: nativeInMemoryChannelKeys) -> Self {
                let mut rust_obj = InMemoryChannelKeys { inner: Box::into_raw(Box::new(obj)), is_owned: true };
@@ -842,13 +1054,13 @@ extern "C" fn InMemoryChannelKeys_ChannelKeys_channel_keys_id(this_arg: *const c
 #[must_use]
 extern "C" fn InMemoryChannelKeys_ChannelKeys_sign_counterparty_commitment(this_arg: *const c_void, commitment_tx: &crate::ln::chan_utils::CommitmentTransaction) -> crate::c_types::derived::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeInMemoryChannelKeys) }.sign_counterparty_commitment(unsafe { &*commitment_tx.inner }, &bitcoin::secp256k1::Secp256k1::new());
-       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let (mut orig_ret_0_0, mut orig_ret_0_1) = o; let mut local_orig_ret_0_1 = Vec::new(); for item in orig_ret_0_1.drain(..) { local_orig_ret_0_1.push( { crate::c_types::Signature::from_rust(&item) }); }; let mut local_ret_0 = (crate::c_types::Signature::from_rust(&orig_ret_0_0), local_orig_ret_0_1.into()).into(); local_ret_0 }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let (mut orig_ret_0_0, mut orig_ret_0_1) = o; let mut local_orig_ret_0_1 = Vec::new(); for mut item in orig_ret_0_1.drain(..) { local_orig_ret_0_1.push( { crate::c_types::Signature::from_rust(&item) }); }; let mut local_ret_0 = (crate::c_types::Signature::from_rust(&orig_ret_0_0), local_orig_ret_0_1.into()).into(); local_ret_0 }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
        local_ret
 }
 #[must_use]
 extern "C" fn InMemoryChannelKeys_ChannelKeys_sign_holder_commitment_and_htlcs(this_arg: *const c_void, commitment_tx: &crate::ln::chan_utils::HolderCommitmentTransaction) -> crate::c_types::derived::CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeInMemoryChannelKeys) }.sign_holder_commitment_and_htlcs(unsafe { &*commitment_tx.inner }, &bitcoin::secp256k1::Secp256k1::new());
-       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let (mut orig_ret_0_0, mut orig_ret_0_1) = o; let mut local_orig_ret_0_1 = Vec::new(); for item in orig_ret_0_1.drain(..) { local_orig_ret_0_1.push( { crate::c_types::Signature::from_rust(&item) }); }; let mut local_ret_0 = (crate::c_types::Signature::from_rust(&orig_ret_0_0), local_orig_ret_0_1.into()).into(); local_ret_0 }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let (mut orig_ret_0_0, mut orig_ret_0_1) = o; let mut local_orig_ret_0_1 = Vec::new(); for mut item in orig_ret_0_1.drain(..) { local_orig_ret_0_1.push( { crate::c_types::Signature::from_rust(&item) }); }; let mut local_ret_0 = (crate::c_types::Signature::from_rust(&orig_ret_0_0), local_orig_ret_0_1.into()).into(); local_ret_0 }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
        local_ret
 }
 #[must_use]
@@ -959,8 +1171,8 @@ impl KeysManager {
 /// detailed description of the guarantee.
 #[must_use]
 #[no_mangle]
-pub extern "C" fn KeysManager_new(seed: *const [u8; 32], mut network: crate::bitcoin::network::Network, mut starting_time_secs: u64, mut starting_time_nanos: u32) -> KeysManager {
-       let mut ret = lightning::chain::keysinterface::KeysManager::new(unsafe { &*seed}, network.into_bitcoin(), starting_time_secs, starting_time_nanos);
+pub extern "C" fn KeysManager_new(seed: *const [u8; 32], mut starting_time_secs: u64, mut starting_time_nanos: u32) -> KeysManager {
+       let mut ret = lightning::chain::keysinterface::KeysManager::new(unsafe { &*seed}, starting_time_secs, starting_time_nanos);
        KeysManager { inner: Box::into_raw(Box::new(ret)), is_owned: true }
 }
 
@@ -976,6 +1188,27 @@ pub extern "C" fn KeysManager_derive_channel_keys(this_arg: &KeysManager, mut ch
        crate::chain::keysinterface::InMemoryChannelKeys { inner: Box::into_raw(Box::new(ret)), is_owned: true }
 }
 
+/// Creates a Transaction which spends the given descriptors to the given outputs, plus an
+/// output to the given change destination (if sufficient change value remains). The
+/// transaction will have a feerate, at least, of the given value.
+///
+/// Returns `Err(())` if the output value is greater than the input value minus required fee or
+/// if a descriptor was duplicated.
+///
+/// We do not enforce that outputs meet the dust limit or that any output scripts are standard.
+///
+/// May panic if the `SpendableOutputDescriptor`s were not generated by Channels which used
+/// this KeysManager or one of the `InMemoryChannelKeys` created by this KeysManager.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn KeysManager_spend_spendable_outputs(this_arg: &KeysManager, mut descriptors: crate::c_types::derived::CVec_SpendableOutputDescriptorZ, mut outputs: crate::c_types::derived::CVec_TxOutZ, mut change_destination_script: crate::c_types::derived::CVec_u8Z, mut feerate_sat_per_1000_weight: u32) -> crate::c_types::derived::CResult_TransactionNoneZ {
+       let mut local_descriptors = Vec::new(); for mut item in descriptors.into_rust().drain(..) { local_descriptors.push( { item.into_native() }); };
+       let mut local_outputs = Vec::new(); for mut item in outputs.into_rust().drain(..) { local_outputs.push( { item.into_rust() }); };
+       let mut ret = unsafe { &*this_arg.inner }.spend_spendable_outputs(&local_descriptors.iter().collect::<Vec<_>>()[..], local_outputs, ::bitcoin::blockdata::script::Script::from(change_destination_script.into_rust()), feerate_sat_per_1000_weight, &bitcoin::secp256k1::Secp256k1::new());
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let mut local_ret_0 = ::bitcoin::consensus::encode::serialize(&o); crate::c_types::Transaction::from_vec(local_ret_0) }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
+       local_ret
+}
+
 impl From<nativeKeysManager> for crate::chain::keysinterface::KeysInterface {
        fn from(obj: nativeKeysManager) -> Self {
                let mut rust_obj = KeysManager { inner: Box::into_raw(Box::new(obj)), is_owned: true };
index fa337d3141b15fbb3b9aa2d472c1ae039e2e1563..b7c6bd78e1359d56640ff3028eff010c8b0b798e 100644 (file)
@@ -168,7 +168,7 @@ impl rustWatch for Watch {
        }
        fn release_pending_monitor_events(&self) -> Vec<lightning::chain::channelmonitor::MonitorEvent> {
                let mut ret = (self.release_pending_monitor_events)(self.this_arg);
-               let mut local_ret = Vec::new(); for mut item in ret.into_rust().drain(..) { local_ret.push( { *unsafe { Box::from_raw(item.take_inner()) } }); };
+               let mut local_ret = Vec::new(); for mut item in ret.into_rust().drain(..) { local_ret.push( { item.into_native() }); };
                local_ret
        }
 }
index 2783d803d40af766f206842dc9ed8d459d607a87..785a159ed215d8e8e22878b71022d128d64107dc 100644 (file)
@@ -396,6 +396,9 @@ pub extern "C" fn TxCreationKeys_from_channel_static_keys(mut per_commitment_poi
        local_ret
 }
 
+
+#[no_mangle]
+pub static REVOKEABLE_REDEEMSCRIPT_MAX_LENGTH: usize = lightning::ln::chan_utils::REVOKEABLE_REDEEMSCRIPT_MAX_LENGTH;
 /// A script either spendable by the revocation
 /// key or the broadcaster_delayed_payment_key and satisfying the relative-locktime OP_CSV constrain.
 /// Encumbering a `to_holder` output on a commitment transaction or 2nd-stage HTLC transactions.
@@ -1351,7 +1354,7 @@ pub extern "C" fn TrustedCommitmentTransaction_keys(this_arg: &TrustedCommitment
 #[no_mangle]
 pub extern "C" fn TrustedCommitmentTransaction_get_htlc_sigs(this_arg: &TrustedCommitmentTransaction, htlc_base_key: *const [u8; 32], channel_parameters: &crate::ln::chan_utils::DirectedChannelTransactionParameters) -> crate::c_types::derived::CResult_CVec_SignatureZNoneZ {
        let mut ret = unsafe { &*this_arg.inner }.get_htlc_sigs(&::bitcoin::secp256k1::key::SecretKey::from_slice(&unsafe { *htlc_base_key}[..]).unwrap(), unsafe { &*channel_parameters.inner }, &bitcoin::secp256k1::Secp256k1::new());
-       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let mut local_ret_0 = Vec::new(); for item in o.drain(..) { local_ret_0.push( { crate::c_types::Signature::from_rust(&item) }); }; local_ret_0.into() }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let mut local_ret_0 = Vec::new(); for mut item in o.drain(..) { local_ret_0.push( { crate::c_types::Signature::from_rust(&item) }); }; local_ret_0.into() }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { 0u8 /*e*/ }).into() };
        local_ret
 }
 
index 77c6b5aded58e6b461ae121f579c0e8734e09093..5fa3e1a9c23daf345b4634b346f1946ac232c92f 100644 (file)
@@ -256,60 +256,168 @@ pub(crate) extern "C" fn ChannelDetails_clone_void(this_ptr: *const c_void) -> *
 pub extern "C" fn ChannelDetails_clone(orig: &ChannelDetails) -> ChannelDetails {
        orig.clone()
 }
-
-use lightning::ln::channelmanager::PaymentSendFailure as nativePaymentSendFailureImport;
-type nativePaymentSendFailure = nativePaymentSendFailureImport;
-
 /// If a payment fails to send, it can be in one of several states. This enum is returned as the
 /// Err() type describing which state the payment is in, see the description of individual enum
 /// states for more.
 #[must_use]
+#[derive(Clone)]
 #[repr(C)]
-pub struct PaymentSendFailure {
-       /// 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.
-       pub inner: *mut nativePaymentSendFailure,
-       pub is_owned: bool,
-}
-
-impl Drop for PaymentSendFailure {
-       fn drop(&mut self) {
-               if self.is_owned && !self.inner.is_null() {
-                       let _ = unsafe { Box::from_raw(self.inner) };
+pub enum PaymentSendFailure {
+       /// A parameter which was passed to send_payment was invalid, preventing us from attempting to
+       /// send the payment at all. No channel state has been changed or messages sent to peers, and
+       /// once you've changed the parameter at error, you can freely retry the payment in full.
+       ParameterError(crate::util::errors::APIError),
+       /// A parameter in a single path which was passed to send_payment was invalid, preventing us
+       /// from attempting to send the payment at all. No channel state has been changed or messages
+       /// sent to peers, and once you've changed the parameter at error, you can freely retry the
+       /// payment in full.
+       ///
+       /// The results here are ordered the same as the paths in the route object which was passed to
+       /// send_payment.
+       PathParameterError(crate::c_types::derived::CVec_CResult_NoneAPIErrorZZ),
+       /// All paths which were attempted failed to send, with no channel state change taking place.
+       /// You can freely retry the payment in full (though you probably want to do so over different
+       /// paths than the ones selected).
+       AllFailedRetrySafe(crate::c_types::derived::CVec_APIErrorZ),
+       /// Some paths which were attempted failed to send, though possibly not all. At least some
+       /// paths have irrevocably committed to the HTLC and retrying the payment in full would result
+       /// in over-/re-payment.
+       ///
+       /// The results here are ordered the same as the paths in the route object which was passed to
+       /// send_payment, and any Errs which are not APIError::MonitorUpdateFailed can be safely
+       /// retried (though there is currently no API with which to do so).
+       ///
+       /// Any entries which contain Err(APIError::MonitorUpdateFailed) or Ok(()) MUST NOT be retried
+       /// as they will result in over-/re-payment. These HTLCs all either successfully sent (in the
+       /// case of Ok(())) or will send once channel_monitor_updated is called on the next-hop channel
+       /// with the latest update_id.
+       PartialFailure(crate::c_types::derived::CVec_CResult_NoneAPIErrorZZ),
+}
+use lightning::ln::channelmanager::PaymentSendFailure as nativePaymentSendFailure;
+impl PaymentSendFailure {
+       #[allow(unused)]
+       pub(crate) fn to_native(&self) -> nativePaymentSendFailure {
+               match self {
+                       PaymentSendFailure::ParameterError (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               nativePaymentSendFailure::ParameterError (
+                                       a_nonref.into_native(),
+                               )
+                       },
+                       PaymentSendFailure::PathParameterError (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               let mut local_a_nonref = Vec::new(); for mut item in a_nonref.into_rust().drain(..) { local_a_nonref.push( { let mut local_a_nonref_0 = match item.result_ok { true => Ok( { () /*(*unsafe { Box::from_raw(<*mut _>::take_ptr(&mut item.contents.result)) })*/ }), false => Err( { (*unsafe { Box::from_raw(<*mut _>::take_ptr(&mut item.contents.err)) }).into_native() })}; local_a_nonref_0 }); };
+                               nativePaymentSendFailure::PathParameterError (
+                                       local_a_nonref,
+                               )
+                       },
+                       PaymentSendFailure::AllFailedRetrySafe (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               let mut local_a_nonref = Vec::new(); for mut item in a_nonref.into_rust().drain(..) { local_a_nonref.push( { item.into_native() }); };
+                               nativePaymentSendFailure::AllFailedRetrySafe (
+                                       local_a_nonref,
+                               )
+                       },
+                       PaymentSendFailure::PartialFailure (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               let mut local_a_nonref = Vec::new(); for mut item in a_nonref.into_rust().drain(..) { local_a_nonref.push( { let mut local_a_nonref_0 = match item.result_ok { true => Ok( { () /*(*unsafe { Box::from_raw(<*mut _>::take_ptr(&mut item.contents.result)) })*/ }), false => Err( { (*unsafe { Box::from_raw(<*mut _>::take_ptr(&mut item.contents.err)) }).into_native() })}; local_a_nonref_0 }); };
+                               nativePaymentSendFailure::PartialFailure (
+                                       local_a_nonref,
+                               )
+                       },
                }
        }
-}
-#[no_mangle]
-pub extern "C" fn PaymentSendFailure_free(this_ptr: PaymentSendFailure) { }
-#[allow(unused)]
-/// Used only if an object of this type is returned as a trait impl by a method
-extern "C" fn PaymentSendFailure_free_void(this_ptr: *mut c_void) {
-       unsafe { let _ = Box::from_raw(this_ptr as *mut nativePaymentSendFailure); }
-}
-#[allow(unused)]
-/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
-impl PaymentSendFailure {
-       pub(crate) fn take_inner(mut self) -> *mut nativePaymentSendFailure {
-               assert!(self.is_owned);
-               let ret = self.inner;
-               self.inner = std::ptr::null_mut();
-               ret
+       #[allow(unused)]
+       pub(crate) fn into_native(self) -> nativePaymentSendFailure {
+               match self {
+                       PaymentSendFailure::ParameterError (mut a, ) => {
+                               nativePaymentSendFailure::ParameterError (
+                                       a.into_native(),
+                               )
+                       },
+                       PaymentSendFailure::PathParameterError (mut a, ) => {
+                               let mut local_a = Vec::new(); for mut item in a.into_rust().drain(..) { local_a.push( { let mut local_a_0 = match item.result_ok { true => Ok( { () /*(*unsafe { Box::from_raw(<*mut _>::take_ptr(&mut item.contents.result)) })*/ }), false => Err( { (*unsafe { Box::from_raw(<*mut _>::take_ptr(&mut item.contents.err)) }).into_native() })}; local_a_0 }); };
+                               nativePaymentSendFailure::PathParameterError (
+                                       local_a,
+                               )
+                       },
+                       PaymentSendFailure::AllFailedRetrySafe (mut a, ) => {
+                               let mut local_a = Vec::new(); for mut item in a.into_rust().drain(..) { local_a.push( { item.into_native() }); };
+                               nativePaymentSendFailure::AllFailedRetrySafe (
+                                       local_a,
+                               )
+                       },
+                       PaymentSendFailure::PartialFailure (mut a, ) => {
+                               let mut local_a = Vec::new(); for mut item in a.into_rust().drain(..) { local_a.push( { let mut local_a_0 = match item.result_ok { true => Ok( { () /*(*unsafe { Box::from_raw(<*mut _>::take_ptr(&mut item.contents.result)) })*/ }), false => Err( { (*unsafe { Box::from_raw(<*mut _>::take_ptr(&mut item.contents.err)) }).into_native() })}; local_a_0 }); };
+                               nativePaymentSendFailure::PartialFailure (
+                                       local_a,
+                               )
+                       },
+               }
        }
-}
-impl Clone for PaymentSendFailure {
-       fn clone(&self) -> Self {
-               Self {
-                       inner: if self.inner.is_null() { std::ptr::null_mut() } else {
-                               Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
-                       is_owned: true,
+       #[allow(unused)]
+       pub(crate) fn from_native(native: &nativePaymentSendFailure) -> Self {
+               match native {
+                       nativePaymentSendFailure::ParameterError (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               PaymentSendFailure::ParameterError (
+                                       crate::util::errors::APIError::native_into(a_nonref),
+                               )
+                       },
+                       nativePaymentSendFailure::PathParameterError (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               let mut local_a_nonref = Vec::new(); for mut item in a_nonref.drain(..) { local_a_nonref.push( { let mut local_a_nonref_0 = match item { Ok(mut o) => crate::c_types::CResultTempl::ok( { 0u8 /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::util::errors::APIError::native_into(e) }).into() }; local_a_nonref_0 }); };
+                               PaymentSendFailure::PathParameterError (
+                                       local_a_nonref.into(),
+                               )
+                       },
+                       nativePaymentSendFailure::AllFailedRetrySafe (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               let mut local_a_nonref = Vec::new(); for mut item in a_nonref.drain(..) { local_a_nonref.push( { crate::util::errors::APIError::native_into(item) }); };
+                               PaymentSendFailure::AllFailedRetrySafe (
+                                       local_a_nonref.into(),
+                               )
+                       },
+                       nativePaymentSendFailure::PartialFailure (ref a, ) => {
+                               let mut a_nonref = (*a).clone();
+                               let mut local_a_nonref = Vec::new(); for mut item in a_nonref.drain(..) { local_a_nonref.push( { let mut local_a_nonref_0 = match item { Ok(mut o) => crate::c_types::CResultTempl::ok( { 0u8 /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::util::errors::APIError::native_into(e) }).into() }; local_a_nonref_0 }); };
+                               PaymentSendFailure::PartialFailure (
+                                       local_a_nonref.into(),
+                               )
+                       },
+               }
+       }
+       #[allow(unused)]
+       pub(crate) fn native_into(native: nativePaymentSendFailure) -> Self {
+               match native {
+                       nativePaymentSendFailure::ParameterError (mut a, ) => {
+                               PaymentSendFailure::ParameterError (
+                                       crate::util::errors::APIError::native_into(a),
+                               )
+                       },
+                       nativePaymentSendFailure::PathParameterError (mut a, ) => {
+                               let mut local_a = Vec::new(); for mut item in a.drain(..) { local_a.push( { let mut local_a_0 = match item { Ok(mut o) => crate::c_types::CResultTempl::ok( { 0u8 /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::util::errors::APIError::native_into(e) }).into() }; local_a_0 }); };
+                               PaymentSendFailure::PathParameterError (
+                                       local_a.into(),
+                               )
+                       },
+                       nativePaymentSendFailure::AllFailedRetrySafe (mut a, ) => {
+                               let mut local_a = Vec::new(); for mut item in a.drain(..) { local_a.push( { crate::util::errors::APIError::native_into(item) }); };
+                               PaymentSendFailure::AllFailedRetrySafe (
+                                       local_a.into(),
+                               )
+                       },
+                       nativePaymentSendFailure::PartialFailure (mut a, ) => {
+                               let mut local_a = Vec::new(); for mut item in a.drain(..) { local_a.push( { let mut local_a_0 = match item { Ok(mut o) => crate::c_types::CResultTempl::ok( { 0u8 /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::util::errors::APIError::native_into(e) }).into() }; local_a_0 }); };
+                               PaymentSendFailure::PartialFailure (
+                                       local_a.into(),
+                               )
+                       },
                }
        }
 }
-#[allow(unused)]
-/// Used only if an object of this type is returned as a trait impl by a method
-pub(crate) extern "C" fn PaymentSendFailure_clone_void(this_ptr: *const c_void) -> *mut c_void {
-       Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativePaymentSendFailure)).clone() })) as *mut c_void
-}
+#[no_mangle]
+pub extern "C" fn PaymentSendFailure_free(this_ptr: PaymentSendFailure) { }
 #[no_mangle]
 pub extern "C" fn PaymentSendFailure_clone(orig: &PaymentSendFailure) -> PaymentSendFailure {
        orig.clone()
@@ -362,7 +470,7 @@ pub extern "C" fn ChannelManager_create_channel(this_arg: &ChannelManager, mut t
 #[no_mangle]
 pub extern "C" fn ChannelManager_list_channels(this_arg: &ChannelManager) -> crate::c_types::derived::CVec_ChannelDetailsZ {
        let mut ret = unsafe { &*this_arg.inner }.list_channels();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::ln::channelmanager::ChannelDetails { inner: Box::into_raw(Box::new(item)), is_owned: true } }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::ln::channelmanager::ChannelDetails { inner: Box::into_raw(Box::new(item)), is_owned: true } }); };
        local_ret.into()
 }
 
@@ -375,7 +483,7 @@ pub extern "C" fn ChannelManager_list_channels(this_arg: &ChannelManager) -> cra
 #[no_mangle]
 pub extern "C" fn ChannelManager_list_usable_channels(this_arg: &ChannelManager) -> crate::c_types::derived::CVec_ChannelDetailsZ {
        let mut ret = unsafe { &*this_arg.inner }.list_usable_channels();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::ln::channelmanager::ChannelDetails { inner: Box::into_raw(Box::new(item)), is_owned: true } }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::ln::channelmanager::ChannelDetails { inner: Box::into_raw(Box::new(item)), is_owned: true } }); };
        local_ret.into()
 }
 
@@ -453,7 +561,7 @@ pub extern "C" fn ChannelManager_force_close_all_channels(this_arg: &ChannelMana
 pub extern "C" fn ChannelManager_send_payment(this_arg: &ChannelManager, route: &crate::routing::router::Route, mut payment_hash: crate::c_types::ThirtyTwoBytes, mut payment_secret: crate::c_types::ThirtyTwoBytes) -> crate::c_types::derived::CResult_NonePaymentSendFailureZ {
        let mut local_payment_secret = if payment_secret.data == [0; 32] { None } else { Some( { ::lightning::ln::channelmanager::PaymentSecret(payment_secret.data) }) };
        let mut ret = unsafe { &*this_arg.inner }.send_payment(unsafe { &*route.inner }, ::lightning::ln::channelmanager::PaymentHash(payment_hash.data), &local_payment_secret);
-       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { 0u8 /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::channelmanager::PaymentSendFailure { inner: Box::into_raw(Box::new(e)), is_owned: true } }).into() };
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { 0u8 /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::channelmanager::PaymentSendFailure::native_into(e) }).into() };
        local_ret
 }
 
@@ -600,7 +708,7 @@ use lightning::util::events::MessageSendEventsProvider as MessageSendEventsProvi
 #[must_use]
 extern "C" fn ChannelManager_MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: *const c_void) -> crate::c_types::derived::CVec_MessageSendEventZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeChannelManager) }.get_and_clear_pending_msg_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::util::events::MessageSendEvent::native_into(item) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::util::events::MessageSendEvent::native_into(item) }); };
        local_ret.into()
 }
 
@@ -626,7 +734,7 @@ use lightning::util::events::EventsProvider as EventsProviderTraitImport;
 #[must_use]
 extern "C" fn ChannelManager_EventsProvider_get_and_clear_pending_events(this_arg: *const c_void) -> crate::c_types::derived::CVec_EventZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeChannelManager) }.get_and_clear_pending_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::util::events::Event::native_into(item) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::util::events::Event::native_into(item) }); };
        local_ret.into()
 }
 
@@ -749,7 +857,7 @@ use lightning::util::events::MessageSendEventsProvider as nativeMessageSendEvent
 #[must_use]
 extern "C" fn ChannelManager_ChannelMessageHandler_get_and_clear_pending_msg_events(this_arg: *const c_void) -> crate::c_types::derived::CVec_MessageSendEventZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeChannelManager) }.get_and_clear_pending_msg_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::util::events::MessageSendEvent::native_into(item) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::util::events::MessageSendEvent::native_into(item) }); };
        local_ret.into()
 }
 
index e9894dd9b72990107162efb5f6c04d02b1c23bdd..d1b1538f68593e5ae2fc6c7a14c1e54bf4e29092 100644 (file)
@@ -320,7 +320,7 @@ pub extern "C" fn PeerManager_new(mut message_handler: crate::ln::peer_handler::
 #[no_mangle]
 pub extern "C" fn PeerManager_get_peer_node_ids(this_arg: &PeerManager) -> crate::c_types::derived::CVec_PublicKeyZ {
        let mut ret = unsafe { &*this_arg.inner }.get_peer_node_ids();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::c_types::PublicKey::from_rust(&item) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::c_types::PublicKey::from_rust(&item) }); };
        local_ret.into()
 }
 
@@ -336,7 +336,7 @@ pub extern "C" fn PeerManager_get_peer_node_ids(this_arg: &PeerManager) -> crate
 #[no_mangle]
 pub extern "C" fn PeerManager_new_outbound_connection(this_arg: &PeerManager, mut their_node_id: crate::c_types::PublicKey, mut descriptor: crate::ln::peer_handler::SocketDescriptor) -> crate::c_types::derived::CResult_CVec_u8ZPeerHandleErrorZ {
        let mut ret = unsafe { &*this_arg.inner }.new_outbound_connection(their_node_id.into_rust(), descriptor);
-       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let mut local_ret_0 = Vec::new(); for item in o.drain(..) { local_ret_0.push( { item }); }; local_ret_0.into() }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::peer_handler::PeerHandleError { inner: Box::into_raw(Box::new(e)), is_owned: true } }).into() };
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { let mut local_ret_0 = Vec::new(); for mut item in o.drain(..) { local_ret_0.push( { item }); }; local_ret_0.into() }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::peer_handler::PeerHandleError { inner: Box::into_raw(Box::new(e)), is_owned: true } }).into() };
        local_ret
 }
 
index ecd7e187d336b95236554e5b66ed2d6e24e03a87..ad4c0c3b331d52150f4eb1e9dd9edecd05f080af 100644 (file)
@@ -224,14 +224,14 @@ extern "C" fn NetGraphMsgHandler_RoutingMessageHandler_handle_channel_update(thi
 #[must_use]
 extern "C" fn NetGraphMsgHandler_RoutingMessageHandler_get_next_channel_announcements(this_arg: *const c_void, mut starting_point: u64, mut batch_amount: u8) -> crate::c_types::derived::CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeNetGraphMsgHandler) }.get_next_channel_announcements(starting_point, batch_amount);
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { let (mut orig_ret_0_0, mut orig_ret_0_1, mut orig_ret_0_2) = item; let mut local_orig_ret_0_1 = crate::ln::msgs::ChannelUpdate { inner: if orig_ret_0_1.is_none() { std::ptr::null_mut() } else {  { Box::into_raw(Box::new((orig_ret_0_1.unwrap()))) } }, is_owned: true }; let mut local_orig_ret_0_2 = crate::ln::msgs::ChannelUpdate { inner: if orig_ret_0_2.is_none() { std::ptr::null_mut() } else {  { Box::into_raw(Box::new((orig_ret_0_2.unwrap()))) } }, is_owned: true }; let mut local_ret_0 = (crate::ln::msgs::ChannelAnnouncement { inner: Box::into_raw(Box::new(orig_ret_0_0)), is_owned: true }, local_orig_ret_0_1, local_orig_ret_0_2).into(); local_ret_0 }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { let (mut orig_ret_0_0, mut orig_ret_0_1, mut orig_ret_0_2) = item; let mut local_orig_ret_0_1 = crate::ln::msgs::ChannelUpdate { inner: if orig_ret_0_1.is_none() { std::ptr::null_mut() } else {  { Box::into_raw(Box::new((orig_ret_0_1.unwrap()))) } }, is_owned: true }; let mut local_orig_ret_0_2 = crate::ln::msgs::ChannelUpdate { inner: if orig_ret_0_2.is_none() { std::ptr::null_mut() } else {  { Box::into_raw(Box::new((orig_ret_0_2.unwrap()))) } }, is_owned: true }; let mut local_ret_0 = (crate::ln::msgs::ChannelAnnouncement { inner: Box::into_raw(Box::new(orig_ret_0_0)), is_owned: true }, local_orig_ret_0_1, local_orig_ret_0_2).into(); local_ret_0 }); };
        local_ret.into()
 }
 #[must_use]
 extern "C" fn NetGraphMsgHandler_RoutingMessageHandler_get_next_node_announcements(this_arg: *const c_void, mut starting_point: crate::c_types::PublicKey, mut batch_amount: u8) -> crate::c_types::derived::CVec_NodeAnnouncementZ {
        let mut local_starting_point_base = if starting_point.is_null() { None } else { Some( { starting_point.into_rust() }) }; let mut local_starting_point = local_starting_point_base.as_ref();
        let mut ret = unsafe { &mut *(this_arg as *mut nativeNetGraphMsgHandler) }.get_next_node_announcements(local_starting_point, batch_amount);
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::ln::msgs::NodeAnnouncement { inner: Box::into_raw(Box::new(item)), is_owned: true } }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::ln::msgs::NodeAnnouncement { inner: Box::into_raw(Box::new(item)), is_owned: true } }); };
        local_ret.into()
 }
 extern "C" fn NetGraphMsgHandler_RoutingMessageHandler_sync_routing_table(this_arg: *const c_void, mut their_node_id: crate::c_types::PublicKey, init_msg: &crate::ln::msgs::Init) {
@@ -265,7 +265,7 @@ use lightning::util::events::MessageSendEventsProvider as nativeMessageSendEvent
 #[must_use]
 extern "C" fn NetGraphMsgHandler_RoutingMessageHandler_get_and_clear_pending_msg_events(this_arg: *const c_void) -> crate::c_types::derived::CVec_MessageSendEventZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeNetGraphMsgHandler) }.get_and_clear_pending_msg_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::util::events::MessageSendEvent::native_into(item) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::util::events::MessageSendEvent::native_into(item) }); };
        local_ret.into()
 }
 
@@ -291,7 +291,7 @@ use lightning::util::events::MessageSendEventsProvider as MessageSendEventsProvi
 #[must_use]
 extern "C" fn NetGraphMsgHandler_MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: *const c_void) -> crate::c_types::derived::CVec_MessageSendEventZ {
        let mut ret = unsafe { &mut *(this_arg as *mut nativeNetGraphMsgHandler) }.get_and_clear_pending_msg_events();
-       let mut local_ret = Vec::new(); for item in ret.drain(..) { local_ret.push( { crate::util::events::MessageSendEvent::native_into(item) }); };
+       let mut local_ret = Vec::new(); for mut item in ret.drain(..) { local_ret.push( { crate::util::events::MessageSendEvent::native_into(item) }); };
        local_ret.into()
 }
 
index 42aaecbc308e901679b89e65134e9004d5edffba..52893679e4d5d3a14d19f45751f9bf6ed5e5c41b 100644 (file)
@@ -249,7 +249,7 @@ impl Event {
                        },
                        nativeEvent::SpendableOutputs {ref outputs, } => {
                                let mut outputs_nonref = (*outputs).clone();
-                               let mut local_outputs_nonref = Vec::new(); for item in outputs_nonref.drain(..) { local_outputs_nonref.push( { crate::chain::keysinterface::SpendableOutputDescriptor::native_into(item) }); };
+                               let mut local_outputs_nonref = Vec::new(); for mut item in outputs_nonref.drain(..) { local_outputs_nonref.push( { crate::chain::keysinterface::SpendableOutputDescriptor::native_into(item) }); };
                                Event::SpendableOutputs {
                                        outputs: local_outputs_nonref.into(),
                                }
@@ -298,7 +298,7 @@ impl Event {
                                }
                        },
                        nativeEvent::SpendableOutputs {mut outputs, } => {
-                               let mut local_outputs = Vec::new(); for item in outputs.drain(..) { local_outputs.push( { crate::chain::keysinterface::SpendableOutputDescriptor::native_into(item) }); };
+                               let mut local_outputs = Vec::new(); for mut item in outputs.drain(..) { local_outputs.push( { crate::chain::keysinterface::SpendableOutputDescriptor::native_into(item) }); };
                                Event::SpendableOutputs {
                                        outputs: local_outputs.into(),
                                }
index b3e33b57ca8e0ff3282c85f075f12c6bbc81f080..37d4c744ccd9fce7115f5ab1e2e7735c5da80ca5 100644 (file)
@@ -884,7 +884,7 @@ impl KeysManager {
        ///
        /// May panic if the `SpendableOutputDescriptor`s were not generated by Channels which used
        /// this KeysManager or one of the `InMemoryChannelKeys` created by this KeysManager.
-       pub fn spend_spendable_outputs<C: Signing>(&self, descriptors: &[SpendableOutputDescriptor], outputs: Vec<TxOut>, change_destination_script: Script, feerate_sat_per_1000_weight: u32, secp_ctx: &Secp256k1<C>) -> Result<Transaction, ()> {
+       pub fn spend_spendable_outputs<C: Signing>(&self, descriptors: &[&SpendableOutputDescriptor], outputs: Vec<TxOut>, change_destination_script: Script, feerate_sat_per_1000_weight: u32, secp_ctx: &Secp256k1<C>) -> Result<Transaction, ()> {
                let mut input = Vec::new();
                let mut input_value = 0;
                let mut witness_weight = 0;
index 6273604c63850e3fc63bf5bb33f31fcd9db7b45d..f491120835cba301de07e5aec78a57537a3d7e1f 100644 (file)
@@ -4694,16 +4694,15 @@ macro_rules! check_spendable_outputs {
                                match event {
                                        Event::SpendableOutputs { mut outputs } => {
                                                for outp in outputs.drain(..) {
-                                                       let mut outputs = vec![outp];
-                                                       txn.push($keysinterface.backing.spend_spendable_outputs(&outputs, Vec::new(), Builder::new().push_opcode(opcodes::all::OP_RETURN).into_script(), 253, &secp_ctx).unwrap());
-                                                       all_outputs.push(outputs.pop().unwrap());
+                                                       txn.push($keysinterface.backing.spend_spendable_outputs(&[&outp], Vec::new(), Builder::new().push_opcode(opcodes::all::OP_RETURN).into_script(), 253, &secp_ctx).unwrap());
+                                                       all_outputs.push(outp);
                                                }
                                        },
                                        _ => panic!("Unexpected event"),
                                };
                        }
                        if all_outputs.len() > 1 {
-                               if let Ok(tx) = $keysinterface.backing.spend_spendable_outputs(&all_outputs, Vec::new(), Builder::new().push_opcode(opcodes::all::OP_RETURN).into_script(), 253, &secp_ctx) {
+                               if let Ok(tx) = $keysinterface.backing.spend_spendable_outputs(&all_outputs.iter().map(|a| a).collect::<Vec<_>>(), Vec::new(), Builder::new().push_opcode(opcodes::all::OP_RETURN).into_script(), 253, &secp_ctx) {
                                        txn.push(tx);
                                }
                        }
index 712158a97bc604a39ba173e714e8bbeafbfcd399..2c3e7df717bb09d744abbdf9da86893ed4159a28 100644 (file)
@@ -61,7 +61,8 @@ pub enum DecodeError {
        /// A length descriptor in the packet didn't describe the later data correctly
        BadLengthDescriptor,
        /// Error from std::io
-       Io(::std::io::ErrorKind),
+       Io(/// (C-not exported) as ErrorKind doesn't have a reasonable mapping
+        ::std::io::ErrorKind),
 }
 
 /// An init message to be sent or received from a peer