Test current state of things, which actually doesn't crash!
[ldk-java] / src / main / java / org / ldk / impl / bindings.java
index 64f8d6a5df2426c0c7570dd86cb3da99bacea599..947468c35abb8269d2eed8762519dbd9a40f9964 100644 (file)
@@ -5,6 +5,8 @@ public class bindings {
                System.loadLibrary("lightningjni");
        }
 
+       public static native long LDKSecretKey_new();
+
        public interface LDKMessageSendEventsProvider {
                 long get_and_clear_pending_msg_events();
        }
@@ -14,7 +16,7 @@ public class bindings {
        }
        public static native long LDKEventsProvider_new(LDKEventsProvider impl);
        public interface LDKLogger {
-                void log(long record);
+                void log(String record);
        }
        public static native long LDKLogger_new(LDKLogger impl);
        public interface LDKChainWatchInterface {
@@ -50,7 +52,7 @@ public class bindings {
                 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, long remote_to_self_delay, long local_to_self_delay);
+                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 {
@@ -88,7 +90,7 @@ public class bindings {
                 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 {
                 long handle_node_announcement(long msg);
                 long handle_channel_announcement(long msg);
@@ -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);
@@ -339,11 +341,11 @@ public class bindings {
        /// 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 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);
@@ -433,11 +435,11 @@ public class bindings {
        /// 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);
@@ -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);
@@ -659,23 +661,23 @@ 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];
@@ -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);
@@ -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);
@@ -819,15 +821,15 @@ public class bindings {
        /// 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];
@@ -939,9 +941,9 @@ 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];
@@ -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);
@@ -1415,7 +1417,7 @@ 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);
@@ -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,15 +1525,15 @@ 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_msat, int final_cltv, long logger);
        /// void NetworkGraph_free(LDKNetworkGraph this_ptr);
@@ -1561,9 +1563,9 @@ public class bindings {
        /// void DirectionalChannelInfo_set_enabled(LDKDirectionalChannelInfo *this_ptr, bool val);
        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);