Test current state of things, which actually doesn't crash!
[ldk-java] / src / main / java / org / ldk / impl / bindings.java
index 7e4368211969300271b7539dacf3765448c663c4..947468c35abb8269d2eed8762519dbd9a40f9964 100644 (file)
@@ -5,105 +5,107 @@ public class bindings {
                System.loadLibrary("lightningjni");
        }
 
+       public static native long LDKSecretKey_new();
+
        public interface LDKMessageSendEventsProvider {
-                void get_and_clear_pending_msg_events(/* TODO + rtype */);
+                long get_and_clear_pending_msg_events();
        }
        public static native long LDKMessageSendEventsProvider_new(LDKMessageSendEventsProvider impl);
        public interface LDKEventsProvider {
-                void get_and_clear_pending_events(/* TODO + rtype */);
+                long get_and_clear_pending_events();
        }
        public static native long LDKEventsProvider_new(LDKEventsProvider impl);
        public interface LDKLogger {
-                void log(/* TODO + rtype */);
+                void log(String record);
        }
        public static native long LDKLogger_new(LDKLogger impl);
        public interface LDKChainWatchInterface {
-                void install_watch_tx(/* TODO + rtype */);
-                void install_watch_outpoint(/* TODO + rtype */);
-                void watch_all_txn(/* TODO + rtype */);
-                void get_chain_utxo(/* TODO + rtype */);
-                void filter_block(/* TODO + rtype */);
-                void reentered(/* TODO + rtype */);
+                void install_watch_tx(byte[] txid, long script_pub_key);
+                void install_watch_outpoint(long outpoint, long out_script);
+                void watch_all_txn();
+                long get_chain_utxo(long genesis_hash, long unspent_tx_output_identifier);
+                long filter_block(long block);
+                long reentered();
        }
        public static native long LDKChainWatchInterface_new(LDKChainWatchInterface impl);
        public interface LDKBroadcasterInterface {
-                void broadcast_transaction(/* TODO + rtype */);
+                void broadcast_transaction(long tx);
        }
        public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
        public interface LDKChainListener {
-                void block_connected(/* TODO + rtype */);
-                void block_disconnected(/* TODO + rtype */);
+                void block_connected(byte[] header, int height, long txn_matched, long indexes_of_txn_matched);
+                void block_disconnected(byte[] header, int disconnected_height);
        }
        public static native long LDKChainListener_new(LDKChainListener impl);
        public interface LDKFeeEstimator {
-                void get_est_sat_per_1000_weight(/* TODO + rtype */);
+                int get_est_sat_per_1000_weight(long confirmation_target);
        }
        public static native long LDKFeeEstimator_new(LDKFeeEstimator impl);
        public interface LDKChannelKeys {
-                void get_per_commitment_point(/* TODO + rtype */);
-                void release_commitment_secret(/* TODO + rtype */);
-                void key_derivation_params(/* TODO + rtype */);
-                void sign_remote_commitment(/* TODO + rtype */);
-                void sign_local_commitment(/* TODO + rtype */);
-                void sign_local_commitment_htlc_transactions(/* TODO + rtype */);
-                void sign_justice_transaction(/* TODO + rtype */);
-                void sign_remote_htlc_transaction(/* TODO + rtype */);
-                void sign_closing_transaction(/* TODO + rtype */);
-                void sign_channel_announcement(/* TODO + rtype */);
-                void on_accept(/* TODO + rtype */);
+                long get_per_commitment_point(long idx);
+                long release_commitment_secret(long idx);
+                long key_derivation_params();
+                long sign_remote_commitment(int feerate_per_kw, long commitment_tx, long keys, long htlcs);
+                long sign_local_commitment(long local_commitment_tx);
+                long sign_local_commitment_htlc_transactions(long local_commitment_tx);
+                long sign_justice_transaction(long justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
+                long sign_remote_htlc_transaction(long htlc_tx, long input, long amount, long 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 remote_to_self_delay, short local_to_self_delay);
        }
        public static native long LDKChannelKeys_new(LDKChannelKeys impl);
        public interface LDKKeysInterface {
-                void get_node_secret(/* TODO + rtype */);
-                void get_destination_script(/* TODO + rtype */);
-                void get_shutdown_pubkey(/* TODO + rtype */);
-                void get_channel_keys(/* TODO + rtype */);
-                void get_secure_random_bytes(/* TODO + rtype */);
+                long get_node_secret();
+                long get_destination_script();
+                long get_shutdown_pubkey();
+                long get_channel_keys(boolean inbound, long channel_value_satoshis);
+                long get_secure_random_bytes();
        }
        public static native long LDKKeysInterface_new(LDKKeysInterface impl);
        public interface LDKManyChannelMonitor {
-                void add_monitor(/* TODO + rtype */);
-                void update_monitor(/* TODO + rtype */);
-                void get_and_clear_pending_monitor_events(/* TODO + rtype */);
+                long add_monitor(long funding_txo, long monitor);
+                long update_monitor(long funding_txo, long monitor);
+                long get_and_clear_pending_monitor_events();
        }
        public static native long LDKManyChannelMonitor_new(LDKManyChannelMonitor impl);
        public interface LDKChannelMessageHandler {
-                void handle_open_channel(/* TODO + rtype */);
-                void handle_accept_channel(/* TODO + rtype */);
-                void handle_funding_created(/* TODO + rtype */);
-                void handle_funding_signed(/* TODO + rtype */);
-                void handle_funding_locked(/* TODO + rtype */);
-                void handle_shutdown(/* TODO + rtype */);
-                void handle_closing_signed(/* TODO + rtype */);
-                void handle_update_add_htlc(/* TODO + rtype */);
-                void handle_update_fulfill_htlc(/* TODO + rtype */);
-                void handle_update_fail_htlc(/* TODO + rtype */);
-                void handle_update_fail_malformed_htlc(/* TODO + rtype */);
-                void handle_commitment_signed(/* TODO + rtype */);
-                void handle_revoke_and_ack(/* TODO + rtype */);
-                void handle_update_fee(/* TODO + rtype */);
-                void handle_announcement_signatures(/* TODO + rtype */);
-                void peer_disconnected(/* TODO + rtype */);
-                void peer_connected(/* TODO + rtype */);
-                void handle_channel_reestablish(/* TODO + rtype */);
-                void handle_error(/* TODO + rtype */);
+                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);
        }
-       public static native long LDKChannelMessageHandler_new(LDKChannelMessageHandler impl);
+       public static native long LDKChannelMessageHandler_new(LDKChannelMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
        public interface LDKRoutingMessageHandler {
-                void handle_node_announcement(/* TODO + rtype */);
-                void handle_channel_announcement(/* TODO + rtype */);
-                void handle_channel_update(/* TODO + rtype */);
-                void handle_htlc_fail_channel_update(/* TODO + rtype */);
-                void get_next_channel_announcements(/* TODO + rtype */);
-                void get_next_node_announcements(/* TODO + rtype */);
-                void should_request_full_sync(/* TODO + rtype */);
+                long handle_node_announcement(long msg);
+                long handle_channel_announcement(long msg);
+                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);
        }
        public static native long LDKRoutingMessageHandler_new(LDKRoutingMessageHandler impl);
        public interface LDKSocketDescriptor {
-                void send_data(/* TODO + rtype */);
-                void disconnect_socket(/* TODO + rtype */);
-                void eq(/* TODO + rtype */);
-                void hash(/* TODO + rtype */);
+                long send_data(long data, boolean resume_read);
+                void disconnect_socket();
+                boolean eq(long other_arg);
+                long hash();
        }
        public static native long LDKSocketDescriptor_new(LDKSocketDescriptor impl);
        /// extern const void (*C2Tuple_HTLCOutputInCommitmentSignatureZ_free)(LDKC2Tuple_HTLCOutputInCommitmentSignatureZ);
