]> git.bitcoin.ninja Git - ldk-java/blobdiff - src/main/java/org/ldk/impl/bindings.java
Expose SecretKey as byte[32], expose trait call fns in human structs
[ldk-java] / src / main / java / org / ldk / impl / bindings.java
index 5ec7bc43eaa73d491e2055ff362c79ea9893b5d1..a02f42266b17d92890a054e0496d089233f9ffbb 100644 (file)
@@ -26,8 +26,6 @@ public class bindings {
        public static native long vec_slice_len(long vec);
        public static native long new_empty_slice_vec();
 
-       public static native long LDKSecretKey_new();
-
        static { LDKAccessError.values(); /* Force enum statics to run */ }
        static { LDKChannelMonitorUpdateErr.values(); /* Force enum statics to run */ }
        static { LDKConfirmationTarget.values(); /* Force enum statics to run */ }
@@ -97,12 +95,12 @@ public class bindings {
                }
                public final static class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
                        public long outpoint;
-                       public long per_commitment_point;
+                       public byte[] per_commitment_point;
                        public short to_self_delay;
                        public long output;
                        public long key_derivation_params;
-                       public long revocation_pubkey;
-                       DynamicOutputP2WSH(long outpoint, long per_commitment_point, short to_self_delay, long output, long key_derivation_params, long revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
+                       public byte[] revocation_pubkey;
+                       DynamicOutputP2WSH(long outpoint, byte[] per_commitment_point, short to_self_delay, long output, long key_derivation_params, byte[] revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
                }
                public final static class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
                        public long outpoint;
@@ -185,9 +183,9 @@ public class bindings {
                        ChannelClosed(long short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
                }
                public final static class NodeFailure extends LDKHTLCFailChannelUpdate {
-                       public long node_id;
+                       public byte[] node_id;
                        public boolean is_permanent;
-                       NodeFailure(long node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
+                       NodeFailure(byte[] node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
                }
                static native void init();
        }
@@ -196,59 +194,59 @@ public class bindings {
        public static class LDKMessageSendEvent {
                private LDKMessageSendEvent() {}
                public final static class SendAcceptChannel extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendAcceptChannel(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendAcceptChannel(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class SendOpenChannel extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendOpenChannel(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendOpenChannel(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class SendFundingCreated extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendFundingCreated(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendFundingCreated(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class SendFundingSigned extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendFundingSigned(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendFundingSigned(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class SendFundingLocked extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendFundingLocked(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendFundingLocked(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class SendAnnouncementSignatures extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendAnnouncementSignatures(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendAnnouncementSignatures(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class UpdateHTLCs extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long updates;
-                       UpdateHTLCs(long node_id, long updates) { this.node_id = node_id; this.updates = updates; }
+                       UpdateHTLCs(byte[] node_id, long updates) { this.node_id = node_id; this.updates = updates; }
                }
                public final static class SendRevokeAndACK extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendRevokeAndACK(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendRevokeAndACK(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class SendClosingSigned extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendClosingSigned(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendClosingSigned(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class SendShutdown extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendShutdown(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendShutdown(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class SendChannelReestablish extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long msg;
-                       SendChannelReestablish(long node_id, long msg) { this.node_id = node_id; this.msg = msg; }
+                       SendChannelReestablish(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
                }
                public final static class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
                        public long msg;
@@ -264,9 +262,9 @@ public class bindings {
                        BroadcastChannelUpdate(long msg) { this.msg = msg; }
                }
                public final static class HandleError extends LDKMessageSendEvent {
-                       public long node_id;
+                       public byte[] node_id;
                        public long action;
-                       HandleError(long node_id, long action) { this.node_id = node_id; this.action = action; }
+                       HandleError(byte[] node_id, long action) { this.node_id = node_id; this.action = action; }
                }
                public final static class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
                        public long update;
@@ -283,8 +281,8 @@ public class bindings {
        }
        public static native long LDKMessageSendEventsProvider_new(LDKMessageSendEventsProvider impl);
        public static native LDKMessageSendEventsProvider LDKMessageSendEventsProvider_get_obj_from_jcalls(long val);
-       // LDKCVec_MessageSendEventZ LDKMessageSendEventsProvider_call_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* arg
-       public static native long LDKMessageSendEventsProvider_call_get_and_clear_pending_msg_events(long arg);
+       // LDKCVec_MessageSendEventZ MessageSendEventsProvider_call_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* this_arg
+       public static native long MessageSendEventsProvider_call_get_and_clear_pending_msg_events(long this_arg);
        public static native VecOrSliceDef LDKCVecTempl_Event_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_Event_new(long[] elems);
        public interface LDKEventsProvider {
@@ -292,8 +290,8 @@ public class bindings {
        }
        public static native long LDKEventsProvider_new(LDKEventsProvider impl);
        public static native LDKEventsProvider LDKEventsProvider_get_obj_from_jcalls(long val);
-       // LDKCVec_EventZ LDKEventsProvider_call_get_and_clear_pending_events LDKEventsProvider* arg
-       public static native long LDKEventsProvider_call_get_and_clear_pending_events(long arg);
+       // LDKCVec_EventZ EventsProvider_call_get_and_clear_pending_events LDKEventsProvider* this_arg
+       public static native long EventsProvider_call_get_and_clear_pending_events(long this_arg);
        public interface LDKLogger {
                 void log(String record);
        }
@@ -306,47 +304,47 @@ public class bindings {
        }
        public static native long LDKAccess_new(LDKAccess impl);
        public static native LDKAccess LDKAccess_get_obj_from_jcalls(long val);
-       // LDKCResult_TxOutAccessErrorZ LDKAccess_call_get_utxo LDKAccess* arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
-       public static native long LDKAccess_call_get_utxo(long arg, byte[] genesis_hash, long short_channel_id);
+       // LDKCResult_TxOutAccessErrorZ Access_call_get_utxo LDKAccess* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
+       public static native long Access_call_get_utxo(long this_arg, byte[] genesis_hash, long short_channel_id);
        public static native long[] LDKCVecTempl_HTLCOutputInCommitment_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_HTLCOutputInCommitment_new(long[] elems);
        public interface LDKChannelKeys {
-                long get_per_commitment_point(long idx);
+                byte[] get_per_commitment_point(long idx);
                 byte[] release_commitment_secret(long idx);
                 long key_derivation_params();
                 long sign_counterparty_commitment(int feerate_per_kw, long commitment_tx, long keys, long htlcs);
                 long sign_holder_commitment(long holder_commitment_tx);
                 long sign_holder_commitment_htlc_transactions(long holder_commitment_tx);
                 long sign_justice_transaction(long justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
-                long sign_counterparty_htlc_transaction(long htlc_tx, long input, long amount, long per_commitment_point, long htlc);
+                long sign_counterparty_htlc_transaction(long htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
                 long sign_closing_transaction(long closing_tx);
                 long sign_channel_announcement(long msg);
                 void on_accept(long channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
        }
        public static native long LDKChannelKeys_new(LDKChannelKeys impl);
        public static native LDKChannelKeys LDKChannelKeys_get_obj_from_jcalls(long val);
-       // LDKPublicKey LDKChannelKeys_call_get_per_commitment_point LDKChannelKeys* arg, uint64_t idx
-       public static native long LDKChannelKeys_call_get_per_commitment_point(long arg, long idx);
-       // LDKThirtyTwoBytes LDKChannelKeys_call_release_commitment_secret LDKChannelKeys* arg, uint64_t idx
-       public static native byte[] LDKChannelKeys_call_release_commitment_secret(long arg, long idx);
-       // LDKC2Tuple_u64u64Z LDKChannelKeys_call_key_derivation_params LDKChannelKeys* arg
-       public static native long LDKChannelKeys_call_key_derivation_params(long arg);
-       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ LDKChannelKeys_call_sign_counterparty_commitment LDKChannelKeys* arg, uint32_t feerate_per_kw, LDKTransaction commitment_tx, const LDKPreCalculatedTxCreationKeys *keys, LDKCVec_HTLCOutputInCommitmentZ htlcs
-       public static native long LDKChannelKeys_call_sign_counterparty_commitment(long arg, int feerate_per_kw, long commitment_tx, long keys, long htlcs);
-       // LDKCResult_SignatureNoneZ LDKChannelKeys_call_sign_holder_commitment LDKChannelKeys* arg, const LDKHolderCommitmentTransaction *holder_commitment_tx
-       public static native long LDKChannelKeys_call_sign_holder_commitment(long arg, long holder_commitment_tx);
-       // LDKCResult_CVec_SignatureZNoneZ LDKChannelKeys_call_sign_holder_commitment_htlc_transactions LDKChannelKeys* arg, const LDKHolderCommitmentTransaction *holder_commitment_tx
-       public static native long LDKChannelKeys_call_sign_holder_commitment_htlc_transactions(long arg, long holder_commitment_tx);
-       // LDKCResult_SignatureNoneZ LDKChannelKeys_call_sign_justice_transaction LDKChannelKeys* arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const LDKHTLCOutputInCommitment *htlc
-       public static native long LDKChannelKeys_call_sign_justice_transaction(long arg, long justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
-       // LDKCResult_SignatureNoneZ LDKChannelKeys_call_sign_counterparty_htlc_transaction LDKChannelKeys* arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment *htlc
-       public static native long LDKChannelKeys_call_sign_counterparty_htlc_transaction(long arg, long htlc_tx, long input, long amount, long per_commitment_point, long htlc);
-       // LDKCResult_SignatureNoneZ LDKChannelKeys_call_sign_closing_transaction LDKChannelKeys* arg, LDKTransaction closing_tx
-       public static native long LDKChannelKeys_call_sign_closing_transaction(long arg, long closing_tx);
-       // LDKCResult_SignatureNoneZ LDKChannelKeys_call_sign_channel_announcement LDKChannelKeys* arg, const LDKUnsignedChannelAnnouncement *msg
-       public static native long LDKChannelKeys_call_sign_channel_announcement(long arg, long msg);
-       // void LDKChannelKeys_call_on_accept LDKChannelKeys* arg, const LDKChannelPublicKeys *channel_points, uint16_t counterparty_selected_contest_delay, uint16_t holder_selected_contest_delay
-       public static native void LDKChannelKeys_call_on_accept(long arg, long channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
+       // LDKPublicKey ChannelKeys_call_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx
+       public static native byte[] ChannelKeys_call_get_per_commitment_point(long this_arg, long idx);
+       // LDKThirtyTwoBytes ChannelKeys_call_release_commitment_secret LDKChannelKeys* this_arg, uint64_t idx
+       public static native byte[] ChannelKeys_call_release_commitment_secret(long this_arg, long idx);
+       // LDKC2Tuple_u64u64Z ChannelKeys_call_key_derivation_params LDKChannelKeys* this_arg
+       public static native long ChannelKeys_call_key_derivation_params(long this_arg);
+       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_call_sign_counterparty_commitment LDKChannelKeys* this_arg, uint32_t feerate_per_kw, LDKTransaction commitment_tx, const LDKPreCalculatedTxCreationKeys *keys, LDKCVec_HTLCOutputInCommitmentZ htlcs
+       public static native long ChannelKeys_call_sign_counterparty_commitment(long this_arg, int feerate_per_kw, long commitment_tx, long keys, long htlcs);
+       // LDKCResult_SignatureNoneZ ChannelKeys_call_sign_holder_commitment LDKChannelKeys* this_arg, const LDKHolderCommitmentTransaction *holder_commitment_tx
+       public static native long ChannelKeys_call_sign_holder_commitment(long this_arg, long holder_commitment_tx);
+       // LDKCResult_CVec_SignatureZNoneZ ChannelKeys_call_sign_holder_commitment_htlc_transactions LDKChannelKeys* this_arg, const LDKHolderCommitmentTransaction *holder_commitment_tx
+       public static native long ChannelKeys_call_sign_holder_commitment_htlc_transactions(long this_arg, long holder_commitment_tx);
+       // LDKCResult_SignatureNoneZ ChannelKeys_call_sign_justice_transaction LDKChannelKeys* this_arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const LDKHTLCOutputInCommitment *htlc
+       public static native long ChannelKeys_call_sign_justice_transaction(long this_arg, long justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
+       // LDKCResult_SignatureNoneZ ChannelKeys_call_sign_counterparty_htlc_transaction LDKChannelKeys* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment *htlc
+       public static native long ChannelKeys_call_sign_counterparty_htlc_transaction(long this_arg, long htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
+       // LDKCResult_SignatureNoneZ ChannelKeys_call_sign_closing_transaction LDKChannelKeys* this_arg, LDKTransaction closing_tx
+       public static native long ChannelKeys_call_sign_closing_transaction(long this_arg, long closing_tx);
+       // LDKCResult_SignatureNoneZ ChannelKeys_call_sign_channel_announcement LDKChannelKeys* this_arg, const LDKUnsignedChannelAnnouncement *msg
+       public static native long ChannelKeys_call_sign_channel_announcement(long this_arg, long msg);
+       // void ChannelKeys_call_on_accept LDKChannelKeys* this_arg, const LDKChannelPublicKeys *channel_points, uint16_t counterparty_selected_contest_delay, uint16_t holder_selected_contest_delay
+       public static native void ChannelKeys_call_on_accept(long this_arg, long channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
        public static native long[] LDKCVecTempl_MonitorEvent_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_MonitorEvent_new(long[] elems);
        public interface LDKWatch {
@@ -356,36 +354,36 @@ public class bindings {
        }
        public static native long LDKWatch_new(LDKWatch impl);
        public static native LDKWatch LDKWatch_get_obj_from_jcalls(long val);
-       // LDKCResult_NoneChannelMonitorUpdateErrZ LDKWatch_call_watch_channel LDKWatch* arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor
-       public static native long LDKWatch_call_watch_channel(long arg, long funding_txo, long monitor);
-       // LDKCResult_NoneChannelMonitorUpdateErrZ LDKWatch_call_update_channel LDKWatch* arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update
-       public static native long LDKWatch_call_update_channel(long arg, long funding_txo, long update);
-       // LDKCVec_MonitorEventZ LDKWatch_call_release_pending_monitor_events LDKWatch* arg
-       public static native long LDKWatch_call_release_pending_monitor_events(long arg);
+       // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_call_watch_channel LDKWatch* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor
+       public static native long Watch_call_watch_channel(long this_arg, long funding_txo, long monitor);
+       // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_call_update_channel LDKWatch* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update
+       public static native long Watch_call_update_channel(long this_arg, long funding_txo, long update);
+       // LDKCVec_MonitorEventZ Watch_call_release_pending_monitor_events LDKWatch* this_arg
+       public static native long Watch_call_release_pending_monitor_events(long this_arg);
        public interface LDKFilter {
                 void register_tx(byte[] txid, long script_pubkey);
                 void register_output(long outpoint, long script_pubkey);
        }
        public static native long LDKFilter_new(LDKFilter impl);
        public static native LDKFilter LDKFilter_get_obj_from_jcalls(long val);
-       // void LDKFilter_call_register_tx LDKFilter* arg, const uint8_t (*txid)[32], LDKu8slice script_pubkey
-       public static native void LDKFilter_call_register_tx(long arg, byte[] txid, long script_pubkey);
-       // void LDKFilter_call_register_output LDKFilter* arg, const LDKOutPoint *outpoint, LDKu8slice script_pubkey
-       public static native void LDKFilter_call_register_output(long arg, long outpoint, long script_pubkey);
+       // void Filter_call_register_tx LDKFilter* this_arg, const uint8_t (*txid)[32], LDKu8slice script_pubkey
+       public static native void Filter_call_register_tx(long this_arg, byte[] txid, long script_pubkey);
+       // void Filter_call_register_output LDKFilter* this_arg, const LDKOutPoint *outpoint, LDKu8slice script_pubkey
+       public static native void Filter_call_register_output(long this_arg, long outpoint, long script_pubkey);
        public interface LDKBroadcasterInterface {
                 void broadcast_transaction(long tx);
        }
        public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
        public static native LDKBroadcasterInterface LDKBroadcasterInterface_get_obj_from_jcalls(long val);
-       // void LDKBroadcasterInterface_call_broadcast_transaction LDKBroadcasterInterface* arg, LDKTransaction tx
-       public static native void LDKBroadcasterInterface_call_broadcast_transaction(long arg, long tx);
+       // void BroadcasterInterface_call_broadcast_transaction LDKBroadcasterInterface* this_arg, LDKTransaction tx
+       public static native void BroadcasterInterface_call_broadcast_transaction(long this_arg, long tx);
        public interface LDKFeeEstimator {
                 int get_est_sat_per_1000_weight(LDKConfirmationTarget confirmation_target);
        }
        public static native long LDKFeeEstimator_new(LDKFeeEstimator impl);
        public static native LDKFeeEstimator LDKFeeEstimator_get_obj_from_jcalls(long val);
-       // uint32_t LDKFeeEstimator_call_get_est_sat_per_1000_weight LDKFeeEstimator* arg, LDKConfirmationTarget confirmation_target
-       public static native int LDKFeeEstimator_call_get_est_sat_per_1000_weight(long arg, LDKConfirmationTarget confirmation_target);
+       // uint32_t FeeEstimator_call_get_est_sat_per_1000_weight LDKFeeEstimator* this_arg, LDKConfirmationTarget confirmation_target
+       public static native int FeeEstimator_call_get_est_sat_per_1000_weight(long this_arg, LDKConfirmationTarget confirmation_target);
        public static native VecOrSliceDef LDKCVecTempl_C2TupleTempl_usize__Transaction_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_C2TupleTempl_usize__Transaction_new(long[] elems);
        public static native VecOrSliceDef LDKCVecTempl_Transaction_arr_info(long vec_ptr);
@@ -393,24 +391,24 @@ public class bindings {
        public static native VecOrSliceDef LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut_new(long[] elems);
        public interface LDKKeysInterface {
-                long get_node_secret();
+                byte[] get_node_secret();
                 long get_destination_script();
-                long get_shutdown_pubkey();
+                byte[] get_shutdown_pubkey();
                 long get_channel_keys(boolean inbound, long channel_value_satoshis);
                 byte[] get_secure_random_bytes();
        }
        public static native long LDKKeysInterface_new(LDKKeysInterface impl);
        public static native LDKKeysInterface LDKKeysInterface_get_obj_from_jcalls(long val);
-       // LDKSecretKey LDKKeysInterface_call_get_node_secret LDKKeysInterface* arg
-       public static native long LDKKeysInterface_call_get_node_secret(long arg);
-       // LDKCVec_u8Z LDKKeysInterface_call_get_destination_script LDKKeysInterface* arg
-       public static native long LDKKeysInterface_call_get_destination_script(long arg);
-       // LDKPublicKey LDKKeysInterface_call_get_shutdown_pubkey LDKKeysInterface* arg
-       public static native long LDKKeysInterface_call_get_shutdown_pubkey(long arg);
-       // LDKChannelKeys LDKKeysInterface_call_get_channel_keys LDKKeysInterface* arg, bool inbound, uint64_t channel_value_satoshis
-       public static native long LDKKeysInterface_call_get_channel_keys(long arg, boolean inbound, long channel_value_satoshis);
-       // LDKThirtyTwoBytes LDKKeysInterface_call_get_secure_random_bytes LDKKeysInterface* arg
-       public static native byte[] LDKKeysInterface_call_get_secure_random_bytes(long arg);
+       // LDKSecretKey KeysInterface_call_get_node_secret LDKKeysInterface* this_arg
+       public static native byte[] KeysInterface_call_get_node_secret(long this_arg);
+       // LDKCVec_u8Z KeysInterface_call_get_destination_script LDKKeysInterface* this_arg
+       public static native long KeysInterface_call_get_destination_script(long this_arg);
+       // LDKPublicKey KeysInterface_call_get_shutdown_pubkey LDKKeysInterface* this_arg
+       public static native byte[] KeysInterface_call_get_shutdown_pubkey(long this_arg);
+       // LDKChannelKeys KeysInterface_call_get_channel_keys LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
+       public static native long KeysInterface_call_get_channel_keys(long this_arg, boolean inbound, long channel_value_satoshis);
+       // LDKThirtyTwoBytes KeysInterface_call_get_secure_random_bytes LDKKeysInterface* this_arg
+       public static native byte[] KeysInterface_call_get_secure_random_bytes(long this_arg);
        public static native long[] LDKCVecTempl_ChannelDetails_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_ChannelDetails_new(long[] elems);
        public static class LDKNetAddress {
@@ -444,66 +442,66 @@ public class bindings {
        public static native VecOrSliceDef LDKCVecTempl_NetAddress_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_NetAddress_new(long[] elems);
        public interface LDKChannelMessageHandler {
-                void handle_open_channel(long their_node_id, long their_features, long msg);
-                void handle_accept_channel(long their_node_id, long their_features, long msg);
-                void handle_funding_created(long their_node_id, long msg);
-                void handle_funding_signed(long their_node_id, long msg);
-                void handle_funding_locked(long their_node_id, long msg);
-                void handle_shutdown(long their_node_id, long msg);
-                void handle_closing_signed(long their_node_id, long msg);
-                void handle_update_add_htlc(long their_node_id, long msg);
-                void handle_update_fulfill_htlc(long their_node_id, long msg);
-                void handle_update_fail_htlc(long their_node_id, long msg);
-                void handle_update_fail_malformed_htlc(long their_node_id, long msg);
-                void handle_commitment_signed(long their_node_id, long msg);
-                void handle_revoke_and_ack(long their_node_id, long msg);
-                void handle_update_fee(long their_node_id, long msg);
-                void handle_announcement_signatures(long their_node_id, long msg);
-                void peer_disconnected(long their_node_id, boolean no_connection_possible);
-                void peer_connected(long their_node_id, long msg);
-                void handle_channel_reestablish(long their_node_id, long msg);
-                void handle_error(long their_node_id, long msg);
+                void handle_open_channel(byte[] their_node_id, long their_features, long msg);
+                void handle_accept_channel(byte[] their_node_id, long their_features, long msg);
+                void handle_funding_created(byte[] their_node_id, long msg);
+                void handle_funding_signed(byte[] their_node_id, long msg);
+                void handle_funding_locked(byte[] their_node_id, long msg);
+                void handle_shutdown(byte[] their_node_id, long msg);
+                void handle_closing_signed(byte[] their_node_id, long msg);
+                void handle_update_add_htlc(byte[] their_node_id, long msg);
+                void handle_update_fulfill_htlc(byte[] their_node_id, long msg);
+                void handle_update_fail_htlc(byte[] their_node_id, long msg);
+                void handle_update_fail_malformed_htlc(byte[] their_node_id, long msg);
+                void handle_commitment_signed(byte[] their_node_id, long msg);
+                void handle_revoke_and_ack(byte[] their_node_id, long msg);
+                void handle_update_fee(byte[] their_node_id, long msg);
+                void handle_announcement_signatures(byte[] their_node_id, long msg);
+                void peer_disconnected(byte[] their_node_id, boolean no_connection_possible);
+                void peer_connected(byte[] their_node_id, long msg);
+                void handle_channel_reestablish(byte[] their_node_id, long msg);
+                void handle_error(byte[] their_node_id, long msg);
        }
        public static native long LDKChannelMessageHandler_new(LDKChannelMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
        public static native LDKChannelMessageHandler LDKChannelMessageHandler_get_obj_from_jcalls(long val);
-       // void LDKChannelMessageHandler_call_handle_open_channel LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel *msg
-       public static native void LDKChannelMessageHandler_call_handle_open_channel(long arg, long their_node_id, long their_features, long msg);
-       // void LDKChannelMessageHandler_call_handle_accept_channel LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel *msg
-       public static native void LDKChannelMessageHandler_call_handle_accept_channel(long arg, long their_node_id, long their_features, long msg);
-       // void LDKChannelMessageHandler_call_handle_funding_created LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKFundingCreated *msg
-       public static native void LDKChannelMessageHandler_call_handle_funding_created(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_funding_signed LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKFundingSigned *msg
-       public static native void LDKChannelMessageHandler_call_handle_funding_signed(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_funding_locked LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKFundingLocked *msg
-       public static native void LDKChannelMessageHandler_call_handle_funding_locked(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_shutdown LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKShutdown *msg
-       public static native void LDKChannelMessageHandler_call_handle_shutdown(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_closing_signed LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKClosingSigned *msg
-       public static native void LDKChannelMessageHandler_call_handle_closing_signed(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_update_add_htlc LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC *msg
-       public static native void LDKChannelMessageHandler_call_handle_update_add_htlc(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_update_fulfill_htlc LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC *msg
-       public static native void LDKChannelMessageHandler_call_handle_update_fulfill_htlc(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_update_fail_htlc LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC *msg
-       public static native void LDKChannelMessageHandler_call_handle_update_fail_htlc(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_update_fail_malformed_htlc LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC *msg
-       public static native void LDKChannelMessageHandler_call_handle_update_fail_malformed_htlc(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_commitment_signed LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKCommitmentSigned *msg
-       public static native void LDKChannelMessageHandler_call_handle_commitment_signed(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_revoke_and_ack LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKRevokeAndACK *msg
-       public static native void LDKChannelMessageHandler_call_handle_revoke_and_ack(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_update_fee LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKUpdateFee *msg
-       public static native void LDKChannelMessageHandler_call_handle_update_fee(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_announcement_signatures LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures *msg
-       public static native void LDKChannelMessageHandler_call_handle_announcement_signatures(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_peer_disconnected LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, bool no_connection_possible
-       public static native void LDKChannelMessageHandler_call_peer_disconnected(long arg, long their_node_id, boolean no_connection_possible);
-       // void LDKChannelMessageHandler_call_peer_connected LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKInit *msg
-       public static native void LDKChannelMessageHandler_call_peer_connected(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_channel_reestablish LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKChannelReestablish *msg
-       public static native void LDKChannelMessageHandler_call_handle_channel_reestablish(long arg, long their_node_id, long msg);
-       // void LDKChannelMessageHandler_call_handle_error LDKChannelMessageHandler* arg, LDKPublicKey their_node_id, const LDKErrorMessage *msg
-       public static native void LDKChannelMessageHandler_call_handle_error(long arg, long their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_open_channel LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel *msg
+       public static native void ChannelMessageHandler_call_handle_open_channel(long this_arg, byte[] their_node_id, long their_features, long msg);
+       // void ChannelMessageHandler_call_handle_accept_channel LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel *msg
+       public static native void ChannelMessageHandler_call_handle_accept_channel(long this_arg, byte[] their_node_id, long their_features, long msg);
+       // void ChannelMessageHandler_call_handle_funding_created LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated *msg
+       public static native void ChannelMessageHandler_call_handle_funding_created(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_funding_signed LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned *msg
+       public static native void ChannelMessageHandler_call_handle_funding_signed(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_funding_locked LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked *msg
+       public static native void ChannelMessageHandler_call_handle_funding_locked(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_shutdown LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKShutdown *msg
+       public static native void ChannelMessageHandler_call_handle_shutdown(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_closing_signed LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned *msg
+       public static native void ChannelMessageHandler_call_handle_closing_signed(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_update_add_htlc LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC *msg
+       public static native void ChannelMessageHandler_call_handle_update_add_htlc(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_update_fulfill_htlc LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC *msg
+       public static native void ChannelMessageHandler_call_handle_update_fulfill_htlc(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_update_fail_htlc LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC *msg
+       public static native void ChannelMessageHandler_call_handle_update_fail_htlc(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_update_fail_malformed_htlc LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC *msg
+       public static native void ChannelMessageHandler_call_handle_update_fail_malformed_htlc(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_commitment_signed LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned *msg
+       public static native void ChannelMessageHandler_call_handle_commitment_signed(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_revoke_and_ack LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK *msg
+       public static native void ChannelMessageHandler_call_handle_revoke_and_ack(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_update_fee LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee *msg
+       public static native void ChannelMessageHandler_call_handle_update_fee(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_announcement_signatures LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures *msg
+       public static native void ChannelMessageHandler_call_handle_announcement_signatures(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_peer_disconnected LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, bool no_connection_possible
+       public static native void ChannelMessageHandler_call_peer_disconnected(long this_arg, byte[] their_node_id, boolean no_connection_possible);
+       // void ChannelMessageHandler_call_peer_connected LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKInit *msg
+       public static native void ChannelMessageHandler_call_peer_connected(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_channel_reestablish LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish *msg
+       public static native void ChannelMessageHandler_call_handle_channel_reestablish(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_call_handle_error LDKChannelMessageHandler* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage *msg
+       public static native void ChannelMessageHandler_call_handle_error(long this_arg, byte[] their_node_id, long msg);
        public static native long[] LDKCVecTempl_ChannelMonitor_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_ChannelMonitor_new(long[] elems);
        public static native VecOrSliceDef LDKCVecTempl_u64_arr_info(long vec_ptr);
@@ -528,25 +526,25 @@ public class bindings {
                 long handle_channel_update(long msg);
                 void handle_htlc_fail_channel_update(long update);
                 long get_next_channel_announcements(long starting_point, byte batch_amount);
-                long get_next_node_announcements(long starting_point, byte batch_amount);
-                boolean should_request_full_sync(long node_id);
+                long get_next_node_announcements(byte[] starting_point, byte batch_amount);
+                boolean should_request_full_sync(byte[] node_id);
        }
        public static native long LDKRoutingMessageHandler_new(LDKRoutingMessageHandler impl);
        public static native LDKRoutingMessageHandler LDKRoutingMessageHandler_get_obj_from_jcalls(long val);
-       // LDKCResult_boolLightningErrorZ LDKRoutingMessageHandler_call_handle_node_announcement LDKRoutingMessageHandler* arg, const LDKNodeAnnouncement *msg
-       public static native long LDKRoutingMessageHandler_call_handle_node_announcement(long arg, long msg);
-       // LDKCResult_boolLightningErrorZ LDKRoutingMessageHandler_call_handle_channel_announcement LDKRoutingMessageHandler* arg, const LDKChannelAnnouncement *msg
-       public static native long LDKRoutingMessageHandler_call_handle_channel_announcement(long arg, long msg);
-       // LDKCResult_boolLightningErrorZ LDKRoutingMessageHandler_call_handle_channel_update LDKRoutingMessageHandler* arg, const LDKChannelUpdate *msg
-       public static native long LDKRoutingMessageHandler_call_handle_channel_update(long arg, long msg);
-       // void LDKRoutingMessageHandler_call_handle_htlc_fail_channel_update LDKRoutingMessageHandler* arg, const LDKHTLCFailChannelUpdate *update
-       public static native void LDKRoutingMessageHandler_call_handle_htlc_fail_channel_update(long arg, long update);
-       // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ LDKRoutingMessageHandler_call_get_next_channel_announcements LDKRoutingMessageHandler* arg, uint64_t starting_point, uint8_t batch_amount
-       public static native long LDKRoutingMessageHandler_call_get_next_channel_announcements(long arg, long starting_point, byte batch_amount);
-       // LDKCVec_NodeAnnouncementZ LDKRoutingMessageHandler_call_get_next_node_announcements LDKRoutingMessageHandler* arg, LDKPublicKey starting_point, uint8_t batch_amount
-       public static native long LDKRoutingMessageHandler_call_get_next_node_announcements(long arg, long starting_point, byte batch_amount);
-       // bool LDKRoutingMessageHandler_call_should_request_full_sync LDKRoutingMessageHandler* arg, LDKPublicKey node_id
-       public static native boolean LDKRoutingMessageHandler_call_should_request_full_sync(long arg, long node_id);
+       // LDKCResult_boolLightningErrorZ RoutingMessageHandler_call_handle_node_announcement LDKRoutingMessageHandler* this_arg, const LDKNodeAnnouncement *msg
+       public static native long RoutingMessageHandler_call_handle_node_announcement(long this_arg, long msg);
+       // LDKCResult_boolLightningErrorZ RoutingMessageHandler_call_handle_channel_announcement LDKRoutingMessageHandler* this_arg, const LDKChannelAnnouncement *msg
+       public static native long RoutingMessageHandler_call_handle_channel_announcement(long this_arg, long msg);
+       // LDKCResult_boolLightningErrorZ RoutingMessageHandler_call_handle_channel_update LDKRoutingMessageHandler* this_arg, const LDKChannelUpdate *msg
+       public static native long RoutingMessageHandler_call_handle_channel_update(long this_arg, long msg);
+       // void RoutingMessageHandler_call_handle_htlc_fail_channel_update LDKRoutingMessageHandler* this_arg, const LDKHTLCFailChannelUpdate *update
+       public static native void RoutingMessageHandler_call_handle_htlc_fail_channel_update(long this_arg, long update);
+       // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_call_get_next_channel_announcements LDKRoutingMessageHandler* this_arg, uint64_t starting_point, uint8_t batch_amount
+       public static native long RoutingMessageHandler_call_get_next_channel_announcements(long this_arg, long starting_point, byte batch_amount);
+       // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_call_get_next_node_announcements LDKRoutingMessageHandler* this_arg, LDKPublicKey starting_point, uint8_t batch_amount
+       public static native long RoutingMessageHandler_call_get_next_node_announcements(long this_arg, byte[] starting_point, byte batch_amount);
+       // bool RoutingMessageHandler_call_should_request_full_sync LDKRoutingMessageHandler* this_arg, LDKPublicKey node_id
+       public static native boolean RoutingMessageHandler_call_should_request_full_sync(long this_arg, byte[] node_id);
        public interface LDKSocketDescriptor {
                 long send_data(long data, boolean resume_read);
                 void disconnect_socket();
@@ -555,14 +553,13 @@ public class bindings {
        }
        public static native long LDKSocketDescriptor_new(LDKSocketDescriptor impl);
        public static native LDKSocketDescriptor LDKSocketDescriptor_get_obj_from_jcalls(long val);
-       // uintptr_t LDKSocketDescriptor_call_send_data LDKSocketDescriptor* arg, LDKu8slice data, bool resume_read
-       public static native long LDKSocketDescriptor_call_send_data(long arg, long data, boolean resume_read);
-       // void LDKSocketDescriptor_call_disconnect_socket LDKSocketDescriptor* arg
-       public static native void LDKSocketDescriptor_call_disconnect_socket(long arg);
-       // uint64_t LDKSocketDescriptor_call_hash LDKSocketDescriptor* arg
-       public static native long LDKSocketDescriptor_call_hash(long arg);
+       // uintptr_t SocketDescriptor_call_send_data LDKSocketDescriptor* this_arg, LDKu8slice data, bool resume_read
+       public static native long SocketDescriptor_call_send_data(long this_arg, long data, boolean resume_read);
+       // void SocketDescriptor_call_disconnect_socket LDKSocketDescriptor* this_arg
+       public static native void SocketDescriptor_call_disconnect_socket(long this_arg);
+       // uint64_t SocketDescriptor_call_hash LDKSocketDescriptor* this_arg
+       public static native long SocketDescriptor_call_hash(long this_arg);
        public static native VecOrSliceDef LDKCVecTempl_PublicKey_arr_info(long vec_ptr);
-       public static native long LDKCVecTempl_PublicKey_new(long[] elems);
        public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
        public static native long LDKCResult_CVec_u8ZPeerHandleErrorZ_get_inner(long arg);
        public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
@@ -636,7 +633,7 @@ public class bindings {
        // extern const void (*CResult_PublicKeySecpErrorZ_free)(LDKCResult_PublicKeySecpErrorZ);
        public static native void CResult_PublicKeySecpErrorZ_free(long arg);
        // extern const LDKCResult_PublicKeySecpErrorZ (*CResult_PublicKeySecpErrorZ_ok)(LDKPublicKey);
-       public static native long CResult_PublicKeySecpErrorZ_ok(long arg);
+       public static native long CResult_PublicKeySecpErrorZ_ok(byte[] arg);
        // extern const LDKCResult_RouteLightningErrorZ (*CResult_RouteLightningErrorZ_err)(LDKLightningError);
        public static native long CResult_RouteLightningErrorZ_err(long arg);
        // extern const void (*CResult_RouteLightningErrorZ_free)(LDKCResult_RouteLightningErrorZ);
@@ -648,7 +645,7 @@ public class bindings {
        // extern const void (*CResult_SecretKeySecpErrorZ_free)(LDKCResult_SecretKeySecpErrorZ);
        public static native void CResult_SecretKeySecpErrorZ_free(long arg);
        // extern const LDKCResult_SecretKeySecpErrorZ (*CResult_SecretKeySecpErrorZ_ok)(LDKSecretKey);
-       public static native long CResult_SecretKeySecpErrorZ_ok(long arg);
+       public static native long CResult_SecretKeySecpErrorZ_ok(byte[] arg);
        // extern const void (*CResult_SignatureNoneZ_free)(LDKCResult_SignatureNoneZ);
        public static native void CResult_SignatureNoneZ_free(long arg);
        // extern const LDKCResult_SignatureNoneZ (*CResult_SignatureNoneZ_ok)(LDKSignature);
@@ -779,6 +776,8 @@ public class bindings {
        public static native void Logger_free(long this_ptr);
        // void ChannelHandshakeConfig_free(LDKChannelHandshakeConfig this_ptr);
        public static native void ChannelHandshakeConfig_free(long this_ptr);
+       // LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const LDKChannelHandshakeConfig *orig);
+       public static native long ChannelHandshakeConfig_clone(long orig);
        // uint32_t ChannelHandshakeConfig_get_minimum_depth(const LDKChannelHandshakeConfig *this_ptr);
        public static native int ChannelHandshakeConfig_get_minimum_depth(long this_ptr);
        // void ChannelHandshakeConfig_set_minimum_depth(LDKChannelHandshakeConfig *this_ptr, uint32_t val);
@@ -797,6 +796,8 @@ public class bindings {
        public static native long ChannelHandshakeConfig_default();
        // void ChannelHandshakeLimits_free(LDKChannelHandshakeLimits this_ptr);
        public static native void ChannelHandshakeLimits_free(long this_ptr);
+       // LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const LDKChannelHandshakeLimits *orig);
+       public static native long ChannelHandshakeLimits_clone(long orig);
        // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const LDKChannelHandshakeLimits *this_ptr);
        public static native long ChannelHandshakeLimits_get_min_funding_satoshis(long this_ptr);
        // void ChannelHandshakeLimits_set_min_funding_satoshis(LDKChannelHandshakeLimits *this_ptr, uint64_t val);
@@ -843,6 +844,8 @@ public class bindings {
        public static native long ChannelHandshakeLimits_default();
        // void ChannelConfig_free(LDKChannelConfig this_ptr);
        public static native void ChannelConfig_free(long this_ptr);
+       // LDKChannelConfig ChannelConfig_clone(const LDKChannelConfig *orig);
+       public static native long ChannelConfig_clone(long orig);
        // uint32_t ChannelConfig_get_fee_proportional_millionths(const LDKChannelConfig *this_ptr);
        public static native int ChannelConfig_get_fee_proportional_millionths(long this_ptr);
        // void ChannelConfig_set_fee_proportional_millionths(LDKChannelConfig *this_ptr, uint32_t val);
@@ -865,6 +868,8 @@ public class bindings {
        public static native long ChannelConfig_read(long ser);
        // void UserConfig_free(LDKUserConfig this_ptr);
        public static native void UserConfig_free(long this_ptr);
+       // LDKUserConfig UserConfig_clone(const LDKUserConfig *orig);
+       public static native long UserConfig_clone(long orig);
        // LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const LDKUserConfig *this_ptr);
        public static native long UserConfig_get_own_channel_config(long this_ptr);
        // void UserConfig_set_own_channel_config(LDKUserConfig *this_ptr, LDKChannelHandshakeConfig val);
@@ -905,6 +910,8 @@ public class bindings {
        public static native long ChainMonitor_as_EventsProvider(long this_arg);
        // void ChannelMonitorUpdate_free(LDKChannelMonitorUpdate this_ptr);
        public static native void ChannelMonitorUpdate_free(long this_ptr);
+       // LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const LDKChannelMonitorUpdate *orig);
+       public static native long ChannelMonitorUpdate_clone(long orig);
        // uint64_t ChannelMonitorUpdate_get_update_id(const LDKChannelMonitorUpdate *this_ptr);
        public static native long ChannelMonitorUpdate_get_update_id(long this_ptr);
        // void ChannelMonitorUpdate_set_update_id(LDKChannelMonitorUpdate *this_ptr, uint64_t val);
@@ -919,6 +926,8 @@ public class bindings {
        public static native void MonitorEvent_free(long this_ptr);
        // void HTLCUpdate_free(LDKHTLCUpdate this_ptr);
        public static native void HTLCUpdate_free(long this_ptr);
+       // LDKHTLCUpdate HTLCUpdate_clone(const LDKHTLCUpdate *orig);
+       public static native long HTLCUpdate_clone(long orig);
        // LDKCVec_u8Z HTLCUpdate_write(const LDKHTLCUpdate *obj);
        public static native long HTLCUpdate_write(long obj);
        // LDKHTLCUpdate HTLCUpdate_read(LDKu8slice ser);
@@ -943,6 +952,8 @@ public class bindings {
        public static native void ChannelMonitor_block_disconnected(long this_arg, byte[] header, int height, long broadcaster, long fee_estimator, long logger);
        // void OutPoint_free(LDKOutPoint this_ptr);
        public static native void OutPoint_free(long this_ptr);
+       // LDKOutPoint OutPoint_clone(const LDKOutPoint *orig);
+       public static native long OutPoint_clone(long orig);
        // const uint8_t (*OutPoint_get_txid(const LDKOutPoint *this_ptr))[32];
        public static native byte[] OutPoint_get_txid(long this_ptr);
        // void OutPoint_set_txid(LDKOutPoint *this_ptr, LDKThirtyTwoBytes val);
@@ -967,32 +978,34 @@ public class bindings {
        public static native void KeysInterface_free(long this_ptr);
        // void InMemoryChannelKeys_free(LDKInMemoryChannelKeys this_ptr);
        public static native void InMemoryChannelKeys_free(long this_ptr);
+       // LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const LDKInMemoryChannelKeys *orig);
+       public static native long InMemoryChannelKeys_clone(long orig);
        // const uint8_t (*InMemoryChannelKeys_get_funding_key(const LDKInMemoryChannelKeys *this_ptr))[32];
        public static native byte[] InMemoryChannelKeys_get_funding_key(long this_ptr);
        // void InMemoryChannelKeys_set_funding_key(LDKInMemoryChannelKeys *this_ptr, LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_funding_key(long this_ptr, long val);
+       public static native void InMemoryChannelKeys_set_funding_key(long this_ptr, byte[] val);
        // const uint8_t (*InMemoryChannelKeys_get_revocation_base_key(const LDKInMemoryChannelKeys *this_ptr))[32];
        public static native byte[] InMemoryChannelKeys_get_revocation_base_key(long this_ptr);
        // void InMemoryChannelKeys_set_revocation_base_key(LDKInMemoryChannelKeys *this_ptr, LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_revocation_base_key(long this_ptr, long val);
+       public static native void InMemoryChannelKeys_set_revocation_base_key(long this_ptr, byte[] val);
        // const uint8_t (*InMemoryChannelKeys_get_payment_key(const LDKInMemoryChannelKeys *this_ptr))[32];
        public static native byte[] InMemoryChannelKeys_get_payment_key(long this_ptr);
        // void InMemoryChannelKeys_set_payment_key(LDKInMemoryChannelKeys *this_ptr, LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_payment_key(long this_ptr, long val);
+       public static native void InMemoryChannelKeys_set_payment_key(long this_ptr, byte[] val);
        // const uint8_t (*InMemoryChannelKeys_get_delayed_payment_base_key(const LDKInMemoryChannelKeys *this_ptr))[32];
        public static native byte[] InMemoryChannelKeys_get_delayed_payment_base_key(long this_ptr);
        // void InMemoryChannelKeys_set_delayed_payment_base_key(LDKInMemoryChannelKeys *this_ptr, LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_delayed_payment_base_key(long this_ptr, long val);
+       public static native void InMemoryChannelKeys_set_delayed_payment_base_key(long this_ptr, byte[] val);
        // const uint8_t (*InMemoryChannelKeys_get_htlc_base_key(const LDKInMemoryChannelKeys *this_ptr))[32];
        public static native byte[] InMemoryChannelKeys_get_htlc_base_key(long this_ptr);
        // void InMemoryChannelKeys_set_htlc_base_key(LDKInMemoryChannelKeys *this_ptr, LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_htlc_base_key(long this_ptr, long val);
+       public static native void InMemoryChannelKeys_set_htlc_base_key(long this_ptr, byte[] val);
        // const uint8_t (*InMemoryChannelKeys_get_commitment_seed(const LDKInMemoryChannelKeys *this_ptr))[32];
        public static native byte[] InMemoryChannelKeys_get_commitment_seed(long this_ptr);
        // void InMemoryChannelKeys_set_commitment_seed(LDKInMemoryChannelKeys *this_ptr, LDKThirtyTwoBytes val);
        public static native void InMemoryChannelKeys_set_commitment_seed(long this_ptr, byte[] val);
        // MUST_USE_RES LDKInMemoryChannelKeys InMemoryChannelKeys_new(LDKSecretKey funding_key, LDKSecretKey revocation_base_key, LDKSecretKey payment_key, LDKSecretKey delayed_payment_base_key, LDKSecretKey htlc_base_key, LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, LDKC2Tuple_u64u64Z key_derivation_params);
-       public static native long InMemoryChannelKeys_new(long funding_key, long revocation_base_key, long payment_key, long delayed_payment_base_key, long htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, long key_derivation_params);
+       public static native long InMemoryChannelKeys_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, long key_derivation_params);
        // MUST_USE_RES LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const LDKInMemoryChannelKeys *this_arg);
        public static native long InMemoryChannelKeys_counterparty_pubkeys(long this_arg);
        // MUST_USE_RES uint16_t InMemoryChannelKeys_counterparty_selected_contest_delay(const LDKInMemoryChannelKeys *this_arg);
@@ -1022,9 +1035,9 @@ public class bindings {
        // void ChannelDetails_set_channel_id(LDKChannelDetails *this_ptr, LDKThirtyTwoBytes val);
        public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val);
        // LDKPublicKey ChannelDetails_get_remote_network_id(const LDKChannelDetails *this_ptr);
-       public static native long ChannelDetails_get_remote_network_id(long this_ptr);
+       public static native byte[] ChannelDetails_get_remote_network_id(long this_ptr);
        // void ChannelDetails_set_remote_network_id(LDKChannelDetails *this_ptr, LDKPublicKey val);
-       public static native void ChannelDetails_set_remote_network_id(long this_ptr, long val);
+       public static native void ChannelDetails_set_remote_network_id(long this_ptr, byte[] val);
        // LDKInitFeatures ChannelDetails_get_counterparty_features(const LDKChannelDetails *this_ptr);
        public static native long ChannelDetails_get_counterparty_features(long this_ptr);
        // void ChannelDetails_set_counterparty_features(LDKChannelDetails *this_ptr, LDKInitFeatures val);
@@ -1054,7 +1067,7 @@ public class bindings {
        // MUST_USE_RES LDKChannelManager ChannelManager_new(LDKNetwork network, LDKFeeEstimator fee_est, LDKWatch chain_monitor, LDKBroadcasterInterface tx_broadcaster, LDKLogger logger, LDKKeysInterface keys_manager, LDKUserConfig config, uintptr_t current_blockchain_height);
        public static native long ChannelManager_new(LDKNetwork network, long fee_est, long chain_monitor, long tx_broadcaster, long logger, long keys_manager, long config, long current_blockchain_height);
        // MUST_USE_RES LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const LDKChannelManager *this_arg, LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_id, LDKUserConfig override_config);
-       public static native long ChannelManager_create_channel(long this_arg, long their_network_key, long channel_value_satoshis, long push_msat, long user_id, long override_config);
+       public static native long ChannelManager_create_channel(long this_arg, byte[] their_network_key, long channel_value_satoshis, long push_msat, long user_id, long override_config);
        // MUST_USE_RES LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const LDKChannelManager *this_arg);
        public static native long ChannelManager_list_channels(long this_arg);
        // MUST_USE_RES LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const LDKChannelManager *this_arg);
@@ -1080,7 +1093,7 @@ public class bindings {
        // MUST_USE_RES bool ChannelManager_claim_funds(const LDKChannelManager *this_arg, LDKThirtyTwoBytes payment_preimage, LDKThirtyTwoBytes payment_secret, uint64_t expected_amount);
        public static native boolean ChannelManager_claim_funds(long this_arg, byte[] payment_preimage, byte[] payment_secret, long expected_amount);
        // MUST_USE_RES LDKPublicKey ChannelManager_get_our_node_id(const LDKChannelManager *this_arg);
-       public static native long ChannelManager_get_our_node_id(long this_arg);
+       public static native byte[] ChannelManager_get_our_node_id(long this_arg);
        // void ChannelManager_channel_monitor_updated(const LDKChannelManager *this_arg, const LDKOutPoint *funding_txo, uint64_t highest_applied_update_id);
        public static native void ChannelManager_channel_monitor_updated(long this_arg, long funding_txo, long highest_applied_update_id);
        // LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const LDKChannelManager *this_arg);
@@ -1127,6 +1140,8 @@ public class bindings {
        public static native void Init_free(long this_ptr);
        // void ErrorMessage_free(LDKErrorMessage this_ptr);
        public static native void ErrorMessage_free(long this_ptr);
+       // LDKErrorMessage ErrorMessage_clone(const LDKErrorMessage *orig);
+       public static native long ErrorMessage_clone(long orig);
        // const uint8_t (*ErrorMessage_get_channel_id(const LDKErrorMessage *this_ptr))[32];
        public static native byte[] ErrorMessage_get_channel_id(long this_ptr);
        // void ErrorMessage_set_channel_id(LDKErrorMessage *this_ptr, LDKThirtyTwoBytes val);
@@ -1159,6 +1174,8 @@ public class bindings {
        public static native long Pong_new(short byteslen_arg);
        // void OpenChannel_free(LDKOpenChannel this_ptr);
        public static native void OpenChannel_free(long this_ptr);
+       // LDKOpenChannel OpenChannel_clone(const LDKOpenChannel *orig);
+       public static native long OpenChannel_clone(long orig);
        // const uint8_t (*OpenChannel_get_chain_hash(const LDKOpenChannel *this_ptr))[32];
        public static native byte[] OpenChannel_get_chain_hash(long this_ptr);
        // void OpenChannel_set_chain_hash(LDKOpenChannel *this_ptr, LDKThirtyTwoBytes val);
@@ -1204,35 +1221,37 @@ public class bindings {
        // void OpenChannel_set_max_accepted_htlcs(LDKOpenChannel *this_ptr, uint16_t val);
        public static native void OpenChannel_set_max_accepted_htlcs(long this_ptr, short val);
        // LDKPublicKey OpenChannel_get_funding_pubkey(const LDKOpenChannel *this_ptr);
-       public static native long OpenChannel_get_funding_pubkey(long this_ptr);
+       public static native byte[] OpenChannel_get_funding_pubkey(long this_ptr);
        // void OpenChannel_set_funding_pubkey(LDKOpenChannel *this_ptr, LDKPublicKey val);
-       public static native void OpenChannel_set_funding_pubkey(long this_ptr, long val);
+       public static native void OpenChannel_set_funding_pubkey(long this_ptr, byte[] val);
        // LDKPublicKey OpenChannel_get_revocation_basepoint(const LDKOpenChannel *this_ptr);
-       public static native long OpenChannel_get_revocation_basepoint(long this_ptr);
+       public static native byte[] OpenChannel_get_revocation_basepoint(long this_ptr);
        // void OpenChannel_set_revocation_basepoint(LDKOpenChannel *this_ptr, LDKPublicKey val);
-       public static native void OpenChannel_set_revocation_basepoint(long this_ptr, long val);
+       public static native void OpenChannel_set_revocation_basepoint(long this_ptr, byte[] val);
        // LDKPublicKey OpenChannel_get_payment_point(const LDKOpenChannel *this_ptr);
-       public static native long OpenChannel_get_payment_point(long this_ptr);
+       public static native byte[] OpenChannel_get_payment_point(long this_ptr);
        // void OpenChannel_set_payment_point(LDKOpenChannel *this_ptr, LDKPublicKey val);
-       public static native void OpenChannel_set_payment_point(long this_ptr, long val);
+       public static native void OpenChannel_set_payment_point(long this_ptr, byte[] val);
        // LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const LDKOpenChannel *this_ptr);
-       public static native long OpenChannel_get_delayed_payment_basepoint(long this_ptr);
+       public static native byte[] OpenChannel_get_delayed_payment_basepoint(long this_ptr);
        // void OpenChannel_set_delayed_payment_basepoint(LDKOpenChannel *this_ptr, LDKPublicKey val);
-       public static native void OpenChannel_set_delayed_payment_basepoint(long this_ptr, long val);
+       public static native void OpenChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
        // LDKPublicKey OpenChannel_get_htlc_basepoint(const LDKOpenChannel *this_ptr);
-       public static native long OpenChannel_get_htlc_basepoint(long this_ptr);
+       public static native byte[] OpenChannel_get_htlc_basepoint(long this_ptr);
        // void OpenChannel_set_htlc_basepoint(LDKOpenChannel *this_ptr, LDKPublicKey val);
-       public static native void OpenChannel_set_htlc_basepoint(long this_ptr, long val);
+       public static native void OpenChannel_set_htlc_basepoint(long this_ptr, byte[] val);
        // LDKPublicKey OpenChannel_get_first_per_commitment_point(const LDKOpenChannel *this_ptr);
-       public static native long OpenChannel_get_first_per_commitment_point(long this_ptr);
+       public static native byte[] OpenChannel_get_first_per_commitment_point(long this_ptr);
        // void OpenChannel_set_first_per_commitment_point(LDKOpenChannel *this_ptr, LDKPublicKey val);
-       public static native void OpenChannel_set_first_per_commitment_point(long this_ptr, long val);
+       public static native void OpenChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
        // uint8_t OpenChannel_get_channel_flags(const LDKOpenChannel *this_ptr);
        public static native byte OpenChannel_get_channel_flags(long this_ptr);
        // void OpenChannel_set_channel_flags(LDKOpenChannel *this_ptr, uint8_t val);
        public static native void OpenChannel_set_channel_flags(long this_ptr, byte val);
        // void AcceptChannel_free(LDKAcceptChannel this_ptr);
        public static native void AcceptChannel_free(long this_ptr);
+       // LDKAcceptChannel AcceptChannel_clone(const LDKAcceptChannel *orig);
+       public static native long AcceptChannel_clone(long orig);
        // const uint8_t (*AcceptChannel_get_temporary_channel_id(const LDKAcceptChannel *this_ptr))[32];
        public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr);
        // void AcceptChannel_set_temporary_channel_id(LDKAcceptChannel *this_ptr, LDKThirtyTwoBytes val);
@@ -1266,31 +1285,33 @@ public class bindings {
        // void AcceptChannel_set_max_accepted_htlcs(LDKAcceptChannel *this_ptr, uint16_t val);
        public static native void AcceptChannel_set_max_accepted_htlcs(long this_ptr, short val);
        // LDKPublicKey AcceptChannel_get_funding_pubkey(const LDKAcceptChannel *this_ptr);
-       public static native long AcceptChannel_get_funding_pubkey(long this_ptr);
+       public static native byte[] AcceptChannel_get_funding_pubkey(long this_ptr);
        // void AcceptChannel_set_funding_pubkey(LDKAcceptChannel *this_ptr, LDKPublicKey val);
-       public static native void AcceptChannel_set_funding_pubkey(long this_ptr, long val);
+       public static native void AcceptChannel_set_funding_pubkey(long this_ptr, byte[] val);
        // LDKPublicKey AcceptChannel_get_revocation_basepoint(const LDKAcceptChannel *this_ptr);
-       public static native long AcceptChannel_get_revocation_basepoint(long this_ptr);
+       public static native byte[] AcceptChannel_get_revocation_basepoint(long this_ptr);
        // void AcceptChannel_set_revocation_basepoint(LDKAcceptChannel *this_ptr, LDKPublicKey val);
-       public static native void AcceptChannel_set_revocation_basepoint(long this_ptr, long val);
+       public static native void AcceptChannel_set_revocation_basepoint(long this_ptr, byte[] val);
        // LDKPublicKey AcceptChannel_get_payment_point(const LDKAcceptChannel *this_ptr);
-       public static native long AcceptChannel_get_payment_point(long this_ptr);
+       public static native byte[] AcceptChannel_get_payment_point(long this_ptr);
        // void AcceptChannel_set_payment_point(LDKAcceptChannel *this_ptr, LDKPublicKey val);
-       public static native void AcceptChannel_set_payment_point(long this_ptr, long val);
+       public static native void AcceptChannel_set_payment_point(long this_ptr, byte[] val);
        // LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const LDKAcceptChannel *this_ptr);
-       public static native long AcceptChannel_get_delayed_payment_basepoint(long this_ptr);
+       public static native byte[] AcceptChannel_get_delayed_payment_basepoint(long this_ptr);
        // void AcceptChannel_set_delayed_payment_basepoint(LDKAcceptChannel *this_ptr, LDKPublicKey val);
-       public static native void AcceptChannel_set_delayed_payment_basepoint(long this_ptr, long val);
+       public static native void AcceptChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
        // LDKPublicKey AcceptChannel_get_htlc_basepoint(const LDKAcceptChannel *this_ptr);
-       public static native long AcceptChannel_get_htlc_basepoint(long this_ptr);
+       public static native byte[] AcceptChannel_get_htlc_basepoint(long this_ptr);
        // void AcceptChannel_set_htlc_basepoint(LDKAcceptChannel *this_ptr, LDKPublicKey val);
-       public static native void AcceptChannel_set_htlc_basepoint(long this_ptr, long val);
+       public static native void AcceptChannel_set_htlc_basepoint(long this_ptr, byte[] val);
        // LDKPublicKey AcceptChannel_get_first_per_commitment_point(const LDKAcceptChannel *this_ptr);
-       public static native long AcceptChannel_get_first_per_commitment_point(long this_ptr);
+       public static native byte[] AcceptChannel_get_first_per_commitment_point(long this_ptr);
        // void AcceptChannel_set_first_per_commitment_point(LDKAcceptChannel *this_ptr, LDKPublicKey val);
-       public static native void AcceptChannel_set_first_per_commitment_point(long this_ptr, long val);
+       public static native void AcceptChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
        // void FundingCreated_free(LDKFundingCreated this_ptr);
        public static native void FundingCreated_free(long this_ptr);
+       // LDKFundingCreated FundingCreated_clone(const LDKFundingCreated *orig);
+       public static native long FundingCreated_clone(long orig);
        // const uint8_t (*FundingCreated_get_temporary_channel_id(const LDKFundingCreated *this_ptr))[32];
        public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);
        // void FundingCreated_set_temporary_channel_id(LDKFundingCreated *this_ptr, LDKThirtyTwoBytes val);
@@ -1311,6 +1332,8 @@ public class bindings {
        public static native long FundingCreated_new(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, long signature_arg);
        // void FundingSigned_free(LDKFundingSigned this_ptr);
        public static native void FundingSigned_free(long this_ptr);
+       // LDKFundingSigned FundingSigned_clone(const LDKFundingSigned *orig);
+       public static native long FundingSigned_clone(long orig);
        // const uint8_t (*FundingSigned_get_channel_id(const LDKFundingSigned *this_ptr))[32];
        public static native byte[] FundingSigned_get_channel_id(long this_ptr);
        // void FundingSigned_set_channel_id(LDKFundingSigned *this_ptr, LDKThirtyTwoBytes val);
@@ -1323,18 +1346,22 @@ public class bindings {
        public static native long FundingSigned_new(byte[] channel_id_arg, long signature_arg);
        // void FundingLocked_free(LDKFundingLocked this_ptr);
        public static native void FundingLocked_free(long this_ptr);
+       // LDKFundingLocked FundingLocked_clone(const LDKFundingLocked *orig);
+       public static native long FundingLocked_clone(long orig);
        // const uint8_t (*FundingLocked_get_channel_id(const LDKFundingLocked *this_ptr))[32];
        public static native byte[] FundingLocked_get_channel_id(long this_ptr);
        // void FundingLocked_set_channel_id(LDKFundingLocked *this_ptr, LDKThirtyTwoBytes val);
        public static native void FundingLocked_set_channel_id(long this_ptr, byte[] val);
        // LDKPublicKey FundingLocked_get_next_per_commitment_point(const LDKFundingLocked *this_ptr);
-       public static native long FundingLocked_get_next_per_commitment_point(long this_ptr);
+       public static native byte[] FundingLocked_get_next_per_commitment_point(long this_ptr);
        // void FundingLocked_set_next_per_commitment_point(LDKFundingLocked *this_ptr, LDKPublicKey val);
-       public static native void FundingLocked_set_next_per_commitment_point(long this_ptr, long val);
+       public static native void FundingLocked_set_next_per_commitment_point(long this_ptr, byte[] val);
        // MUST_USE_RES LDKFundingLocked FundingLocked_new(LDKThirtyTwoBytes channel_id_arg, LDKPublicKey next_per_commitment_point_arg);
-       public static native long FundingLocked_new(byte[] channel_id_arg, long next_per_commitment_point_arg);
+       public static native long FundingLocked_new(byte[] channel_id_arg, byte[] next_per_commitment_point_arg);
        // void Shutdown_free(LDKShutdown this_ptr);
        public static native void Shutdown_free(long this_ptr);
+       // LDKShutdown Shutdown_clone(const LDKShutdown *orig);
+       public static native long Shutdown_clone(long orig);
        // const uint8_t (*Shutdown_get_channel_id(const LDKShutdown *this_ptr))[32];
        public static native byte[] Shutdown_get_channel_id(long this_ptr);
        // void Shutdown_set_channel_id(LDKShutdown *this_ptr, LDKThirtyTwoBytes val);
@@ -1347,6 +1374,8 @@ public class bindings {
        public static native long Shutdown_new(byte[] channel_id_arg, long scriptpubkey_arg);
        // void ClosingSigned_free(LDKClosingSigned this_ptr);
        public static native void ClosingSigned_free(long this_ptr);
+       // LDKClosingSigned ClosingSigned_clone(const LDKClosingSigned *orig);
+       public static native long ClosingSigned_clone(long orig);
        // const uint8_t (*ClosingSigned_get_channel_id(const LDKClosingSigned *this_ptr))[32];
        public static native byte[] ClosingSigned_get_channel_id(long this_ptr);
        // void ClosingSigned_set_channel_id(LDKClosingSigned *this_ptr, LDKThirtyTwoBytes val);
@@ -1363,6 +1392,8 @@ public class bindings {
        public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, long signature_arg);
        // void UpdateAddHTLC_free(LDKUpdateAddHTLC this_ptr);
        public static native void UpdateAddHTLC_free(long this_ptr);
+       // LDKUpdateAddHTLC UpdateAddHTLC_clone(const LDKUpdateAddHTLC *orig);
+       public static native long UpdateAddHTLC_clone(long orig);
        // const uint8_t (*UpdateAddHTLC_get_channel_id(const LDKUpdateAddHTLC *this_ptr))[32];
        public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr);
        // void UpdateAddHTLC_set_channel_id(LDKUpdateAddHTLC *this_ptr, LDKThirtyTwoBytes val);
@@ -1385,6 +1416,8 @@ public class bindings {
        public static native void UpdateAddHTLC_set_cltv_expiry(long this_ptr, int val);
        // void UpdateFulfillHTLC_free(LDKUpdateFulfillHTLC this_ptr);
        public static native void UpdateFulfillHTLC_free(long this_ptr);
+       // LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const LDKUpdateFulfillHTLC *orig);
+       public static native long UpdateFulfillHTLC_clone(long orig);
        // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const LDKUpdateFulfillHTLC *this_ptr))[32];
        public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);
        // void UpdateFulfillHTLC_set_channel_id(LDKUpdateFulfillHTLC *this_ptr, LDKThirtyTwoBytes val);
@@ -1401,6 +1434,8 @@ public class bindings {
        public static native long UpdateFulfillHTLC_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
        // void UpdateFailHTLC_free(LDKUpdateFailHTLC this_ptr);
        public static native void UpdateFailHTLC_free(long this_ptr);
+       // LDKUpdateFailHTLC UpdateFailHTLC_clone(const LDKUpdateFailHTLC *orig);
+       public static native long UpdateFailHTLC_clone(long orig);
        // const uint8_t (*UpdateFailHTLC_get_channel_id(const LDKUpdateFailHTLC *this_ptr))[32];
        public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr);
        // void UpdateFailHTLC_set_channel_id(LDKUpdateFailHTLC *this_ptr, LDKThirtyTwoBytes val);
@@ -1411,6 +1446,8 @@ public class bindings {
        public static native void UpdateFailHTLC_set_htlc_id(long this_ptr, long val);
        // void UpdateFailMalformedHTLC_free(LDKUpdateFailMalformedHTLC this_ptr);
        public static native void UpdateFailMalformedHTLC_free(long this_ptr);
+       // LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const LDKUpdateFailMalformedHTLC *orig);
+       public static native long UpdateFailMalformedHTLC_clone(long orig);
        // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const LDKUpdateFailMalformedHTLC *this_ptr))[32];
        public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
        // void UpdateFailMalformedHTLC_set_channel_id(LDKUpdateFailMalformedHTLC *this_ptr, LDKThirtyTwoBytes val);
@@ -1425,6 +1462,8 @@ public class bindings {
        public static native void UpdateFailMalformedHTLC_set_failure_code(long this_ptr, short val);
        // void CommitmentSigned_free(LDKCommitmentSigned this_ptr);
        public static native void CommitmentSigned_free(long this_ptr);
+       // LDKCommitmentSigned CommitmentSigned_clone(const LDKCommitmentSigned *orig);
+       public static native long CommitmentSigned_clone(long orig);
        // const uint8_t (*CommitmentSigned_get_channel_id(const LDKCommitmentSigned *this_ptr))[32];
        public static native byte[] CommitmentSigned_get_channel_id(long this_ptr);
        // void CommitmentSigned_set_channel_id(LDKCommitmentSigned *this_ptr, LDKThirtyTwoBytes val);
@@ -1439,6 +1478,8 @@ public class bindings {
        public static native long CommitmentSigned_new(byte[] channel_id_arg, long signature_arg, long htlc_signatures_arg);
        // void RevokeAndACK_free(LDKRevokeAndACK this_ptr);
        public static native void RevokeAndACK_free(long this_ptr);
+       // LDKRevokeAndACK RevokeAndACK_clone(const LDKRevokeAndACK *orig);
+       public static native long RevokeAndACK_clone(long orig);
        // const uint8_t (*RevokeAndACK_get_channel_id(const LDKRevokeAndACK *this_ptr))[32];
        public static native byte[] RevokeAndACK_get_channel_id(long this_ptr);
        // void RevokeAndACK_set_channel_id(LDKRevokeAndACK *this_ptr, LDKThirtyTwoBytes val);
@@ -1448,13 +1489,15 @@ public class bindings {
        // void RevokeAndACK_set_per_commitment_secret(LDKRevokeAndACK *this_ptr, LDKThirtyTwoBytes val);
        public static native void RevokeAndACK_set_per_commitment_secret(long this_ptr, byte[] val);
        // LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const LDKRevokeAndACK *this_ptr);
-       public static native long RevokeAndACK_get_next_per_commitment_point(long this_ptr);
+       public static native byte[] RevokeAndACK_get_next_per_commitment_point(long this_ptr);
        // void RevokeAndACK_set_next_per_commitment_point(LDKRevokeAndACK *this_ptr, LDKPublicKey val);
-       public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, long val);
+       public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, byte[] val);
        // MUST_USE_RES LDKRevokeAndACK RevokeAndACK_new(LDKThirtyTwoBytes channel_id_arg, LDKThirtyTwoBytes per_commitment_secret_arg, LDKPublicKey next_per_commitment_point_arg);
-       public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, long next_per_commitment_point_arg);
+       public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg);
        // void UpdateFee_free(LDKUpdateFee this_ptr);
        public static native void UpdateFee_free(long this_ptr);
+       // LDKUpdateFee UpdateFee_clone(const LDKUpdateFee *orig);
+       public static native long UpdateFee_clone(long orig);
        // const uint8_t (*UpdateFee_get_channel_id(const LDKUpdateFee *this_ptr))[32];
        public static native byte[] UpdateFee_get_channel_id(long this_ptr);
        // void UpdateFee_set_channel_id(LDKUpdateFee *this_ptr, LDKThirtyTwoBytes val);
@@ -1467,18 +1510,22 @@ public class bindings {
        public static native long UpdateFee_new(byte[] channel_id_arg, int feerate_per_kw_arg);
        // void DataLossProtect_free(LDKDataLossProtect this_ptr);
        public static native void DataLossProtect_free(long this_ptr);
+       // LDKDataLossProtect DataLossProtect_clone(const LDKDataLossProtect *orig);
+       public static native long DataLossProtect_clone(long orig);
        // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const LDKDataLossProtect *this_ptr))[32];
        public static native byte[] DataLossProtect_get_your_last_per_commitment_secret(long this_ptr);
        // void DataLossProtect_set_your_last_per_commitment_secret(LDKDataLossProtect *this_ptr, LDKThirtyTwoBytes val);
        public static native void DataLossProtect_set_your_last_per_commitment_secret(long this_ptr, byte[] val);
        // LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const LDKDataLossProtect *this_ptr);
-       public static native long DataLossProtect_get_my_current_per_commitment_point(long this_ptr);
+       public static native byte[] DataLossProtect_get_my_current_per_commitment_point(long this_ptr);
        // void DataLossProtect_set_my_current_per_commitment_point(LDKDataLossProtect *this_ptr, LDKPublicKey val);
-       public static native void DataLossProtect_set_my_current_per_commitment_point(long this_ptr, long val);
+       public static native void DataLossProtect_set_my_current_per_commitment_point(long this_ptr, byte[] val);
        // MUST_USE_RES LDKDataLossProtect DataLossProtect_new(LDKThirtyTwoBytes your_last_per_commitment_secret_arg, LDKPublicKey my_current_per_commitment_point_arg);
-       public static native long DataLossProtect_new(byte[] your_last_per_commitment_secret_arg, long my_current_per_commitment_point_arg);
+       public static native long DataLossProtect_new(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg);
        // void ChannelReestablish_free(LDKChannelReestablish this_ptr);
        public static native void ChannelReestablish_free(long this_ptr);
+       // LDKChannelReestablish ChannelReestablish_clone(const LDKChannelReestablish *orig);
+       public static native long ChannelReestablish_clone(long orig);
        // const uint8_t (*ChannelReestablish_get_channel_id(const LDKChannelReestablish *this_ptr))[32];
        public static native byte[] ChannelReestablish_get_channel_id(long this_ptr);
        // void ChannelReestablish_set_channel_id(LDKChannelReestablish *this_ptr, LDKThirtyTwoBytes val);
@@ -1493,6 +1540,8 @@ public class bindings {
        public static native void ChannelReestablish_set_next_remote_commitment_number(long this_ptr, long val);
        // void AnnouncementSignatures_free(LDKAnnouncementSignatures this_ptr);
        public static native void AnnouncementSignatures_free(long this_ptr);
+       // LDKAnnouncementSignatures AnnouncementSignatures_clone(const LDKAnnouncementSignatures *orig);
+       public static native long AnnouncementSignatures_clone(long orig);
        // const uint8_t (*AnnouncementSignatures_get_channel_id(const LDKAnnouncementSignatures *this_ptr))[32];
        public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr);
        // void AnnouncementSignatures_set_channel_id(LDKAnnouncementSignatures *this_ptr, LDKThirtyTwoBytes val);
@@ -1515,6 +1564,8 @@ public class bindings {
        public static native void NetAddress_free(long this_ptr);
        // void UnsignedNodeAnnouncement_free(LDKUnsignedNodeAnnouncement this_ptr);
        public static native void UnsignedNodeAnnouncement_free(long this_ptr);
+       // LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const LDKUnsignedNodeAnnouncement *orig);
+       public static native long UnsignedNodeAnnouncement_clone(long orig);
        // LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const LDKUnsignedNodeAnnouncement *this_ptr);
        public static native long UnsignedNodeAnnouncement_get_features(long this_ptr);
        // void UnsignedNodeAnnouncement_set_features(LDKUnsignedNodeAnnouncement *this_ptr, LDKNodeFeatures val);
@@ -1524,9 +1575,9 @@ public class bindings {
        // void UnsignedNodeAnnouncement_set_timestamp(LDKUnsignedNodeAnnouncement *this_ptr, uint32_t val);
        public static native void UnsignedNodeAnnouncement_set_timestamp(long this_ptr, int val);
        // LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const LDKUnsignedNodeAnnouncement *this_ptr);
-       public static native long UnsignedNodeAnnouncement_get_node_id(long this_ptr);
+       public static native byte[] UnsignedNodeAnnouncement_get_node_id(long this_ptr);
        // void UnsignedNodeAnnouncement_set_node_id(LDKUnsignedNodeAnnouncement *this_ptr, LDKPublicKey val);
-       public static native void UnsignedNodeAnnouncement_set_node_id(long this_ptr, long val);
+       public static native void UnsignedNodeAnnouncement_set_node_id(long this_ptr, byte[] val);
        // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const LDKUnsignedNodeAnnouncement *this_ptr))[3];
        public static native byte[] UnsignedNodeAnnouncement_get_rgb(long this_ptr);
        // void UnsignedNodeAnnouncement_set_rgb(LDKUnsignedNodeAnnouncement *this_ptr, LDKThreeBytes val);
@@ -1539,6 +1590,8 @@ public class bindings {
        public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long val);
        // void NodeAnnouncement_free(LDKNodeAnnouncement this_ptr);
        public static native void NodeAnnouncement_free(long this_ptr);
+       // LDKNodeAnnouncement NodeAnnouncement_clone(const LDKNodeAnnouncement *orig);
+       public static native long NodeAnnouncement_clone(long orig);
        // LDKSignature NodeAnnouncement_get_signature(const LDKNodeAnnouncement *this_ptr);
        public static native long NodeAnnouncement_get_signature(long this_ptr);
        // void NodeAnnouncement_set_signature(LDKNodeAnnouncement *this_ptr, LDKSignature val);
@@ -1551,6 +1604,8 @@ public class bindings {
        public static native long NodeAnnouncement_new(long signature_arg, long contents_arg);
        // void UnsignedChannelAnnouncement_free(LDKUnsignedChannelAnnouncement this_ptr);
        public static native void UnsignedChannelAnnouncement_free(long this_ptr);
+       // LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const LDKUnsignedChannelAnnouncement *orig);
+       public static native long UnsignedChannelAnnouncement_clone(long orig);
        // LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const LDKUnsignedChannelAnnouncement *this_ptr);
        public static native long UnsignedChannelAnnouncement_get_features(long this_ptr);
        // void UnsignedChannelAnnouncement_set_features(LDKUnsignedChannelAnnouncement *this_ptr, LDKChannelFeatures val);
@@ -1564,23 +1619,25 @@ public class bindings {
        // void UnsignedChannelAnnouncement_set_short_channel_id(LDKUnsignedChannelAnnouncement *this_ptr, uint64_t val);
        public static native void UnsignedChannelAnnouncement_set_short_channel_id(long this_ptr, long val);
        // LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const LDKUnsignedChannelAnnouncement *this_ptr);
-       public static native long UnsignedChannelAnnouncement_get_node_id_1(long this_ptr);
+       public static native byte[] UnsignedChannelAnnouncement_get_node_id_1(long this_ptr);
        // void UnsignedChannelAnnouncement_set_node_id_1(LDKUnsignedChannelAnnouncement *this_ptr, LDKPublicKey val);
-       public static native void UnsignedChannelAnnouncement_set_node_id_1(long this_ptr, long val);
+       public static native void UnsignedChannelAnnouncement_set_node_id_1(long this_ptr, byte[] val);
        // LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const LDKUnsignedChannelAnnouncement *this_ptr);
-       public static native long UnsignedChannelAnnouncement_get_node_id_2(long this_ptr);
+       public static native byte[] UnsignedChannelAnnouncement_get_node_id_2(long this_ptr);
        // void UnsignedChannelAnnouncement_set_node_id_2(LDKUnsignedChannelAnnouncement *this_ptr, LDKPublicKey val);
-       public static native void UnsignedChannelAnnouncement_set_node_id_2(long this_ptr, long val);
+       public static native void UnsignedChannelAnnouncement_set_node_id_2(long this_ptr, byte[] val);
        // LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const LDKUnsignedChannelAnnouncement *this_ptr);
-       public static native long UnsignedChannelAnnouncement_get_bitcoin_key_1(long this_ptr);
+       public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_1(long this_ptr);
        // void UnsignedChannelAnnouncement_set_bitcoin_key_1(LDKUnsignedChannelAnnouncement *this_ptr, LDKPublicKey val);
-       public static native void UnsignedChannelAnnouncement_set_bitcoin_key_1(long this_ptr, long val);
+       public static native void UnsignedChannelAnnouncement_set_bitcoin_key_1(long this_ptr, byte[] val);
        // LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const LDKUnsignedChannelAnnouncement *this_ptr);
-       public static native long UnsignedChannelAnnouncement_get_bitcoin_key_2(long this_ptr);
+       public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_2(long this_ptr);
        // void UnsignedChannelAnnouncement_set_bitcoin_key_2(LDKUnsignedChannelAnnouncement *this_ptr, LDKPublicKey val);
-       public static native void UnsignedChannelAnnouncement_set_bitcoin_key_2(long this_ptr, long val);
+       public static native void UnsignedChannelAnnouncement_set_bitcoin_key_2(long this_ptr, byte[] val);
        // void ChannelAnnouncement_free(LDKChannelAnnouncement this_ptr);
        public static native void ChannelAnnouncement_free(long this_ptr);
+       // LDKChannelAnnouncement ChannelAnnouncement_clone(const LDKChannelAnnouncement *orig);
+       public static native long ChannelAnnouncement_clone(long orig);
        // LDKSignature ChannelAnnouncement_get_node_signature_1(const LDKChannelAnnouncement *this_ptr);
        public static native long ChannelAnnouncement_get_node_signature_1(long this_ptr);
        // void ChannelAnnouncement_set_node_signature_1(LDKChannelAnnouncement *this_ptr, LDKSignature val);
@@ -1605,6 +1662,8 @@ public class bindings {
        public static native long ChannelAnnouncement_new(long node_signature_1_arg, long node_signature_2_arg, long bitcoin_signature_1_arg, long bitcoin_signature_2_arg, long contents_arg);
        // void UnsignedChannelUpdate_free(LDKUnsignedChannelUpdate this_ptr);
        public static native void UnsignedChannelUpdate_free(long this_ptr);
+       // LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const LDKUnsignedChannelUpdate *orig);
+       public static native long UnsignedChannelUpdate_clone(long orig);
        // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const LDKUnsignedChannelUpdate *this_ptr))[32];
        public static native byte[] UnsignedChannelUpdate_get_chain_hash(long this_ptr);
        // void UnsignedChannelUpdate_set_chain_hash(LDKUnsignedChannelUpdate *this_ptr, LDKThirtyTwoBytes val);
@@ -1639,6 +1698,8 @@ public class bindings {
        public static native void UnsignedChannelUpdate_set_fee_proportional_millionths(long this_ptr, int val);
        // void ChannelUpdate_free(LDKChannelUpdate this_ptr);
        public static native void ChannelUpdate_free(long this_ptr);
+       // LDKChannelUpdate ChannelUpdate_clone(const LDKChannelUpdate *orig);
+       public static native long ChannelUpdate_clone(long orig);
        // LDKSignature ChannelUpdate_get_signature(const LDKChannelUpdate *this_ptr);
        public static native long ChannelUpdate_get_signature(long this_ptr);
        // void ChannelUpdate_set_signature(LDKChannelUpdate *this_ptr, LDKSignature val);
@@ -1651,6 +1712,8 @@ public class bindings {
        public static native long ChannelUpdate_new(long signature_arg, long contents_arg);
        // void QueryChannelRange_free(LDKQueryChannelRange this_ptr);
        public static native void QueryChannelRange_free(long this_ptr);
+       // LDKQueryChannelRange QueryChannelRange_clone(const LDKQueryChannelRange *orig);
+       public static native long QueryChannelRange_clone(long orig);
        // const uint8_t (*QueryChannelRange_get_chain_hash(const LDKQueryChannelRange *this_ptr))[32];
        public static native byte[] QueryChannelRange_get_chain_hash(long this_ptr);
        // void QueryChannelRange_set_chain_hash(LDKQueryChannelRange *this_ptr, LDKThirtyTwoBytes val);
@@ -1667,6 +1730,8 @@ public class bindings {
        public static native long QueryChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg);
        // void ReplyChannelRange_free(LDKReplyChannelRange this_ptr);
        public static native void ReplyChannelRange_free(long this_ptr);
+       // LDKReplyChannelRange ReplyChannelRange_clone(const LDKReplyChannelRange *orig);
+       public static native long ReplyChannelRange_clone(long orig);
        // const uint8_t (*ReplyChannelRange_get_chain_hash(const LDKReplyChannelRange *this_ptr))[32];
        public static native byte[] ReplyChannelRange_get_chain_hash(long this_ptr);
        // void ReplyChannelRange_set_chain_hash(LDKReplyChannelRange *this_ptr, LDKThirtyTwoBytes val);
@@ -1689,6 +1754,8 @@ public class bindings {
        public static native long ReplyChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long short_channel_ids_arg);
        // void QueryShortChannelIds_free(LDKQueryShortChannelIds this_ptr);
        public static native void QueryShortChannelIds_free(long this_ptr);
+       // LDKQueryShortChannelIds QueryShortChannelIds_clone(const LDKQueryShortChannelIds *orig);
+       public static native long QueryShortChannelIds_clone(long orig);
        // const uint8_t (*QueryShortChannelIds_get_chain_hash(const LDKQueryShortChannelIds *this_ptr))[32];
        public static native byte[] QueryShortChannelIds_get_chain_hash(long this_ptr);
        // void QueryShortChannelIds_set_chain_hash(LDKQueryShortChannelIds *this_ptr, LDKThirtyTwoBytes val);
@@ -1699,6 +1766,8 @@ public class bindings {
        public static native long QueryShortChannelIds_new(byte[] chain_hash_arg, long short_channel_ids_arg);
        // void ReplyShortChannelIdsEnd_free(LDKReplyShortChannelIdsEnd this_ptr);
        public static native void ReplyShortChannelIdsEnd_free(long this_ptr);
+       // LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const LDKReplyShortChannelIdsEnd *orig);
+       public static native long ReplyShortChannelIdsEnd_clone(long orig);
        // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const LDKReplyShortChannelIdsEnd *this_ptr))[32];
        public static native byte[] ReplyShortChannelIdsEnd_get_chain_hash(long this_ptr);
        // void ReplyShortChannelIdsEnd_set_chain_hash(LDKReplyShortChannelIdsEnd *this_ptr, LDKThirtyTwoBytes val);
@@ -1711,6 +1780,8 @@ public class bindings {
        public static native long ReplyShortChannelIdsEnd_new(byte[] chain_hash_arg, boolean full_information_arg);
        // void GossipTimestampFilter_free(LDKGossipTimestampFilter this_ptr);
        public static native void GossipTimestampFilter_free(long this_ptr);
+       // LDKGossipTimestampFilter GossipTimestampFilter_clone(const LDKGossipTimestampFilter *orig);
+       public static native long GossipTimestampFilter_clone(long orig);
        // const uint8_t (*GossipTimestampFilter_get_chain_hash(const LDKGossipTimestampFilter *this_ptr))[32];
        public static native byte[] GossipTimestampFilter_get_chain_hash(long this_ptr);
        // void GossipTimestampFilter_set_chain_hash(LDKGossipTimestampFilter *this_ptr, LDKThirtyTwoBytes val);
@@ -1741,6 +1812,8 @@ public class bindings {
        public static native long LightningError_new(long err_arg, long action_arg);
        // void CommitmentUpdate_free(LDKCommitmentUpdate this_ptr);
        public static native void CommitmentUpdate_free(long this_ptr);
+       // LDKCommitmentUpdate CommitmentUpdate_clone(const LDKCommitmentUpdate *orig);
+       public static native long CommitmentUpdate_clone(long orig);
        // void CommitmentUpdate_set_update_add_htlcs(LDKCommitmentUpdate *this_ptr, LDKCVec_UpdateAddHTLCZ val);
        public static native void CommitmentUpdate_set_update_add_htlcs(long this_ptr, long val);
        // void CommitmentUpdate_set_update_fulfill_htlcs(LDKCommitmentUpdate *this_ptr, LDKCVec_UpdateFulfillHTLCZ val);
@@ -1914,11 +1987,11 @@ public class bindings {
        // void PeerManager_free(LDKPeerManager this_ptr);
        public static native void PeerManager_free(long this_ptr);
        // MUST_USE_RES LDKPeerManager PeerManager_new(LDKMessageHandler message_handler, LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], LDKLogger logger);
-       public static native long PeerManager_new(long message_handler, long our_node_secret, byte[] ephemeral_random_data, long logger);
+       public static native long PeerManager_new(long message_handler, byte[] our_node_secret, byte[] ephemeral_random_data, long logger);
        // MUST_USE_RES LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const LDKPeerManager *this_arg);
        public static native long PeerManager_get_peer_node_ids(long this_arg);
        // MUST_USE_RES LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const LDKPeerManager *this_arg, LDKPublicKey their_node_id, LDKSocketDescriptor descriptor);
-       public static native long PeerManager_new_outbound_connection(long this_arg, long their_node_id, long descriptor);
+       public static native long PeerManager_new_outbound_connection(long this_arg, byte[] their_node_id, long descriptor);
        // MUST_USE_RES LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const LDKPeerManager *this_arg, LDKSocketDescriptor descriptor);
        public static native long PeerManager_new_inbound_connection(long this_arg, long descriptor);
        // MUST_USE_RES LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const LDKPeerManager *this_arg, LDKSocketDescriptor *descriptor);
@@ -1934,37 +2007,39 @@ public class bindings {
        // LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
        public static native byte[] build_commitment_secret(byte[] commitment_seed, long idx);
        // LDKCResult_SecretKeySecpErrorZ derive_private_key(LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
-       public static native long derive_private_key(long per_commitment_point, byte[] base_secret);
+       public static native long derive_private_key(byte[] per_commitment_point, byte[] base_secret);
        // LDKCResult_PublicKeySecpErrorZ derive_public_key(LDKPublicKey per_commitment_point, LDKPublicKey base_point);
-       public static native long derive_public_key(long per_commitment_point, long base_point);
+       public static native long derive_public_key(byte[] per_commitment_point, byte[] base_point);
        // LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
        public static native long derive_private_revocation_key(byte[] per_commitment_secret, byte[] countersignatory_revocation_base_secret);
        // LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(LDKPublicKey per_commitment_point, LDKPublicKey countersignatory_revocation_base_point);
-       public static native long derive_public_revocation_key(long per_commitment_point, long countersignatory_revocation_base_point);
+       public static native long derive_public_revocation_key(byte[] per_commitment_point, byte[] countersignatory_revocation_base_point);
        // void TxCreationKeys_free(LDKTxCreationKeys this_ptr);
        public static native void TxCreationKeys_free(long this_ptr);
+       // LDKTxCreationKeys TxCreationKeys_clone(const LDKTxCreationKeys *orig);
+       public static native long TxCreationKeys_clone(long orig);
        // LDKPublicKey TxCreationKeys_get_per_commitment_point(const LDKTxCreationKeys *this_ptr);
-       public static native long TxCreationKeys_get_per_commitment_point(long this_ptr);
+       public static native byte[] TxCreationKeys_get_per_commitment_point(long this_ptr);
        // void TxCreationKeys_set_per_commitment_point(LDKTxCreationKeys *this_ptr, LDKPublicKey val);
-       public static native void TxCreationKeys_set_per_commitment_point(long this_ptr, long val);
+       public static native void TxCreationKeys_set_per_commitment_point(long this_ptr, byte[] val);
        // LDKPublicKey TxCreationKeys_get_revocation_key(const LDKTxCreationKeys *this_ptr);
-       public static native long TxCreationKeys_get_revocation_key(long this_ptr);
+       public static native byte[] TxCreationKeys_get_revocation_key(long this_ptr);
        // void TxCreationKeys_set_revocation_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val);
-       public static native void TxCreationKeys_set_revocation_key(long this_ptr, long val);
+       public static native void TxCreationKeys_set_revocation_key(long this_ptr, byte[] val);
        // LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const LDKTxCreationKeys *this_ptr);
-       public static native long TxCreationKeys_get_broadcaster_htlc_key(long this_ptr);
+       public static native byte[] TxCreationKeys_get_broadcaster_htlc_key(long this_ptr);
        // void TxCreationKeys_set_broadcaster_htlc_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val);
-       public static native void TxCreationKeys_set_broadcaster_htlc_key(long this_ptr, long val);
+       public static native void TxCreationKeys_set_broadcaster_htlc_key(long this_ptr, byte[] val);
        // LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const LDKTxCreationKeys *this_ptr);
-       public static native long TxCreationKeys_get_countersignatory_htlc_key(long this_ptr);
+       public static native byte[] TxCreationKeys_get_countersignatory_htlc_key(long this_ptr);
        // void TxCreationKeys_set_countersignatory_htlc_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val);
-       public static native void TxCreationKeys_set_countersignatory_htlc_key(long this_ptr, long val);
+       public static native void TxCreationKeys_set_countersignatory_htlc_key(long this_ptr, byte[] val);
        // LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const LDKTxCreationKeys *this_ptr);
-       public static native long TxCreationKeys_get_broadcaster_delayed_payment_key(long this_ptr);
+       public static native byte[] TxCreationKeys_get_broadcaster_delayed_payment_key(long this_ptr);
        // void TxCreationKeys_set_broadcaster_delayed_payment_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val);
-       public static native void TxCreationKeys_set_broadcaster_delayed_payment_key(long this_ptr, long val);
+       public static native void TxCreationKeys_set_broadcaster_delayed_payment_key(long this_ptr, byte[] val);
        // MUST_USE_RES LDKTxCreationKeys TxCreationKeys_new(LDKPublicKey per_commitment_point_arg, LDKPublicKey revocation_key_arg, LDKPublicKey broadcaster_htlc_key_arg, LDKPublicKey countersignatory_htlc_key_arg, LDKPublicKey broadcaster_delayed_payment_key_arg);
-       public static native long TxCreationKeys_new(long per_commitment_point_arg, long revocation_key_arg, long broadcaster_htlc_key_arg, long countersignatory_htlc_key_arg, long broadcaster_delayed_payment_key_arg);
+       public static native long TxCreationKeys_new(byte[] per_commitment_point_arg, byte[] revocation_key_arg, byte[] broadcaster_htlc_key_arg, byte[] countersignatory_htlc_key_arg, byte[] broadcaster_delayed_payment_key_arg);
        // LDKCVec_u8Z TxCreationKeys_write(const LDKTxCreationKeys *obj);
        public static native long TxCreationKeys_write(long obj);
        // LDKTxCreationKeys TxCreationKeys_read(LDKu8slice ser);
@@ -1976,41 +2051,45 @@ public class bindings {
        // MUST_USE_RES LDKTxCreationKeys PreCalculatedTxCreationKeys_trust_key_derivation(const LDKPreCalculatedTxCreationKeys *this_arg);
        public static native long PreCalculatedTxCreationKeys_trust_key_derivation(long this_arg);
        // MUST_USE_RES LDKPublicKey PreCalculatedTxCreationKeys_per_commitment_point(const LDKPreCalculatedTxCreationKeys *this_arg);
-       public static native long PreCalculatedTxCreationKeys_per_commitment_point(long this_arg);
+       public static native byte[] PreCalculatedTxCreationKeys_per_commitment_point(long this_arg);
        // void ChannelPublicKeys_free(LDKChannelPublicKeys this_ptr);
        public static native void ChannelPublicKeys_free(long this_ptr);
+       // LDKChannelPublicKeys ChannelPublicKeys_clone(const LDKChannelPublicKeys *orig);
+       public static native long ChannelPublicKeys_clone(long orig);
        // LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const LDKChannelPublicKeys *this_ptr);
-       public static native long ChannelPublicKeys_get_funding_pubkey(long this_ptr);
+       public static native byte[] ChannelPublicKeys_get_funding_pubkey(long this_ptr);
        // void ChannelPublicKeys_set_funding_pubkey(LDKChannelPublicKeys *this_ptr, LDKPublicKey val);
-       public static native void ChannelPublicKeys_set_funding_pubkey(long this_ptr, long val);
+       public static native void ChannelPublicKeys_set_funding_pubkey(long this_ptr, byte[] val);
        // LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const LDKChannelPublicKeys *this_ptr);
-       public static native long ChannelPublicKeys_get_revocation_basepoint(long this_ptr);
+       public static native byte[] ChannelPublicKeys_get_revocation_basepoint(long this_ptr);
        // void ChannelPublicKeys_set_revocation_basepoint(LDKChannelPublicKeys *this_ptr, LDKPublicKey val);
-       public static native void ChannelPublicKeys_set_revocation_basepoint(long this_ptr, long val);
+       public static native void ChannelPublicKeys_set_revocation_basepoint(long this_ptr, byte[] val);
        // LDKPublicKey ChannelPublicKeys_get_payment_point(const LDKChannelPublicKeys *this_ptr);
-       public static native long ChannelPublicKeys_get_payment_point(long this_ptr);
+       public static native byte[] ChannelPublicKeys_get_payment_point(long this_ptr);
        // void ChannelPublicKeys_set_payment_point(LDKChannelPublicKeys *this_ptr, LDKPublicKey val);
-       public static native void ChannelPublicKeys_set_payment_point(long this_ptr, long val);
+       public static native void ChannelPublicKeys_set_payment_point(long this_ptr, byte[] val);
        // LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const LDKChannelPublicKeys *this_ptr);
-       public static native long ChannelPublicKeys_get_delayed_payment_basepoint(long this_ptr);
+       public static native byte[] ChannelPublicKeys_get_delayed_payment_basepoint(long this_ptr);
        // void ChannelPublicKeys_set_delayed_payment_basepoint(LDKChannelPublicKeys *this_ptr, LDKPublicKey val);
-       public static native void ChannelPublicKeys_set_delayed_payment_basepoint(long this_ptr, long val);
+       public static native void ChannelPublicKeys_set_delayed_payment_basepoint(long this_ptr, byte[] val);
        // LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const LDKChannelPublicKeys *this_ptr);
-       public static native long ChannelPublicKeys_get_htlc_basepoint(long this_ptr);
+       public static native byte[] ChannelPublicKeys_get_htlc_basepoint(long this_ptr);
        // void ChannelPublicKeys_set_htlc_basepoint(LDKChannelPublicKeys *this_ptr, LDKPublicKey val);
-       public static native void ChannelPublicKeys_set_htlc_basepoint(long this_ptr, long val);
+       public static native void ChannelPublicKeys_set_htlc_basepoint(long this_ptr, byte[] val);
        // MUST_USE_RES LDKChannelPublicKeys ChannelPublicKeys_new(LDKPublicKey funding_pubkey_arg, LDKPublicKey revocation_basepoint_arg, LDKPublicKey payment_point_arg, LDKPublicKey delayed_payment_basepoint_arg, LDKPublicKey htlc_basepoint_arg);
-       public static native long ChannelPublicKeys_new(long funding_pubkey_arg, long revocation_basepoint_arg, long payment_point_arg, long delayed_payment_basepoint_arg, long htlc_basepoint_arg);
+       public static native long ChannelPublicKeys_new(byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg);
        // LDKCVec_u8Z ChannelPublicKeys_write(const LDKChannelPublicKeys *obj);
        public static native long ChannelPublicKeys_write(long obj);
        // LDKChannelPublicKeys ChannelPublicKeys_read(LDKu8slice ser);
        public static native long ChannelPublicKeys_read(long ser);
        // MUST_USE_RES LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(LDKPublicKey per_commitment_point, LDKPublicKey broadcaster_delayed_payment_base, LDKPublicKey broadcaster_htlc_base, LDKPublicKey countersignatory_revocation_base, LDKPublicKey countersignatory_htlc_base);
-       public static native long TxCreationKeys_derive_new(long per_commitment_point, long broadcaster_delayed_payment_base, long broadcaster_htlc_base, long countersignatory_revocation_base, long countersignatory_htlc_base);
+       public static native long TxCreationKeys_derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base);
        // LDKCVec_u8Z get_revokeable_redeemscript(LDKPublicKey revocation_key, uint16_t contest_delay, LDKPublicKey broadcaster_delayed_payment_key);
-       public static native long get_revokeable_redeemscript(long revocation_key, short contest_delay, long broadcaster_delayed_payment_key);
+       public static native long get_revokeable_redeemscript(byte[] revocation_key, short contest_delay, byte[] broadcaster_delayed_payment_key);
        // void HTLCOutputInCommitment_free(LDKHTLCOutputInCommitment this_ptr);
        public static native void HTLCOutputInCommitment_free(long this_ptr);
+       // LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const LDKHTLCOutputInCommitment *orig);
+       public static native long HTLCOutputInCommitment_clone(long orig);
        // bool HTLCOutputInCommitment_get_offered(const LDKHTLCOutputInCommitment *this_ptr);
        public static native boolean HTLCOutputInCommitment_get_offered(long this_ptr);
        // void HTLCOutputInCommitment_set_offered(LDKHTLCOutputInCommitment *this_ptr, bool val);
@@ -2034,11 +2113,13 @@ public class bindings {
        // LDKCVec_u8Z get_htlc_redeemscript(const LDKHTLCOutputInCommitment *htlc, const LDKTxCreationKeys *keys);
        public static native long get_htlc_redeemscript(long htlc, long keys);
        // LDKCVec_u8Z make_funding_redeemscript(LDKPublicKey broadcaster, LDKPublicKey countersignatory);
-       public static native long make_funding_redeemscript(long broadcaster, long countersignatory);
+       public static native long make_funding_redeemscript(byte[] broadcaster, byte[] countersignatory);
        // LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const LDKHTLCOutputInCommitment *htlc, LDKPublicKey broadcaster_delayed_payment_key, LDKPublicKey revocation_key);
-       public static native long build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, short contest_delay, long htlc, long broadcaster_delayed_payment_key, long revocation_key);
+       public static native long build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, short contest_delay, long htlc, byte[] broadcaster_delayed_payment_key, byte[] revocation_key);
        // void HolderCommitmentTransaction_free(LDKHolderCommitmentTransaction this_ptr);
        public static native void HolderCommitmentTransaction_free(long this_ptr);
+       // LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const LDKHolderCommitmentTransaction *orig);
+       public static native long HolderCommitmentTransaction_clone(long orig);
        // LDKTransaction HolderCommitmentTransaction_get_unsigned_tx(const LDKHolderCommitmentTransaction *this_ptr);
        public static native long HolderCommitmentTransaction_get_unsigned_tx(long this_ptr);
        // void HolderCommitmentTransaction_set_unsigned_tx(LDKHolderCommitmentTransaction *this_ptr, LDKTransaction val);
@@ -2054,7 +2135,7 @@ public class bindings {
        // void HolderCommitmentTransaction_set_per_htlc(LDKHolderCommitmentTransaction *this_ptr, LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val);
        public static native void HolderCommitmentTransaction_set_per_htlc(long this_ptr, long val);
        // MUST_USE_RES LDKHolderCommitmentTransaction HolderCommitmentTransaction_new_missing_holder_sig(LDKTransaction unsigned_tx, LDKSignature counterparty_sig, LDKPublicKey holder_funding_key, LDKPublicKey counterparty_funding_key, LDKTxCreationKeys keys, uint32_t feerate_per_kw, LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data);
-       public static native long HolderCommitmentTransaction_new_missing_holder_sig(long unsigned_tx, long counterparty_sig, long holder_funding_key, long counterparty_funding_key, long keys, int feerate_per_kw, long htlc_data);
+       public static native long HolderCommitmentTransaction_new_missing_holder_sig(long unsigned_tx, long counterparty_sig, byte[] holder_funding_key, byte[] counterparty_funding_key, long keys, int feerate_per_kw, long htlc_data);
        // MUST_USE_RES LDKTxCreationKeys HolderCommitmentTransaction_trust_key_derivation(const LDKHolderCommitmentTransaction *this_arg);
        public static native long HolderCommitmentTransaction_trust_key_derivation(long this_arg);
        // MUST_USE_RES LDKThirtyTwoBytes HolderCommitmentTransaction_txid(const LDKHolderCommitmentTransaction *this_arg);
@@ -2075,10 +2156,12 @@ public class bindings {
        public static native void ChannelFeatures_free(long this_ptr);
        // void RouteHop_free(LDKRouteHop this_ptr);
        public static native void RouteHop_free(long this_ptr);
+       // LDKRouteHop RouteHop_clone(const LDKRouteHop *orig);
+       public static native long RouteHop_clone(long orig);
        // LDKPublicKey RouteHop_get_pubkey(const LDKRouteHop *this_ptr);
-       public static native long RouteHop_get_pubkey(long this_ptr);
+       public static native byte[] RouteHop_get_pubkey(long this_ptr);
        // void RouteHop_set_pubkey(LDKRouteHop *this_ptr, LDKPublicKey val);
-       public static native void RouteHop_set_pubkey(long this_ptr, long val);
+       public static native void RouteHop_set_pubkey(long this_ptr, byte[] val);
        // LDKNodeFeatures RouteHop_get_node_features(const LDKRouteHop *this_ptr);
        public static native long RouteHop_get_node_features(long this_ptr);
        // void RouteHop_set_node_features(LDKRouteHop *this_ptr, LDKNodeFeatures val);
@@ -2100,9 +2183,11 @@ public class bindings {
        // void RouteHop_set_cltv_expiry_delta(LDKRouteHop *this_ptr, uint32_t val);
        public static native void RouteHop_set_cltv_expiry_delta(long this_ptr, int val);
        // MUST_USE_RES LDKRouteHop RouteHop_new(LDKPublicKey pubkey_arg, LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg);
-       public static native long RouteHop_new(long pubkey_arg, long node_features_arg, long short_channel_id_arg, long channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg);
+       public static native long RouteHop_new(byte[] pubkey_arg, long node_features_arg, long short_channel_id_arg, long channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg);
        // void Route_free(LDKRoute this_ptr);
        public static native void Route_free(long this_ptr);
+       // LDKRoute Route_clone(const LDKRoute *orig);
+       public static native long Route_clone(long orig);
        // void Route_set_paths(LDKRoute *this_ptr, LDKCVec_CVec_RouteHopZZ val);
        public static native void Route_set_paths(long this_ptr, long val);
        // MUST_USE_RES LDKRoute Route_new(LDKCVec_CVec_RouteHopZZ paths_arg);
@@ -2114,9 +2199,9 @@ public class bindings {
        // void RouteHint_free(LDKRouteHint this_ptr);
        public static native void RouteHint_free(long this_ptr);
        // LDKPublicKey RouteHint_get_src_node_id(const LDKRouteHint *this_ptr);
-       public static native long RouteHint_get_src_node_id(long this_ptr);
+       public static native byte[] RouteHint_get_src_node_id(long this_ptr);
        // void RouteHint_set_src_node_id(LDKRouteHint *this_ptr, LDKPublicKey val);
-       public static native void RouteHint_set_src_node_id(long this_ptr, long val);
+       public static native void RouteHint_set_src_node_id(long this_ptr, byte[] val);
        // uint64_t RouteHint_get_short_channel_id(const LDKRouteHint *this_ptr);
        public static native long RouteHint_get_short_channel_id(long this_ptr);
        // void RouteHint_set_short_channel_id(LDKRouteHint *this_ptr, uint64_t val);
@@ -2134,9 +2219,9 @@ public class bindings {
        // void RouteHint_set_htlc_minimum_msat(LDKRouteHint *this_ptr, uint64_t val);
        public static native void RouteHint_set_htlc_minimum_msat(long this_ptr, long val);
        // MUST_USE_RES LDKRouteHint RouteHint_new(LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg);
-       public static native long RouteHint_new(long src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg);
+       public static native long RouteHint_new(byte[] src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg);
        // LDKCResult_RouteLightningErrorZ get_route(LDKPublicKey our_node_id, const LDKNetworkGraph *network, LDKPublicKey target, LDKCVec_ChannelDetailsZ *first_hops, LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, LDKLogger logger);
-       public static native long get_route(long our_node_id, long network, long target, long first_hops, long last_hops, long final_value_msat, int final_cltv, long logger);
+       public static native long get_route(byte[] our_node_id, long network, byte[] target, long first_hops, long last_hops, long final_value_msat, int final_cltv, long logger);
        // void NetworkGraph_free(LDKNetworkGraph this_ptr);
        public static native void NetworkGraph_free(long this_ptr);
        // void LockedNetworkGraph_free(LDKLockedNetworkGraph this_ptr);
@@ -2186,17 +2271,17 @@ public class bindings {
        // void ChannelInfo_set_features(LDKChannelInfo *this_ptr, LDKChannelFeatures val);
        public static native void ChannelInfo_set_features(long this_ptr, long val);
        // LDKPublicKey ChannelInfo_get_node_one(const LDKChannelInfo *this_ptr);
-       public static native long ChannelInfo_get_node_one(long this_ptr);
+       public static native byte[] ChannelInfo_get_node_one(long this_ptr);
        // void ChannelInfo_set_node_one(LDKChannelInfo *this_ptr, LDKPublicKey val);
-       public static native void ChannelInfo_set_node_one(long this_ptr, long val);
+       public static native void ChannelInfo_set_node_one(long this_ptr, byte[] val);
        // LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const LDKChannelInfo *this_ptr);
        public static native long ChannelInfo_get_one_to_two(long this_ptr);
        // void ChannelInfo_set_one_to_two(LDKChannelInfo *this_ptr, LDKDirectionalChannelInfo val);
        public static native void ChannelInfo_set_one_to_two(long this_ptr, long val);
        // LDKPublicKey ChannelInfo_get_node_two(const LDKChannelInfo *this_ptr);
-       public static native long ChannelInfo_get_node_two(long this_ptr);
+       public static native byte[] ChannelInfo_get_node_two(long this_ptr);
        // void ChannelInfo_set_node_two(LDKChannelInfo *this_ptr, LDKPublicKey val);
-       public static native void ChannelInfo_set_node_two(long this_ptr, long val);
+       public static native void ChannelInfo_set_node_two(long this_ptr, byte[] val);
        // LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const LDKChannelInfo *this_ptr);
        public static native long ChannelInfo_get_two_to_one(long this_ptr);
        // void ChannelInfo_set_two_to_one(LDKChannelInfo *this_ptr, LDKDirectionalChannelInfo val);
@@ -2211,6 +2296,8 @@ public class bindings {
        public static native long ChannelInfo_read(long ser);
        // void RoutingFees_free(LDKRoutingFees this_ptr);
        public static native void RoutingFees_free(long this_ptr);
+       // LDKRoutingFees RoutingFees_clone(const LDKRoutingFees *orig);
+       public static native long RoutingFees_clone(long orig);
        // uint32_t RoutingFees_get_base_msat(const LDKRoutingFees *this_ptr);
        public static native int RoutingFees_get_base_msat(long this_ptr);
        // void RoutingFees_set_base_msat(LDKRoutingFees *this_ptr, uint32_t val);