Fix returning traits in trait calls, move towards clone on return
[ldk-java] / src / main / java / org / ldk / impl / bindings.java
index f79ade37a0a72447a3ba63643ed46216f445c591..3d0dfd99e729e84df27dc2363442df183af9bd41 100644 (file)
@@ -13,8 +13,10 @@ public class bindings {
        static {
                System.loadLibrary("lightningjni");
                init(java.lang.Enum.class, VecOrSliceDef.class);
+               init_class_cache();
        }
        static native void init(java.lang.Class c, java.lang.Class slicedef);
+       static native void init_class_cache();
 
        public static native boolean deref_bool(long ptr);
        public static native long deref_long(long ptr);
@@ -23,6 +25,8 @@ public class bindings {
        public static native byte[] get_u8_slice_bytes(long slice_ptr);
        public static native long bytes_to_u8_vec(byte[] bytes);
        public static native long new_txpointer_copy_data(byte[] txdata);
+       public static native void txpointer_free(long ptr);
+       public static native byte[] txpointer_get_buffer(long ptr);
        public static native long vec_slice_len(long vec);
        public static native long new_empty_slice_vec();
 
@@ -34,9 +38,9 @@ public class bindings {
        static { LDKSecp256k1Error.values(); /* Force enum statics to run */ }
        public static native VecOrSliceDef LDKCVecTempl_u8_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_u8_new(byte[] elems);
-       public static native long LDKC2TupleTempl_usize__Transaction_new(long a, long b);
+       public static native long LDKC2TupleTempl_usize__Transaction_new(long a, byte[] b);
        public static native long LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
-       public static native long LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
+       public static native byte[] LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
        public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
        public static native byte LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
        public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
@@ -335,16 +339,16 @@ public class bindings {
                 byte[] get_per_commitment_point(long idx);
                 byte[] release_commitment_secret(long idx);
                 long key_derivation_params();
-                long sign_counterparty_commitment(int feerate_per_kw, long commitment_tx, long keys, long[] htlcs);
+                long sign_counterparty_commitment(int feerate_per_kw, byte[] commitment_tx, long keys, long[] htlcs);
                 long sign_holder_commitment(long holder_commitment_tx);
                 long sign_holder_commitment_htlc_transactions(long holder_commitment_tx);
-                long sign_justice_transaction(long justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
-                long sign_counterparty_htlc_transaction(long htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
-                long sign_closing_transaction(long closing_tx);
+                long sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
+                long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
+                long sign_closing_transaction(byte[] closing_tx);
                 long sign_channel_announcement(long msg);
                 void on_accept(long channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
        }
-       public static native long LDKChannelKeys_new(LDKChannelKeys impl);
+       public static native long LDKChannelKeys_new(LDKChannelKeys impl, long pubkeys);
        public static native LDKChannelKeys LDKChannelKeys_get_obj_from_jcalls(long val);
        // LDKPublicKey ChannelKeys_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx
        public static native byte[] ChannelKeys_get_per_commitment_point(long this_arg, long idx);
@@ -353,21 +357,23 @@ public class bindings {
        // LDKC2Tuple_u64u64Z ChannelKeys_key_derivation_params LDKChannelKeys* this_arg
        public static native long ChannelKeys_key_derivation_params(long this_arg);
        // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_counterparty_commitment LDKChannelKeys* this_arg, uint32_t feerate_per_kw, LDKTransaction commitment_tx, const LDKPreCalculatedTxCreationKeys *keys, LDKCVec_HTLCOutputInCommitmentZ htlcs
-       public static native long ChannelKeys_sign_counterparty_commitment(long this_arg, int feerate_per_kw, long commitment_tx, long keys, long[] htlcs);
+       public static native long ChannelKeys_sign_counterparty_commitment(long this_arg, int feerate_per_kw, byte[] commitment_tx, long keys, long[] htlcs);
        // LDKCResult_SignatureNoneZ ChannelKeys_sign_holder_commitment LDKChannelKeys* this_arg, const LDKHolderCommitmentTransaction *holder_commitment_tx
        public static native long ChannelKeys_sign_holder_commitment(long this_arg, long holder_commitment_tx);
        // LDKCResult_CVec_SignatureZNoneZ ChannelKeys_sign_holder_commitment_htlc_transactions LDKChannelKeys* this_arg, const LDKHolderCommitmentTransaction *holder_commitment_tx
        public static native long ChannelKeys_sign_holder_commitment_htlc_transactions(long this_arg, long holder_commitment_tx);
        // LDKCResult_SignatureNoneZ ChannelKeys_sign_justice_transaction LDKChannelKeys* this_arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const LDKHTLCOutputInCommitment *htlc
-       public static native long ChannelKeys_sign_justice_transaction(long this_arg, long justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
+       public static native long ChannelKeys_sign_justice_transaction(long this_arg, byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
        // LDKCResult_SignatureNoneZ ChannelKeys_sign_counterparty_htlc_transaction LDKChannelKeys* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment *htlc
-       public static native long ChannelKeys_sign_counterparty_htlc_transaction(long this_arg, long htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
+       public static native long ChannelKeys_sign_counterparty_htlc_transaction(long this_arg, byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
        // LDKCResult_SignatureNoneZ ChannelKeys_sign_closing_transaction LDKChannelKeys* this_arg, LDKTransaction closing_tx
-       public static native long ChannelKeys_sign_closing_transaction(long this_arg, long closing_tx);
+       public static native long ChannelKeys_sign_closing_transaction(long this_arg, byte[] closing_tx);
        // LDKCResult_SignatureNoneZ ChannelKeys_sign_channel_announcement LDKChannelKeys* this_arg, const LDKUnsignedChannelAnnouncement *msg
        public static native long ChannelKeys_sign_channel_announcement(long this_arg, long msg);
        // void ChannelKeys_on_accept LDKChannelKeys* this_arg, const LDKChannelPublicKeys *channel_points, uint16_t counterparty_selected_contest_delay, uint16_t holder_selected_contest_delay
        public static native void ChannelKeys_on_accept(long this_arg, long channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay);
+       // LDKChannelPublicKeys ChannelKeys_get_pubkeys LDKChannelKeys* this_arg
+       public static native long ChannelKeys_get_pubkeys(long this_arg);
        public static native long[] LDKCVecTempl_MonitorEvent_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_MonitorEvent_new(long[] elems);
        public interface LDKWatch {
@@ -394,12 +400,12 @@ public class bindings {
        // void Filter_register_output LDKFilter* this_arg, const LDKOutPoint *outpoint, LDKu8slice script_pubkey
        public static native void Filter_register_output(long this_arg, long outpoint, byte[] script_pubkey);
        public interface LDKBroadcasterInterface {
-                void broadcast_transaction(long tx);
+                void broadcast_transaction(byte[] tx);
        }
        public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
        public static native LDKBroadcasterInterface LDKBroadcasterInterface_get_obj_from_jcalls(long val);
        // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, LDKTransaction tx
-       public static native void BroadcasterInterface_broadcast_transaction(long this_arg, long tx);
+       public static native void BroadcasterInterface_broadcast_transaction(long this_arg, byte[] tx);
        public interface LDKFeeEstimator {
                 int get_est_sat_per_1000_weight(LDKConfirmationTarget confirmation_target);
        }
@@ -410,7 +416,6 @@ public class bindings {
        public static native VecOrSliceDef LDKCVecTempl_C2TupleTempl_usize__Transaction_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_C2TupleTempl_usize__Transaction_new(long[] elems);
        public static native VecOrSliceDef LDKCVecTempl_Transaction_arr_info(long vec_ptr);
-       public static native long LDKCVecTempl_Transaction_new(long[] elems);
        public static native VecOrSliceDef LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut_arr_info(long vec_ptr);
        public static native long LDKCVecTempl_C2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut_new(long[] elems);
        public interface LDKKeysInterface {
@@ -740,7 +745,7 @@ public class bindings {
        // extern const void (*CVec_SpendableOutputDescriptorZ_free)(LDKCVec_SpendableOutputDescriptorZ);
        public static native void CVec_SpendableOutputDescriptorZ_free(long[] arg);
        // extern const void (*CVec_TransactionZ_free)(LDKCVec_TransactionZ);
-       public static native void CVec_TransactionZ_free(long[] arg);
+       public static native void CVec_TransactionZ_free(byte[][] arg);
        // extern const void (*CVec_TxOutZ_free)(LDKCVec_TxOutZ);
        public static native void CVec_TxOutZ_free(long[] arg);
        // extern const void (*CVec_UpdateAddHTLCZ_free)(LDKCVec_UpdateAddHTLCZ);
@@ -756,11 +761,11 @@ public class bindings {
        // extern const void (*CVec_u8Z_free)(LDKCVec_u8Z);
        public static native void CVec_u8Z_free(byte[] arg);
        // void Transaction_free(LDKTransaction _res);
-       public static native void Transaction_free(long _res);
+       public static native void Transaction_free(byte[] _res);
        // void TxOut_free(LDKTxOut _res);
        public static native void TxOut_free(long _res);
        // LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, LDKTransaction b);
-       public static native long C2Tuple_usizeTransactionZ_new(long a, long b);
+       public static native long C2Tuple_usizeTransactionZ_new(long a, byte[] b);
        // LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
        public static native long CResult_NoneChannelMonitorUpdateErrZ_ok();
        // LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
@@ -791,14 +796,22 @@ public class bindings {
        public static native long C2Tuple_HTLCOutputInCommitmentSignatureZ_new(long a, byte[] b);
        // void Event_free(LDKEvent this_ptr);
        public static native void Event_free(long this_ptr);
+       // LDKEvent Event_clone(const LDKEvent *orig);
+       public static native long Event_clone(long orig);
        // void MessageSendEvent_free(LDKMessageSendEvent this_ptr);
        public static native void MessageSendEvent_free(long this_ptr);
+       // LDKMessageSendEvent MessageSendEvent_clone(const LDKMessageSendEvent *orig);
+       public static native long MessageSendEvent_clone(long orig);
        // void MessageSendEventsProvider_free(LDKMessageSendEventsProvider this_ptr);
        public static native void MessageSendEventsProvider_free(long this_ptr);
        // void EventsProvider_free(LDKEventsProvider this_ptr);
        public static native void EventsProvider_free(long this_ptr);
        // void APIError_free(LDKAPIError this_ptr);
        public static native void APIError_free(long this_ptr);
+       // LDKAPIError APIError_clone(const LDKAPIError *orig);
+       public static native long APIError_clone(long orig);
+       // LDKLevel Level_clone(const LDKLevel *orig);
+       public static native LDKLevel Level_clone(long orig);
        // MUST_USE_RES LDKLevel Level_max(void);
        public static native LDKLevel Level_max();
        // void Logger_free(LDKLogger this_ptr);
@@ -915,6 +928,8 @@ public class bindings {
        public static native long UserConfig_new(long own_channel_config_arg, long peer_channel_config_limits_arg, long channel_options_arg);
        // MUST_USE_RES LDKUserConfig UserConfig_default(void);
        public static native long UserConfig_default();
+       // LDKAccessError AccessError_clone(const LDKAccessError *orig);
+       public static native LDKAccessError AccessError_clone(long orig);
        // void Access_free(LDKAccess this_ptr);
        public static native void Access_free(long this_ptr);
        // void Watch_free(LDKWatch this_ptr);
@@ -923,6 +938,8 @@ public class bindings {
        public static native void Filter_free(long this_ptr);
        // void BroadcasterInterface_free(LDKBroadcasterInterface this_ptr);
        public static native void BroadcasterInterface_free(long this_ptr);
+       // LDKConfirmationTarget ConfirmationTarget_clone(const LDKConfirmationTarget *orig);
+       public static native LDKConfirmationTarget ConfirmationTarget_clone(long orig);
        // void FeeEstimator_free(LDKFeeEstimator this_ptr);
        public static native void FeeEstimator_free(long this_ptr);
        // void ChainMonitor_free(LDKChainMonitor this_ptr);
@@ -949,10 +966,14 @@ public class bindings {
        public static native byte[] ChannelMonitorUpdate_write(long obj);
        // LDKChannelMonitorUpdate ChannelMonitorUpdate_read(LDKu8slice ser);
        public static native long ChannelMonitorUpdate_read(byte[] ser);
+       // LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const LDKChannelMonitorUpdateErr *orig);
+       public static native LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(long orig);
        // void MonitorUpdateError_free(LDKMonitorUpdateError this_ptr);
        public static native void MonitorUpdateError_free(long this_ptr);
        // void MonitorEvent_free(LDKMonitorEvent this_ptr);
        public static native void MonitorEvent_free(long this_ptr);
+       // LDKMonitorEvent MonitorEvent_clone(const LDKMonitorEvent *orig);
+       public static native long MonitorEvent_clone(long orig);
        // void HTLCUpdate_free(LDKHTLCUpdate this_ptr);
        public static native void HTLCUpdate_free(long this_ptr);
        // LDKHTLCUpdate HTLCUpdate_clone(const LDKHTLCUpdate *orig);
@@ -974,7 +995,7 @@ public class bindings {
        // MUST_USE_RES LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(LDKChannelMonitor *this_arg);
        public static native long[] ChannelMonitor_get_and_clear_pending_events(long this_arg);
        // MUST_USE_RES LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(LDKChannelMonitor *this_arg, const LDKLogger *logger);
-       public static native long[] ChannelMonitor_get_latest_holder_commitment_txn(long this_arg, long logger);
+       public static native byte[][] ChannelMonitor_get_latest_holder_commitment_txn(long this_arg, long logger);
        // MUST_USE_RES LDKCVec_C2Tuple_TxidCVec_TxOutZZZ ChannelMonitor_block_connected(LDKChannelMonitor *this_arg, const uint8_t (*header)[80], LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, LDKBroadcasterInterface broadcaster, LDKFeeEstimator fee_estimator, LDKLogger logger);
        public static native long[] ChannelMonitor_block_connected(long this_arg, byte[] header, long[] txdata, int height, long broadcaster, long fee_estimator, long logger);
        // void ChannelMonitor_block_disconnected(LDKChannelMonitor *this_arg, const uint8_t (*header)[80], uint32_t height, LDKBroadcasterInterface broadcaster, LDKFeeEstimator fee_estimator, LDKLogger logger);
@@ -1001,6 +1022,10 @@ public class bindings {
        public static native long OutPoint_read(byte[] ser);
        // void SpendableOutputDescriptor_free(LDKSpendableOutputDescriptor this_ptr);
        public static native void SpendableOutputDescriptor_free(long this_ptr);
+       // LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const LDKSpendableOutputDescriptor *orig);
+       public static native long SpendableOutputDescriptor_clone(long orig);
+       // LDKChannelKeys ChannelKeys_clone(const LDKChannelKeys *orig);
+       public static native long ChannelKeys_clone(long orig);
        // void ChannelKeys_free(LDKChannelKeys this_ptr);
        public static native void ChannelKeys_free(long this_ptr);
        // void KeysInterface_free(LDKKeysInterface this_ptr);
@@ -1599,6 +1624,8 @@ public class bindings {
        public static native long AnnouncementSignatures_new(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg);
        // void NetAddress_free(LDKNetAddress this_ptr);
        public static native void NetAddress_free(long this_ptr);
+       // LDKNetAddress NetAddress_clone(const LDKNetAddress *orig);
+       public static native long NetAddress_clone(long orig);
        // void UnsignedNodeAnnouncement_free(LDKUnsignedNodeAnnouncement this_ptr);
        public static native void UnsignedNodeAnnouncement_free(long this_ptr);
        // LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const LDKUnsignedNodeAnnouncement *orig);
@@ -1835,6 +1862,8 @@ public class bindings {
        public static native long GossipTimestampFilter_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg);
        // void ErrorAction_free(LDKErrorAction this_ptr);
        public static native void ErrorAction_free(long this_ptr);
+       // LDKErrorAction ErrorAction_clone(const LDKErrorAction *orig);
+       public static native long ErrorAction_clone(long orig);
        // void LightningError_free(LDKLightningError this_ptr);
        public static native void LightningError_free(long this_ptr);
        // LDKStr LightningError_get_err(const LDKLightningError *this_ptr);
@@ -1871,6 +1900,8 @@ public class bindings {
        public static native long CommitmentUpdate_new(long[] update_add_htlcs_arg, long[] update_fulfill_htlcs_arg, long[] update_fail_htlcs_arg, long[] update_fail_malformed_htlcs_arg, long update_fee_arg, long commitment_signed_arg);
        // void HTLCFailChannelUpdate_free(LDKHTLCFailChannelUpdate this_ptr);
        public static native void HTLCFailChannelUpdate_free(long this_ptr);
+       // LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const LDKHTLCFailChannelUpdate *orig);
+       public static native long HTLCFailChannelUpdate_clone(long orig);
        // void ChannelMessageHandler_free(LDKChannelMessageHandler this_ptr);
        public static native void ChannelMessageHandler_free(long this_ptr);
        // void RoutingMessageHandler_free(LDKRoutingMessageHandler this_ptr);
@@ -2011,6 +2042,8 @@ public class bindings {
        public static native void MessageHandler_set_route_handler(long this_ptr, long val);
        // MUST_USE_RES LDKMessageHandler MessageHandler_new(LDKChannelMessageHandler chan_handler_arg, LDKRoutingMessageHandler route_handler_arg);
        public static native long MessageHandler_new(long chan_handler_arg, long route_handler_arg);
+       // LDKSocketDescriptor SocketDescriptor_clone(const LDKSocketDescriptor *orig);
+       public static native long SocketDescriptor_clone(long orig);
        // void SocketDescriptor_free(LDKSocketDescriptor this_ptr);
        public static native void SocketDescriptor_free(long this_ptr);
        // void PeerHandleError_free(LDKPeerHandleError this_ptr);
@@ -2083,6 +2116,8 @@ public class bindings {
        public static native long TxCreationKeys_read(byte[] ser);
        // void PreCalculatedTxCreationKeys_free(LDKPreCalculatedTxCreationKeys this_ptr);
        public static native void PreCalculatedTxCreationKeys_free(long this_ptr);
+       // LDKPreCalculatedTxCreationKeys PreCalculatedTxCreationKeys_clone(const LDKPreCalculatedTxCreationKeys *orig);
+       public static native long PreCalculatedTxCreationKeys_clone(long orig);
        // MUST_USE_RES LDKPreCalculatedTxCreationKeys PreCalculatedTxCreationKeys_new(LDKTxCreationKeys keys);
        public static native long PreCalculatedTxCreationKeys_new(long keys);
        // MUST_USE_RES LDKTxCreationKeys PreCalculatedTxCreationKeys_trust_key_derivation(const LDKPreCalculatedTxCreationKeys *this_arg);
@@ -2152,15 +2187,15 @@ public class bindings {
        // LDKCVec_u8Z make_funding_redeemscript(LDKPublicKey broadcaster, LDKPublicKey countersignatory);
        public static native byte[] make_funding_redeemscript(byte[] broadcaster, byte[] countersignatory);
        // LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const LDKHTLCOutputInCommitment *htlc, LDKPublicKey broadcaster_delayed_payment_key, LDKPublicKey revocation_key);
-       public static native long build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, short contest_delay, long htlc, byte[] broadcaster_delayed_payment_key, byte[] revocation_key);
+       public static native byte[] build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, short contest_delay, long htlc, byte[] broadcaster_delayed_payment_key, byte[] revocation_key);
        // void HolderCommitmentTransaction_free(LDKHolderCommitmentTransaction this_ptr);
        public static native void HolderCommitmentTransaction_free(long this_ptr);
        // LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const LDKHolderCommitmentTransaction *orig);
        public static native long HolderCommitmentTransaction_clone(long orig);
        // LDKTransaction HolderCommitmentTransaction_get_unsigned_tx(const LDKHolderCommitmentTransaction *this_ptr);
-       public static native long HolderCommitmentTransaction_get_unsigned_tx(long this_ptr);
+       public static native byte[] HolderCommitmentTransaction_get_unsigned_tx(long this_ptr);
        // void HolderCommitmentTransaction_set_unsigned_tx(LDKHolderCommitmentTransaction *this_ptr, LDKTransaction val);
-       public static native void HolderCommitmentTransaction_set_unsigned_tx(long this_ptr, long val);
+       public static native void HolderCommitmentTransaction_set_unsigned_tx(long this_ptr, byte[] val);
        // LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const LDKHolderCommitmentTransaction *this_ptr);
        public static native byte[] HolderCommitmentTransaction_get_counterparty_sig(long this_ptr);
        // void HolderCommitmentTransaction_set_counterparty_sig(LDKHolderCommitmentTransaction *this_ptr, LDKSignature val);
@@ -2172,7 +2207,7 @@ public class bindings {
        // void HolderCommitmentTransaction_set_per_htlc(LDKHolderCommitmentTransaction *this_ptr, LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val);
        public static native void HolderCommitmentTransaction_set_per_htlc(long this_ptr, long[] val);
        // MUST_USE_RES LDKHolderCommitmentTransaction HolderCommitmentTransaction_new_missing_holder_sig(LDKTransaction unsigned_tx, LDKSignature counterparty_sig, LDKPublicKey holder_funding_key, LDKPublicKey counterparty_funding_key, LDKTxCreationKeys keys, uint32_t feerate_per_kw, LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data);
-       public static native long HolderCommitmentTransaction_new_missing_holder_sig(long unsigned_tx, byte[] counterparty_sig, byte[] holder_funding_key, byte[] counterparty_funding_key, long keys, int feerate_per_kw, long[] htlc_data);
+       public static native long HolderCommitmentTransaction_new_missing_holder_sig(byte[] unsigned_tx, byte[] counterparty_sig, byte[] holder_funding_key, byte[] counterparty_funding_key, long keys, int feerate_per_kw, long[] htlc_data);
        // MUST_USE_RES LDKTxCreationKeys HolderCommitmentTransaction_trust_key_derivation(const LDKHolderCommitmentTransaction *this_arg);
        public static native long HolderCommitmentTransaction_trust_key_derivation(long this_arg);
        // MUST_USE_RES LDKThirtyTwoBytes HolderCommitmentTransaction_txid(const LDKHolderCommitmentTransaction *this_arg);