@@ -289,15 +291,15 @@ public class bindings {
        /// void ChannelHandshakeConfig_set_minimum_depth(LDKChannelHandshakeConfig *this_ptr, uint32_t val);
        public static native void ChannelHandshakeConfig_set_minimum_depth(long this_ptr, int val);
        /// uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const LDKChannelHandshakeConfig *this_ptr);
-       public static native long ChannelHandshakeConfig_get_our_to_self_delay(long this_ptr);
+       public static native short ChannelHandshakeConfig_get_our_to_self_delay(long this_ptr);
        /// void ChannelHandshakeConfig_set_our_to_self_delay(LDKChannelHandshakeConfig *this_ptr, uint16_t val);
-       public static native void ChannelHandshakeConfig_set_our_to_self_delay(long this_ptr, long val);
+       public static native void ChannelHandshakeConfig_set_our_to_self_delay(long this_ptr, short val);
        /// uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const LDKChannelHandshakeConfig *this_ptr);
        public static native long ChannelHandshakeConfig_get_our_htlc_minimum_msat(long this_ptr);
        /// void ChannelHandshakeConfig_set_our_htlc_minimum_msat(LDKChannelHandshakeConfig *this_ptr, uint64_t val);
        public static native void ChannelHandshakeConfig_set_our_htlc_minimum_msat(long this_ptr, long val);
        /// MUST_USE_RES LDKChannelHandshakeConfig ChannelHandshakeConfig_new(uint32_t minimum_depth_arg, uint16_t our_to_self_delay_arg, uint64_t our_htlc_minimum_msat_arg);
-       public static native long ChannelHandshakeConfig_new(int minimum_depth_arg, long our_to_self_delay_arg, long our_htlc_minimum_msat_arg);
+       public static native long ChannelHandshakeConfig_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg);
        /// MUST_USE_RES LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
        public static native long ChannelHandshakeConfig_default();
        /// void ChannelHandshakeLimits_free(LDKChannelHandshakeLimits this_ptr);
@@ -319,9 +321,9 @@ public class bindings {
        /// void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(LDKChannelHandshakeLimits *this_ptr, uint64_t val);
        public static native void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(long this_ptr, long val);
        /// uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const LDKChannelHandshakeLimits *this_ptr);
-       public static native long ChannelHandshakeLimits_get_min_max_accepted_htlcs(long this_ptr);
+       public static native short ChannelHandshakeLimits_get_min_max_accepted_htlcs(long this_ptr);
        /// void ChannelHandshakeLimits_set_min_max_accepted_htlcs(LDKChannelHandshakeLimits *this_ptr, uint16_t val);
-       public static native void ChannelHandshakeLimits_set_min_max_accepted_htlcs(long this_ptr, long val);
+       public static native void ChannelHandshakeLimits_set_min_max_accepted_htlcs(long this_ptr, short val);
        /// uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const LDKChannelHandshakeLimits *this_ptr);
        public static native long ChannelHandshakeLimits_get_min_dust_limit_satoshis(long this_ptr);
        /// void ChannelHandshakeLimits_set_min_dust_limit_satoshis(LDKChannelHandshakeLimits *this_ptr, uint64_t val);
@@ -337,13 +339,13 @@ public class bindings {
        /// bool ChannelHandshakeLimits_get_force_announced_channel_preference(const LDKChannelHandshakeLimits *this_ptr);
        public static native boolean ChannelHandshakeLimits_get_force_announced_channel_preference(long this_ptr);
        /// void ChannelHandshakeLimits_set_force_announced_channel_preference(LDKChannelHandshakeLimits *this_ptr, bool val);
-       public static native void ChannelHandshakeLimits_set_force_announced_channel_preference(long this_ptr, boolean va);
+       public static native void ChannelHandshakeLimits_set_force_announced_channel_preference(long this_ptr, boolean val);
        /// uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const LDKChannelHandshakeLimits *this_ptr);
-       public static native long ChannelHandshakeLimits_get_their_to_self_delay(long this_ptr);
+       public static native short ChannelHandshakeLimits_get_their_to_self_delay(long this_ptr);
        /// void ChannelHandshakeLimits_set_their_to_self_delay(LDKChannelHandshakeLimits *this_ptr, uint16_t val);
-       public static native void ChannelHandshakeLimits_set_their_to_self_delay(long this_ptr, long val);
+       public static native void ChannelHandshakeLimits_set_their_to_self_delay(long this_ptr, short val);
        /// MUST_USE_RES LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
-       public static native long ChannelHandshakeLimits_new(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, long min_max_accepted_htlcs_arg, long min_dust_limit_satoshis_arg, long max_dust_limit_satoshis_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, long their_to_self_delay_arg);
+       public static native long ChannelHandshakeLimits_new(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, long min_dust_limit_satoshis_arg, long max_dust_limit_satoshis_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg);
        /// MUST_USE_RES LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
        public static native long ChannelHandshakeLimits_default();
        /// void ChannelConfig_free(LDKChannelConfig this_ptr);
@@ -355,11 +357,11 @@ public class bindings {
        /// bool ChannelConfig_get_announced_channel(const LDKChannelConfig *this_ptr);
        public static native boolean ChannelConfig_get_announced_channel(long this_ptr);
        /// void ChannelConfig_set_announced_channel(LDKChannelConfig *this_ptr, bool val);
-       public static native void ChannelConfig_set_announced_channel(long this_ptr, boolean va);
+       public static native void ChannelConfig_set_announced_channel(long this_ptr, boolean val);
        /// bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const LDKChannelConfig *this_ptr);
        public static native boolean ChannelConfig_get_commit_upfront_shutdown_pubkey(long this_ptr);
        /// void ChannelConfig_set_commit_upfront_shutdown_pubkey(LDKChannelConfig *this_ptr, bool val);
-       public static native void ChannelConfig_set_commit_upfront_shutdown_pubkey(long this_ptr, boolean va);
+       public static native void ChannelConfig_set_commit_upfront_shutdown_pubkey(long this_ptr, boolean val);
        /// MUST_USE_RES LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
        public static native long ChannelConfig_new(int fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg);
        /// MUST_USE_RES LDKChannelConfig ChannelConfig_default(void);
@@ -413,11 +415,11 @@ public class bindings {
        /// void BlockNotifier_register_listener(const LDKBlockNotifier *this_arg, LDKChainListener listener);
        public static native void BlockNotifier_register_listener(long this_arg, long listener);
        /// void BlockNotifier_block_connected(const LDKBlockNotifier *this_arg, LDKu8slice block, uint32_t height);
-       public static native void BlockNotifier_block_connected(long this_arg, long block, int heigh);
+       public static native void BlockNotifier_block_connected(long this_arg, long block, int height);
        /// MUST_USE_RES bool BlockNotifier_block_connected_checked(const LDKBlockNotifier *this_arg, const uint8_t (*header)[80], uint32_t height, LDKCVec_TransactionZ txn_matched, LDKusizeslice indexes_of_txn_matched);
-       public static native boolean BlockNotifier_block_connected_checked(long this_arg, byte[] header, int heigh, long txn_matched, long indexes_of_txn_matched);
+       public static native boolean BlockNotifier_block_connected_checked(long this_arg, byte[] header, int height, long txn_matched, long indexes_of_txn_matched);
        /// void BlockNotifier_block_disconnected(const LDKBlockNotifier *this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
-       public static native void BlockNotifier_block_disconnected(long this_arg, byte[] header, int disconnected_heigh);
+       public static native void BlockNotifier_block_disconnected(long this_arg, byte[] header, int disconnected_height);
        /// void ChainWatchInterfaceUtil_free(LDKChainWatchInterfaceUtil this_ptr);
        public static native void ChainWatchInterfaceUtil_free(long this_ptr);
        /// LDKChainWatchInterface ChainWatchInterfaceUtil_as_ChainWatchInterface(const LDKChainWatchInterfaceUtil *this_arg);
@@ -429,15 +431,15 @@ public class bindings {
        /// void OutPoint_free(LDKOutPoint this_ptr);
        public static native void OutPoint_free(long this_ptr);
        /// const uint8_t (*OutPoint_get_txid(const LDKOutPoint *this_ptr))[32];
-       public static native byte[]  OutPoint_get_txid(long this_ptr);
+       public static native byte[] OutPoint_get_txid(long this_ptr);
        /// void OutPoint_set_txid(LDKOutPoint *this_ptr, LDKThirtyTwoBytes val);
        public static native void OutPoint_set_txid(long this_ptr, long val);
        /// uint16_t OutPoint_get_index(const LDKOutPoint *this_ptr);
-       public static native long OutPoint_get_index(long this_ptr);
+       public static native short OutPoint_get_index(long this_ptr);
        /// void OutPoint_set_index(LDKOutPoint *this_ptr, uint16_t val);
-       public static native void OutPoint_set_index(long this_ptr, long val);
+       public static native void OutPoint_set_index(long this_ptr, short val);
        /// MUST_USE_RES LDKOutPoint OutPoint_new(LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
-       public static native long OutPoint_new(long txid_arg, long index_arg);
+       public static native long OutPoint_new(long txid_arg, short index_arg);
        /// MUST_USE_RES LDKThirtyTwoBytes OutPoint_to_channel_id(const LDKOutPoint *this_arg);
        public static native long OutPoint_to_channel_id(long this_arg);
        /// LDKCVec_u8Z OutPoint_write(const LDKOutPoint *obj);
@@ -453,27 +455,27 @@ public class bindings {
        /// void InMemoryChannelKeys_free(LDKInMemoryChannelKeys this_ptr);
        public static native void InMemoryChannelKeys_free(long this_ptr);
        /// const uint8_t (*InMemoryChannelKeys_get_funding_key(const LDKInMemoryChannelKeys *this_ptr))[32];
-       public static native byte[]  InMemoryChannelKeys_get_funding_key(long this_ptr);
+       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);
        /// 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);
+       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);
        /// const uint8_t (*InMemoryChannelKeys_get_payment_key(const LDKInMemoryChannelKeys *this_ptr))[32];
-       public static native byte[]  InMemoryChannelKeys_get_payment_key(long this_ptr);
+       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);
        /// 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);
+       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);
        /// 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);
+       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);
        /// const uint8_t (*InMemoryChannelKeys_get_commitment_seed(const LDKInMemoryChannelKeys *this_ptr))[32];
-       public static native byte[]  InMemoryChannelKeys_get_commitment_seed(long this_ptr);
+       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, long 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);
@@ -481,9 +483,9 @@ public class bindings {
        /// MUST_USE_RES LDKChannelPublicKeys InMemoryChannelKeys_remote_pubkeys(const LDKInMemoryChannelKeys *this_arg);
        public static native long InMemoryChannelKeys_remote_pubkeys(long this_arg);
        /// MUST_USE_RES uint16_t InMemoryChannelKeys_remote_to_self_delay(const LDKInMemoryChannelKeys *this_arg);
-       public static native long InMemoryChannelKeys_remote_to_self_delay(long this_arg);
+       public static native short InMemoryChannelKeys_remote_to_self_delay(long this_arg);
        /// MUST_USE_RES uint16_t InMemoryChannelKeys_local_to_self_delay(const LDKInMemoryChannelKeys *this_arg);
-       public static native long InMemoryChannelKeys_local_to_self_delay(long this_arg);
+       public static native short InMemoryChannelKeys_local_to_self_delay(long this_arg);
        /// LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const LDKInMemoryChannelKeys *this_arg);
        public static native long InMemoryChannelKeys_as_ChannelKeys(long this_arg);
        /// LDKCVec_u8Z InMemoryChannelKeys_write(const LDKInMemoryChannelKeys *obj);
@@ -503,7 +505,7 @@ public class bindings {
        /// void ChannelDetails_free(LDKChannelDetails this_ptr);
        public static native void ChannelDetails_free(long this_ptr);
        /// const uint8_t (*ChannelDetails_get_channel_id(const LDKChannelDetails *this_ptr))[32];
-       public static native byte[]  ChannelDetails_get_channel_id(long this_ptr);
+       public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
        /// void ChannelDetails_set_channel_id(LDKChannelDetails *this_ptr, LDKThirtyTwoBytes val);
        public static native void ChannelDetails_set_channel_id(long this_ptr, long val);
        /// LDKPublicKey ChannelDetails_get_remote_network_id(const LDKChannelDetails *this_ptr);
@@ -533,13 +535,13 @@ public class bindings {
        /// bool ChannelDetails_get_is_live(const LDKChannelDetails *this_ptr);
        public static native boolean ChannelDetails_get_is_live(long this_ptr);
        /// void ChannelDetails_set_is_live(LDKChannelDetails *this_ptr, bool val);
-       public static native void ChannelDetails_set_is_live(long this_ptr, boolean va);
+       public static native void ChannelDetails_set_is_live(long this_ptr, boolean val);
        /// void PaymentSendFailure_free(LDKPaymentSendFailure this_ptr);
        public static native void PaymentSendFailure_free(long this_ptr);
        /// MUST_USE_RES LDKChannelManager ChannelManager_new(LDKNetwork network, LDKFeeEstimator fee_est, LDKManyChannelMonitor monitor, LDKBroadcasterInterface tx_broadcaster, LDKLogger logger, LDKKeysInterface keys_manager, LDKUserConfig config, uintptr_t current_blockchain_height);
        public static native long ChannelManager_new(long network, long fee_est, long 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_msa, long ser_id, long 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);
        /// 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);
@@ -563,7 +565,7 @@ public class bindings {
        /// MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const LDKChannelManager *this_arg, const uint8_t (*payment_hash)[32], LDKThirtyTwoBytes payment_secret);
        public static native boolean ChannelManager_fail_htlc_backwards(long this_arg, byte[] payment_hash, long payment_secret);
        /// 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, long payment_preimage, long payment_secret, long expected_amo);
+       public static native boolean ChannelManager_claim_funds(long this_arg, long payment_preimage, long 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);
        /// void ChannelManager_channel_monitor_updated(const LDKChannelManager *this_arg, const LDKOutPoint *funding_txo, uint64_t highest_applied_update_id);
@@ -647,7 +649,7 @@ public class bindings {
        /// void ErrorMessage_free(LDKErrorMessage this_ptr);
        public static native void ErrorMessage_free(long this_ptr);
        /// const uint8_t (*ErrorMessage_get_channel_id(const LDKErrorMessage *this_ptr))[32];
-       public static native byte[]  ErrorMessage_get_channel_id(long this_ptr);
+       public static native byte[] ErrorMessage_get_channel_id(long this_ptr);
        /// void ErrorMessage_set_channel_id(LDKErrorMessage *this_ptr, LDKThirtyTwoBytes val);
        public static native void ErrorMessage_set_channel_id(long this_ptr, long val);
        /// LDKStr ErrorMessage_get_data(const LDKErrorMessage *this_ptr);
@@ -659,31 +661,31 @@ public class bindings {
        /// void Ping_free(LDKPing this_ptr);
        public static native void Ping_free(long this_ptr);
        /// uint16_t Ping_get_ponglen(const LDKPing *this_ptr);
-       public static native long Ping_get_ponglen(long this_ptr);
+       public static native short Ping_get_ponglen(long this_ptr);
        /// void Ping_set_ponglen(LDKPing *this_ptr, uint16_t val);
-       public static native void Ping_set_ponglen(long this_ptr, long val);
+       public static native void Ping_set_ponglen(long this_ptr, short val);
        /// uint16_t Ping_get_byteslen(const LDKPing *this_ptr);
-       public static native long Ping_get_byteslen(long this_ptr);
+       public static native short Ping_get_byteslen(long this_ptr);
        /// void Ping_set_byteslen(LDKPing *this_ptr, uint16_t val);
-       public static native void Ping_set_byteslen(long this_ptr, long val);
+       public static native void Ping_set_byteslen(long this_ptr, short val);
        /// MUST_USE_RES LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
-       public static native long Ping_new(long ponglen_arg, long byteslen_arg);
+       public static native long Ping_new(short ponglen_arg, short byteslen_arg);
        /// void Pong_free(LDKPong this_ptr);
        public static native void Pong_free(long this_ptr);
        /// uint16_t Pong_get_byteslen(const LDKPong *this_ptr);
-       public static native long Pong_get_byteslen(long this_ptr);
+       public static native short Pong_get_byteslen(long this_ptr);
        /// void Pong_set_byteslen(LDKPong *this_ptr, uint16_t val);
-       public static native void Pong_set_byteslen(long this_ptr, long val);
+       public static native void Pong_set_byteslen(long this_ptr, short val);
        /// MUST_USE_RES LDKPong Pong_new(uint16_t byteslen_arg);
-       public static native long Pong_new(long byteslen_arg);
+       public static native long Pong_new(short byteslen_arg);
        /// void OpenChannel_free(LDKOpenChannel this_ptr);
        public static native void OpenChannel_free(long this_ptr);
        /// const uint8_t (*OpenChannel_get_chain_hash(const LDKOpenChannel *this_ptr))[32];
-       public static native byte[]  OpenChannel_get_chain_hash(long this_ptr);
+       public static native byte[] OpenChannel_get_chain_hash(long this_ptr);
        /// void OpenChannel_set_chain_hash(LDKOpenChannel *this_ptr, LDKThirtyTwoBytes val);
        public static native void OpenChannel_set_chain_hash(long this_ptr, long val);
        /// const uint8_t (*OpenChannel_get_temporary_channel_id(const LDKOpenChannel *this_ptr))[32];
-       public static native byte[]  OpenChannel_get_temporary_channel_id(long this_ptr);
+       public static native byte[] OpenChannel_get_temporary_channel_id(long this_ptr);
        /// void OpenChannel_set_temporary_channel_id(LDKOpenChannel *this_ptr, LDKThirtyTwoBytes val);
        public static native void OpenChannel_set_temporary_channel_id(long this_ptr, long val);
        /// uint64_t OpenChannel_get_funding_satoshis(const LDKOpenChannel *this_ptr);
@@ -715,13 +717,13 @@ public class bindings {
        /// void OpenChannel_set_feerate_per_kw(LDKOpenChannel *this_ptr, uint32_t val);
        public static native void OpenChannel_set_feerate_per_kw(long this_ptr, int val);
        /// uint16_t OpenChannel_get_to_self_delay(const LDKOpenChannel *this_ptr);
-       public static native long OpenChannel_get_to_self_delay(long this_ptr);
+       public static native short OpenChannel_get_to_self_delay(long this_ptr);
        /// void OpenChannel_set_to_self_delay(LDKOpenChannel *this_ptr, uint16_t val);
-       public static native void OpenChannel_set_to_self_delay(long this_ptr, long val);
+       public static native void OpenChannel_set_to_self_delay(long this_ptr, short val);
        /// uint16_t OpenChannel_get_max_accepted_htlcs(const LDKOpenChannel *this_ptr);
-       public static native long OpenChannel_get_max_accepted_htlcs(long this_ptr);
+       public static native short OpenChannel_get_max_accepted_htlcs(long this_ptr);
        /// void OpenChannel_set_max_accepted_htlcs(LDKOpenChannel *this_ptr, uint16_t val);
-       public static native void OpenChannel_set_max_accepted_htlcs(long this_ptr, long 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);
        /// void OpenChannel_set_funding_pubkey(LDKOpenChannel *this_ptr, LDKPublicKey val);
@@ -753,7 +755,7 @@ public class bindings {
        /// void AcceptChannel_free(LDKAcceptChannel this_ptr);
        public static native void AcceptChannel_free(long this_ptr);
        /// 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);
+       public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr);
        /// void AcceptChannel_set_temporary_channel_id(LDKAcceptChannel *this_ptr, LDKThirtyTwoBytes val);
        public static native void AcceptChannel_set_temporary_channel_id(long this_ptr, long val);
        /// uint64_t AcceptChannel_get_dust_limit_satoshis(const LDKAcceptChannel *this_ptr);
@@ -777,13 +779,13 @@ public class bindings {
        /// void AcceptChannel_set_minimum_depth(LDKAcceptChannel *this_ptr, uint32_t val);
        public static native void AcceptChannel_set_minimum_depth(long this_ptr, int val);
        /// uint16_t AcceptChannel_get_to_self_delay(const LDKAcceptChannel *this_ptr);
-       public static native long AcceptChannel_get_to_self_delay(long this_ptr);
+       public static native short AcceptChannel_get_to_self_delay(long this_ptr);
        /// void AcceptChannel_set_to_self_delay(LDKAcceptChannel *this_ptr, uint16_t val);
-       public static native void AcceptChannel_set_to_self_delay(long this_ptr, long val);
+       public static native void AcceptChannel_set_to_self_delay(long this_ptr, short val);
        /// uint16_t AcceptChannel_get_max_accepted_htlcs(const LDKAcceptChannel *this_ptr);
-       public static native long AcceptChannel_get_max_accepted_htlcs(long this_ptr);
+       public static native short AcceptChannel_get_max_accepted_htlcs(long this_ptr);
        /// void AcceptChannel_set_max_accepted_htlcs(LDKAcceptChannel *this_ptr, uint16_t val);
-       public static native void AcceptChannel_set_max_accepted_htlcs(long this_ptr, long 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);
        /// void AcceptChannel_set_funding_pubkey(LDKAcceptChannel *this_ptr, LDKPublicKey val);
@@ -811,27 +813,27 @@ public class bindings {
        /// void FundingCreated_free(LDKFundingCreated this_ptr);
        public static native void FundingCreated_free(long this_ptr);
        /// 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);
+       public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);
        /// void FundingCreated_set_temporary_channel_id(LDKFundingCreated *this_ptr, LDKThirtyTwoBytes val);
        public static native void FundingCreated_set_temporary_channel_id(long this_ptr, long val);
        /// const uint8_t (*FundingCreated_get_funding_txid(const LDKFundingCreated *this_ptr))[32];
-       public static native byte[]  FundingCreated_get_funding_txid(long this_ptr);
+       public static native byte[] FundingCreated_get_funding_txid(long this_ptr);
        /// void FundingCreated_set_funding_txid(LDKFundingCreated *this_ptr, LDKThirtyTwoBytes val);
        public static native void FundingCreated_set_funding_txid(long this_ptr, long val);
        /// uint16_t FundingCreated_get_funding_output_index(const LDKFundingCreated *this_ptr);
-       public static native long FundingCreated_get_funding_output_index(long this_ptr);
+       public static native short FundingCreated_get_funding_output_index(long this_ptr);
        /// void FundingCreated_set_funding_output_index(LDKFundingCreated *this_ptr, uint16_t val);
-       public static native void FundingCreated_set_funding_output_index(long this_ptr, long val);
+       public static native void FundingCreated_set_funding_output_index(long this_ptr, short val);
        /// LDKSignature FundingCreated_get_signature(const LDKFundingCreated *this_ptr);
        public static native long FundingCreated_get_signature(long this_ptr);
        /// void FundingCreated_set_signature(LDKFundingCreated *this_ptr, LDKSignature val);
        public static native void FundingCreated_set_signature(long this_ptr, long val);
        /// MUST_USE_RES LDKFundingCreated FundingCreated_new(LDKThirtyTwoBytes temporary_channel_id_arg, LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, LDKSignature signature_arg);
-       public static native long FundingCreated_new(long temporary_channel_id_arg, long funding_txid_arg, long funding_output_index_arg, long signature_arg);
+       public static native long FundingCreated_new(long temporary_channel_id_arg, long 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);
        /// const uint8_t (*FundingSigned_get_channel_id(const LDKFundingSigned *this_ptr))[32];
-       public static native byte[]  FundingSigned_get_channel_id(long this_ptr);
+       public static native byte[] FundingSigned_get_channel_id(long this_ptr);
        /// void FundingSigned_set_channel_id(LDKFundingSigned *this_ptr, LDKThirtyTwoBytes val);
        public static native void FundingSigned_set_channel_id(long this_ptr, long val);
        /// LDKSignature FundingSigned_get_signature(const LDKFundingSigned *this_ptr);
@@ -843,7 +845,7 @@ public class bindings {
        /// void FundingLocked_free(LDKFundingLocked this_ptr);
        public static native void FundingLocked_free(long this_ptr);
        /// const uint8_t (*FundingLocked_get_channel_id(const LDKFundingLocked *this_ptr))[32];
-       public static native byte[]  FundingLocked_get_channel_id(long this_ptr);
+       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, long val);
        /// LDKPublicKey FundingLocked_get_next_per_commitment_point(const LDKFundingLocked *this_ptr);
@@ -855,7 +857,7 @@ public class bindings {
        /// void Shutdown_free(LDKShutdown this_ptr);
        public static native void Shutdown_free(long this_ptr);
        /// const uint8_t (*Shutdown_get_channel_id(const LDKShutdown *this_ptr))[32];
-       public static native byte[]  Shutdown_get_channel_id(long this_ptr);
+       public static native byte[] Shutdown_get_channel_id(long this_ptr);
        /// void Shutdown_set_channel_id(LDKShutdown *this_ptr, LDKThirtyTwoBytes val);
        public static native void Shutdown_set_channel_id(long this_ptr, long val);
        /// LDKu8slice Shutdown_get_scriptpubkey(const LDKShutdown *this_ptr);
@@ -867,7 +869,7 @@ public class bindings {
        /// void ClosingSigned_free(LDKClosingSigned this_ptr);
        public static native void ClosingSigned_free(long this_ptr);
        /// const uint8_t (*ClosingSigned_get_channel_id(const LDKClosingSigned *this_ptr))[32];
-       public static native byte[]  ClosingSigned_get_channel_id(long this_ptr);
+       public static native byte[] ClosingSigned_get_channel_id(long this_ptr);
        /// void ClosingSigned_set_channel_id(LDKClosingSigned *this_ptr, LDKThirtyTwoBytes val);
        public static native void ClosingSigned_set_channel_id(long this_ptr, long val);
        /// uint64_t ClosingSigned_get_fee_satoshis(const LDKClosingSigned *this_ptr);
@@ -883,7 +885,7 @@ public class bindings {
        /// void UpdateAddHTLC_free(LDKUpdateAddHTLC this_ptr);
        public static native void UpdateAddHTLC_free(long this_ptr);
        /// const uint8_t (*UpdateAddHTLC_get_channel_id(const LDKUpdateAddHTLC *this_ptr))[32];
-       public static native byte[]  UpdateAddHTLC_get_channel_id(long this_ptr);
+       public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr);
        /// void UpdateAddHTLC_set_channel_id(LDKUpdateAddHTLC *this_ptr, LDKThirtyTwoBytes val);
        public static native void UpdateAddHTLC_set_channel_id(long this_ptr, long val);
        /// uint64_t UpdateAddHTLC_get_htlc_id(const LDKUpdateAddHTLC *this_ptr);
@@ -895,7 +897,7 @@ public class bindings {
        /// void UpdateAddHTLC_set_amount_msat(LDKUpdateAddHTLC *this_ptr, uint64_t val);
        public static native void UpdateAddHTLC_set_amount_msat(long this_ptr, long val);
        /// const uint8_t (*UpdateAddHTLC_get_payment_hash(const LDKUpdateAddHTLC *this_ptr))[32];
-       public static native byte[]  UpdateAddHTLC_get_payment_hash(long this_ptr);
+       public static native byte[] UpdateAddHTLC_get_payment_hash(long this_ptr);
        /// void UpdateAddHTLC_set_payment_hash(LDKUpdateAddHTLC *this_ptr, LDKThirtyTwoBytes val);
        public static native void UpdateAddHTLC_set_payment_hash(long this_ptr, long val);
        /// uint32_t UpdateAddHTLC_get_cltv_expiry(const LDKUpdateAddHTLC *this_ptr);
@@ -905,7 +907,7 @@ public class bindings {
        /// void UpdateFulfillHTLC_free(LDKUpdateFulfillHTLC this_ptr);
        public static native void UpdateFulfillHTLC_free(long this_ptr);
        /// const uint8_t (*UpdateFulfillHTLC_get_channel_id(const LDKUpdateFulfillHTLC *this_ptr))[32];
-       public static native byte[]  UpdateFulfillHTLC_get_channel_id(long this_ptr);
+       public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);
        /// void UpdateFulfillHTLC_set_channel_id(LDKUpdateFulfillHTLC *this_ptr, LDKThirtyTwoBytes val);
        public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, long val);
        /// uint64_t UpdateFulfillHTLC_get_htlc_id(const LDKUpdateFulfillHTLC *this_ptr);
@@ -913,7 +915,7 @@ public class bindings {
        /// void UpdateFulfillHTLC_set_htlc_id(LDKUpdateFulfillHTLC *this_ptr, uint64_t val);
        public static native void UpdateFulfillHTLC_set_htlc_id(long this_ptr, long val);
        /// const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const LDKUpdateFulfillHTLC *this_ptr))[32];
-       public static native byte[]  UpdateFulfillHTLC_get_payment_preimage(long this_ptr);
+       public static native byte[] UpdateFulfillHTLC_get_payment_preimage(long this_ptr);
        /// void UpdateFulfillHTLC_set_payment_preimage(LDKUpdateFulfillHTLC *this_ptr, LDKThirtyTwoBytes val);
        public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, long val);
        /// MUST_USE_RES LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, LDKThirtyTwoBytes payment_preimage_arg);
@@ -921,7 +923,7 @@ public class bindings {
        /// void UpdateFailHTLC_free(LDKUpdateFailHTLC this_ptr);
        public static native void UpdateFailHTLC_free(long this_ptr);
        /// const uint8_t (*UpdateFailHTLC_get_channel_id(const LDKUpdateFailHTLC *this_ptr))[32];
-       public static native byte[]  UpdateFailHTLC_get_channel_id(long this_ptr);
+       public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr);
        /// void UpdateFailHTLC_set_channel_id(LDKUpdateFailHTLC *this_ptr, LDKThirtyTwoBytes val);
        public static native void UpdateFailHTLC_set_channel_id(long this_ptr, long val);
        /// uint64_t UpdateFailHTLC_get_htlc_id(const LDKUpdateFailHTLC *this_ptr);
@@ -931,7 +933,7 @@ public class bindings {
        /// void UpdateFailMalformedHTLC_free(LDKUpdateFailMalformedHTLC this_ptr);
        public static native void UpdateFailMalformedHTLC_free(long this_ptr);
        /// const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const LDKUpdateFailMalformedHTLC *this_ptr))[32];
-       public static native byte[]  UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
+       public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
        /// void UpdateFailMalformedHTLC_set_channel_id(LDKUpdateFailMalformedHTLC *this_ptr, LDKThirtyTwoBytes val);
        public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, long val);
        /// uint64_t UpdateFailMalformedHTLC_get_htlc_id(const LDKUpdateFailMalformedHTLC *this_ptr);
@@ -939,13 +941,13 @@ public class bindings {
        /// void UpdateFailMalformedHTLC_set_htlc_id(LDKUpdateFailMalformedHTLC *this_ptr, uint64_t val);
        public static native void UpdateFailMalformedHTLC_set_htlc_id(long this_ptr, long val);
        /// uint16_t UpdateFailMalformedHTLC_get_failure_code(const LDKUpdateFailMalformedHTLC *this_ptr);
-       public static native long UpdateFailMalformedHTLC_get_failure_code(long this_ptr);
+       public static native short UpdateFailMalformedHTLC_get_failure_code(long this_ptr);
        /// void UpdateFailMalformedHTLC_set_failure_code(LDKUpdateFailMalformedHTLC *this_ptr, uint16_t val);
-       public static native void UpdateFailMalformedHTLC_set_failure_code(long this_ptr, long val);
+       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);
        /// const uint8_t (*CommitmentSigned_get_channel_id(const LDKCommitmentSigned *this_ptr))[32];
-       public static native byte[]  CommitmentSigned_get_channel_id(long this_ptr);
+       public static native byte[] CommitmentSigned_get_channel_id(long this_ptr);
        /// void CommitmentSigned_set_channel_id(LDKCommitmentSigned *this_ptr, LDKThirtyTwoBytes val);
        public static native void CommitmentSigned_set_channel_id(long this_ptr, long val);
        /// LDKSignature CommitmentSigned_get_signature(const LDKCommitmentSigned *this_ptr);
@@ -959,11 +961,11 @@ public class bindings {
        /// void RevokeAndACK_free(LDKRevokeAndACK this_ptr);
        public static native void RevokeAndACK_free(long this_ptr);
        /// const uint8_t (*RevokeAndACK_get_channel_id(const LDKRevokeAndACK *this_ptr))[32];
-       public static native byte[]  RevokeAndACK_get_channel_id(long this_ptr);
+       public static native byte[] RevokeAndACK_get_channel_id(long this_ptr);
        /// void RevokeAndACK_set_channel_id(LDKRevokeAndACK *this_ptr, LDKThirtyTwoBytes val);
        public static native void RevokeAndACK_set_channel_id(long this_ptr, long val);
        /// const uint8_t (*RevokeAndACK_get_per_commitment_secret(const LDKRevokeAndACK *this_ptr))[32];
-       public static native byte[]  RevokeAndACK_get_per_commitment_secret(long this_ptr);
+       public static native byte[] RevokeAndACK_get_per_commitment_secret(long this_ptr);
        /// void RevokeAndACK_set_per_commitment_secret(LDKRevokeAndACK *this_ptr, LDKThirtyTwoBytes val);
        public static native void RevokeAndACK_set_per_commitment_secret(long this_ptr, long val);
        /// LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const LDKRevokeAndACK *this_ptr);
@@ -975,7 +977,7 @@ public class bindings {
        /// void UpdateFee_free(LDKUpdateFee this_ptr);
        public static native void UpdateFee_free(long this_ptr);
        /// const uint8_t (*UpdateFee_get_channel_id(const LDKUpdateFee *this_ptr))[32];
-       public static native byte[]  UpdateFee_get_channel_id(long this_ptr);
+       public static native byte[] UpdateFee_get_channel_id(long this_ptr);
        /// void UpdateFee_set_channel_id(LDKUpdateFee *this_ptr, LDKThirtyTwoBytes val);
        public static native void UpdateFee_set_channel_id(long this_ptr, long val);
        /// uint32_t UpdateFee_get_feerate_per_kw(const LDKUpdateFee *this_ptr);
@@ -987,7 +989,7 @@ public class bindings {
        /// void DataLossProtect_free(LDKDataLossProtect this_ptr);
        public static native void DataLossProtect_free(long this_ptr);
        /// 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);
+       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, long val);
        /// LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const LDKDataLossProtect *this_ptr);
@@ -999,7 +1001,7 @@ public class bindings {
        /// void ChannelReestablish_free(LDKChannelReestablish this_ptr);
        public static native void ChannelReestablish_free(long this_ptr);
        /// const uint8_t (*ChannelReestablish_get_channel_id(const LDKChannelReestablish *this_ptr))[32];
-       public static native byte[]  ChannelReestablish_get_channel_id(long this_ptr);
+       public static native byte[] ChannelReestablish_get_channel_id(long this_ptr);
        /// void ChannelReestablish_set_channel_id(LDKChannelReestablish *this_ptr, LDKThirtyTwoBytes val);
        public static native void ChannelReestablish_set_channel_id(long this_ptr, long val);
        /// uint64_t ChannelReestablish_get_next_local_commitment_number(const LDKChannelReestablish *this_ptr);
@@ -1013,7 +1015,7 @@ public class bindings {
        /// void AnnouncementSignatures_free(LDKAnnouncementSignatures this_ptr);
        public static native void AnnouncementSignatures_free(long this_ptr);
        /// const uint8_t (*AnnouncementSignatures_get_channel_id(const LDKAnnouncementSignatures *this_ptr))[32];
-       public static native byte[]  AnnouncementSignatures_get_channel_id(long this_ptr);
+       public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr);
        /// void AnnouncementSignatures_set_channel_id(LDKAnnouncementSignatures *this_ptr, LDKThirtyTwoBytes val);
        public static native void AnnouncementSignatures_set_channel_id(long this_ptr, long val);
        /// uint64_t AnnouncementSignatures_get_short_channel_id(const LDKAnnouncementSignatures *this_ptr);
@@ -1043,11 +1045,11 @@ public class bindings {
        /// void UnsignedNodeAnnouncement_set_node_id(LDKUnsignedNodeAnnouncement *this_ptr, LDKPublicKey val);
        public static native void UnsignedNodeAnnouncement_set_node_id(long this_ptr, long val);
        /// const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const LDKUnsignedNodeAnnouncement *this_ptr))[3];
-       public static native byte[]  UnsignedNodeAnnouncement_get_rgb(long this_ptr);
+       public static native byte[] UnsignedNodeAnnouncement_get_rgb(long this_ptr);
        /// void UnsignedNodeAnnouncement_set_rgb(LDKUnsignedNodeAnnouncement *this_ptr, LDKThreeBytes val);
        public static native void UnsignedNodeAnnouncement_set_rgb(long this_ptr, long val);
        /// const uint8_t (*UnsignedNodeAnnouncement_get_alias(const LDKUnsignedNodeAnnouncement *this_ptr))[32];
-       public static native byte[]  UnsignedNodeAnnouncement_get_alias(long this_ptr);
+       public static native byte[] UnsignedNodeAnnouncement_get_alias(long this_ptr);
        /// void UnsignedNodeAnnouncement_set_alias(LDKUnsignedNodeAnnouncement *this_ptr, LDKThirtyTwoBytes val);
        public static native void UnsignedNodeAnnouncement_set_alias(long this_ptr, long val);
        /// void UnsignedNodeAnnouncement_set_addresses(LDKUnsignedNodeAnnouncement *this_ptr, LDKCVec_NetAddressZ val);
@@ -1067,7 +1069,7 @@ public class bindings {
        /// void UnsignedChannelAnnouncement_free(LDKUnsignedChannelAnnouncement this_ptr);
        public static native void UnsignedChannelAnnouncement_free(long this_ptr);
        /// const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const LDKUnsignedChannelAnnouncement *this_ptr))[32];
-       public static native byte[]  UnsignedChannelAnnouncement_get_chain_hash(long this_ptr);
+       public static native byte[] UnsignedChannelAnnouncement_get_chain_hash(long this_ptr);
        /// void UnsignedChannelAnnouncement_set_chain_hash(LDKUnsignedChannelAnnouncement *this_ptr, LDKThirtyTwoBytes val);
        public static native void UnsignedChannelAnnouncement_set_chain_hash(long this_ptr, long val);
        /// uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const LDKUnsignedChannelAnnouncement *this_ptr);
@@ -1117,7 +1119,7 @@ public class bindings {
        /// void UnsignedChannelUpdate_free(LDKUnsignedChannelUpdate this_ptr);
        public static native void UnsignedChannelUpdate_free(long this_ptr);
        /// const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const LDKUnsignedChannelUpdate *this_ptr))[32];
-       public static native byte[]  UnsignedChannelUpdate_get_chain_hash(long this_ptr);
+       public static native byte[] UnsignedChannelUpdate_get_chain_hash(long this_ptr);
        /// void UnsignedChannelUpdate_set_chain_hash(LDKUnsignedChannelUpdate *this_ptr, LDKThirtyTwoBytes val);
        public static native void UnsignedChannelUpdate_set_chain_hash(long this_ptr, long val);
        /// uint64_t UnsignedChannelUpdate_get_short_channel_id(const LDKUnsignedChannelUpdate *this_ptr);
@@ -1133,9 +1135,9 @@ public class bindings {
        /// void UnsignedChannelUpdate_set_flags(LDKUnsignedChannelUpdate *this_ptr, uint8_t val);
        public static native void UnsignedChannelUpdate_set_flags(long this_ptr, byte val);
        /// uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const LDKUnsignedChannelUpdate *this_ptr);
-       public static native long UnsignedChannelUpdate_get_cltv_expiry_delta(long this_ptr);
+       public static native short UnsignedChannelUpdate_get_cltv_expiry_delta(long this_ptr);
        /// void UnsignedChannelUpdate_set_cltv_expiry_delta(LDKUnsignedChannelUpdate *this_ptr, uint16_t val);
-       public static native void UnsignedChannelUpdate_set_cltv_expiry_delta(long this_ptr, long val);
+       public static native void UnsignedChannelUpdate_set_cltv_expiry_delta(long this_ptr, short val);
        /// uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const LDKUnsignedChannelUpdate *this_ptr);
        public static native long UnsignedChannelUpdate_get_htlc_minimum_msat(long this_ptr);
        /// void UnsignedChannelUpdate_set_htlc_minimum_msat(LDKUnsignedChannelUpdate *this_ptr, uint64_t val);
@@ -1323,7 +1325,7 @@ public class bindings {
        /// bool PeerHandleError_get_no_connection_possible(const LDKPeerHandleError *this_ptr);
        public static native boolean PeerHandleError_get_no_connection_possible(long this_ptr);
        /// void PeerHandleError_set_no_connection_possible(LDKPeerHandleError *this_ptr, bool val);
-       public static native void PeerHandleError_set_no_connection_possible(long this_ptr, boolean va);
+       public static native void PeerHandleError_set_no_connection_possible(long this_ptr, boolean val);
        /// MUST_USE_RES LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
        public static native long PeerHandleError_new(boolean no_connection_possible_arg);
        /// void PeerManager_free(LDKPeerManager this_ptr);
@@ -1347,7 +1349,7 @@ public class bindings {
        /// void PeerManager_timer_tick_occured(const LDKPeerManager *this_arg);
        public static native void PeerManager_timer_tick_occured(long this_arg);
        /// LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
-       public static native long build_commitment_secret(byte[] commitment_seed, long dx);
+       public static native long build_commitment_secret(byte[] commitment_seed, long idx);
        /// void TxCreationKeys_free(LDKTxCreationKeys this_ptr);
        public static native void TxCreationKeys_free(long this_ptr);
        /// LDKPublicKey TxCreationKeys_get_per_commitment_point(const LDKTxCreationKeys *this_ptr);
@@ -1415,13 +1417,13 @@ public class bindings {
        /// MUST_USE_RES LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(LDKPublicKey per_commitment_point, LDKPublicKey a_delayed_payment_base, LDKPublicKey a_htlc_base, LDKPublicKey b_revocation_base, LDKPublicKey b_htlc_base);
        public static native long TxCreationKeys_derive_new(long per_commitment_point, long a_delayed_payment_base, long a_htlc_base, long b_revocation_base, long b_htlc_base);
        /// LDKCVec_u8Z get_revokeable_redeemscript(LDKPublicKey revocation_key, uint16_t to_self_delay, LDKPublicKey delayed_payment_key);
-       public static native long get_revokeable_redeemscript(long revocation_key, long to_self_delay, long delayed_payment_key);
+       public static native long get_revokeable_redeemscript(long revocation_key, short to_self_delay, long delayed_payment_key);
        /// void HTLCOutputInCommitment_free(LDKHTLCOutputInCommitment this_ptr);
        public static native void HTLCOutputInCommitment_free(long this_ptr);
        /// 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);
-       public static native void HTLCOutputInCommitment_set_offered(long this_ptr, boolean va);
+       public static native void HTLCOutputInCommitment_set_offered(long this_ptr, boolean val);
        /// uint64_t HTLCOutputInCommitment_get_amount_msat(const LDKHTLCOutputInCommitment *this_ptr);
        public static native long HTLCOutputInCommitment_get_amount_msat(long this_ptr);
        /// void HTLCOutputInCommitment_set_amount_msat(LDKHTLCOutputInCommitment *this_ptr, uint64_t val);
@@ -1431,7 +1433,7 @@ public class bindings {
        /// void HTLCOutputInCommitment_set_cltv_expiry(LDKHTLCOutputInCommitment *this_ptr, uint32_t val);
        public static native void HTLCOutputInCommitment_set_cltv_expiry(long this_ptr, int val);
        /// const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const LDKHTLCOutputInCommitment *this_ptr))[32];
-       public static native byte[]  HTLCOutputInCommitment_get_payment_hash(long this_ptr);
+       public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);
        /// void HTLCOutputInCommitment_set_payment_hash(LDKHTLCOutputInCommitment *this_ptr, LDKThirtyTwoBytes val);
        public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, long val);
        /// LDKCVec_u8Z HTLCOutputInCommitment_write(const LDKHTLCOutputInCommitment *obj);
@@ -1443,7 +1445,7 @@ public class bindings {
        /// LDKCVec_u8Z make_funding_redeemscript(LDKPublicKey a, LDKPublicKey b);
        public static native long make_funding_redeemscript(long a, long b);
        /// LDKCVec_u8Z build_htlc_transaction(const uint8_t (*prev_hash)[32], uint32_t feerate_per_kw, uint16_t to_self_delay, const LDKHTLCOutputInCommitment *htlc, LDKPublicKey a_delayed_payment_key, LDKPublicKey revocation_key);
-       public static native long build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, long to_self_delay, long htlc, long a_delayed_payment_key, long revocation_key);
+       public static native long build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, short to_self_delay, long htlc, long a_delayed_payment_key, long revocation_key);
        /// void LocalCommitmentTransaction_free(LDKLocalCommitmentTransaction this_ptr);
        public static native void LocalCommitmentTransaction_free(long this_ptr);
        /// LDKCVec_u8Z LocalCommitmentTransaction_get_unsigned_tx(const LDKLocalCommitmentTransaction *this_ptr);
@@ -1469,7 +1471,7 @@ public class bindings {
        /// MUST_USE_RES LDKSignature LocalCommitmentTransaction_get_local_sig(const LDKLocalCommitmentTransaction *this_arg, const uint8_t (*funding_key)[32], LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
        public static native long LocalCommitmentTransaction_get_local_sig(long this_arg, byte[] funding_key, long funding_redeemscript, long channel_value_satoshis);
        /// MUST_USE_RES LDKCResult_CVec_SignatureZNoneZ LocalCommitmentTransaction_get_htlc_sigs(const LDKLocalCommitmentTransaction *this_arg, const uint8_t (*htlc_base_key)[32], uint16_t local_csv);
-       public static native long LocalCommitmentTransaction_get_htlc_sigs(long this_arg, byte[] htlc_base_key, long local_csv);
+       public static native long LocalCommitmentTransaction_get_htlc_sigs(long this_arg, byte[] htlc_base_key, short local_csv);
        /// LDKCVec_u8Z LocalCommitmentTransaction_write(const LDKLocalCommitmentTransaction *obj);
        public static native long LocalCommitmentTransaction_write(long obj);
        /// LDKLocalCommitmentTransaction LocalCommitmentTransaction_read(LDKu8slice ser);
@@ -1523,17 +1525,17 @@ public class bindings {
        /// void RouteHint_set_fees(LDKRouteHint *this_ptr, LDKRoutingFees val);
        public static native void RouteHint_set_fees(long this_ptr, long val);
        /// uint16_t RouteHint_get_cltv_expiry_delta(const LDKRouteHint *this_ptr);
-       public static native long RouteHint_get_cltv_expiry_delta(long this_ptr);
+       public static native short RouteHint_get_cltv_expiry_delta(long this_ptr);
        /// void RouteHint_set_cltv_expiry_delta(LDKRouteHint *this_ptr, uint16_t val);
-       public static native void RouteHint_set_cltv_expiry_delta(long this_ptr, long val);
+       public static native void RouteHint_set_cltv_expiry_delta(long this_ptr, short val);
        /// uint64_t RouteHint_get_htlc_minimum_msat(const LDKRouteHint *this_ptr);
        public static native long RouteHint_get_htlc_minimum_msat(long this_ptr);
        /// 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, long cltv_expiry_delta_arg, long 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);
        /// 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_msa, int final_cltv, long 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);
        /// void NetworkGraph_free(LDKNetworkGraph this_ptr);
        public static native void NetworkGraph_free(long this_ptr);
        /// void LockedNetworkGraph_free(LDKLockedNetworkGraph this_ptr);
@@ -1559,11 +1561,11 @@ public class bindings {
        /// bool DirectionalChannelInfo_get_enabled(const LDKDirectionalChannelInfo *this_ptr);
        public static native boolean DirectionalChannelInfo_get_enabled(long this_ptr);
        /// void DirectionalChannelInfo_set_enabled(LDKDirectionalChannelInfo *this_ptr, bool val);
-       public static native void DirectionalChannelInfo_set_enabled(long this_ptr, boolean va);
+       public static native void DirectionalChannelInfo_set_enabled(long this_ptr, boolean val);
        /// uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const LDKDirectionalChannelInfo *this_ptr);
-       public static native long DirectionalChannelInfo_get_cltv_expiry_delta(long this_ptr);
+       public static native short DirectionalChannelInfo_get_cltv_expiry_delta(long this_ptr);
        /// void DirectionalChannelInfo_set_cltv_expiry_delta(LDKDirectionalChannelInfo *this_ptr, uint16_t val);
-       public static native void DirectionalChannelInfo_set_cltv_expiry_delta(long this_ptr, long val);
+       public static native void DirectionalChannelInfo_set_cltv_expiry_delta(long this_ptr, short val);
        /// uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const LDKDirectionalChannelInfo *this_ptr);
        public static native long DirectionalChannelInfo_get_htlc_minimum_msat(long this_ptr);
        /// void DirectionalChannelInfo_set_htlc_minimum_msat(LDKDirectionalChannelInfo *this_ptr, uint64_t val);
@@ -1617,11 +1619,11 @@ public class bindings {
        /// void NodeAnnouncementInfo_set_last_update(LDKNodeAnnouncementInfo *this_ptr, uint32_t val);
        public static native void NodeAnnouncementInfo_set_last_update(long this_ptr, int val);
        /// const uint8_t (*NodeAnnouncementInfo_get_rgb(const LDKNodeAnnouncementInfo *this_ptr))[3];
-       public static native byte[]  NodeAnnouncementInfo_get_rgb(long this_ptr);
+       public static native byte[] NodeAnnouncementInfo_get_rgb(long this_ptr);
        /// void NodeAnnouncementInfo_set_rgb(LDKNodeAnnouncementInfo *this_ptr, LDKThreeBytes val);
        public static native void NodeAnnouncementInfo_set_rgb(long this_ptr, long val);
        /// const uint8_t (*NodeAnnouncementInfo_get_alias(const LDKNodeAnnouncementInfo *this_ptr))[32];
-       public static native byte[]  NodeAnnouncementInfo_get_alias(long this_ptr);
+       public static native byte[] NodeAnnouncementInfo_get_alias(long this_ptr);
        /// void NodeAnnouncementInfo_set_alias(LDKNodeAnnouncementInfo *this_ptr, LDKThirtyTwoBytes val);
        public static native void NodeAnnouncementInfo_set_alias(long this_ptr, long val);
        /// void NodeAnnouncementInfo_set_addresses(LDKNodeAnnouncementInfo *this_ptr, LDKCVec_NetAddressZ val);