From: Matt Corallo Date: Fri, 2 Oct 2020 20:54:59 +0000 (-0400) Subject: Update auto-generated bindings X-Git-Tag: v0.0.1~142 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=e5e14abada451cff0aa62e31942da61623f39826;p=ldk-java Update auto-generated bindings --- diff --git a/src/main/java/org/ldk/impl/bindings.java b/src/main/java/org/ldk/impl/bindings.java index b89d336c..3812dff6 100644 --- a/src/main/java/org/ldk/impl/bindings.java +++ b/src/main/java/org/ldk/impl/bindings.java @@ -9,10 +9,9 @@ public class bindings { public static native long LDKSecretKey_new(); - public enum LDKChainError { - LDKChainError_NotSupported, - LDKChainError_NotWatched, - LDKChainError_UnknownTx, + public enum LDKAccessError { + LDKAccessError_UnknownChain, + LDKAccessError_UnknownTx, } public enum LDKChannelMonitorUpdateErr { LDKChannelMonitorUpdateErr_TemporaryFailure, @@ -59,42 +58,43 @@ public class bindings { void log(String record); } public static native long LDKLogger_new(LDKLogger impl); - public interface LDKChainWatchInterface { - 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 interface LDKAccess { + long get_utxo(byte[] genesis_hash, long short_channel_id); } - public static native long LDKChainWatchInterface_new(LDKChainWatchInterface impl); - public interface LDKBroadcasterInterface { - void broadcast_transaction(long tx); - } - public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl); - public interface LDKChainListener { - 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 { - int get_est_sat_per_1000_weight(LDKConfirmationTarget confirmation_target); - } - public static native long LDKFeeEstimator_new(LDKFeeEstimator impl); + public static native long LDKAccess_new(LDKAccess impl); public interface LDKChannelKeys { 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_counterparty_commitment(int feerate_per_kw, long commitment_tx, long keys, long htlcs); + long sign_holder_commitment(long holder_commitment_tx); + long sign_holder_commitment_htlc_transactions(long holder_commitment_tx); long sign_justice_transaction(long justice_tx, long input, long amount, byte[] per_commitment_key, long htlc); - long sign_remote_htlc_transaction(long htlc_tx, long input, long amount, long per_commitment_point, long htlc); + long sign_counterparty_htlc_transaction(long htlc_tx, long input, long amount, 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); + 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 interface LDKWatch { + long watch_channel(long funding_txo, long monitor); + long update_channel(long funding_txo, long update); + long release_pending_monitor_events(); + } + public static native long LDKWatch_new(LDKWatch impl); + public interface LDKFilter { + void register_tx(byte[] txid, long script_pubkey); + void register_output(long outpoint, long script_pubkey); + } + public static native long LDKFilter_new(LDKFilter impl); + public interface LDKBroadcasterInterface { + void broadcast_transaction(long tx); + } + public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl); + public interface LDKFeeEstimator { + int get_est_sat_per_1000_weight(LDKConfirmationTarget confirmation_target); + } + public static native long LDKFeeEstimator_new(LDKFeeEstimator impl); public interface LDKKeysInterface { long get_node_secret(); long get_destination_script(); @@ -103,12 +103,6 @@ public class bindings { long get_secure_random_bytes(); } public static native long LDKKeysInterface_new(LDKKeysInterface impl); - public interface LDKManyChannelMonitor { - 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(long their_node_id, long their_features, long msg); void handle_accept_channel(long their_node_id, long their_features, long msg); @@ -152,22 +146,16 @@ public class bindings { public static native void C2Tuple_HTLCOutputInCommitmentSignatureZ_free(long arg); /// extern const void (*C2Tuple_OutPointScriptZ_free)(LDKC2Tuple_OutPointScriptZ); public static native void C2Tuple_OutPointScriptZ_free(long arg); - /// extern const void (*C2Tuple_Scriptu64Z_free)(LDKC2Tuple_Scriptu64Z); - public static native void C2Tuple_Scriptu64Z_free(long arg); /// extern const void (*C2Tuple_SignatureCVec_SignatureZZ_free)(LDKC2Tuple_SignatureCVec_SignatureZZ); public static native void C2Tuple_SignatureCVec_SignatureZZ_free(long arg); - /// extern const void (*C2Tuple_Txidu32Z_free)(LDKC2Tuple_Txidu32Z); - public static native void C2Tuple_Txidu32Z_free(long arg); + /// extern const void (*C2Tuple_TxidCVec_TxOutZZ_free)(LDKC2Tuple_TxidCVec_TxOutZZ); + public static native void C2Tuple_TxidCVec_TxOutZZ_free(long arg); /// extern const void (*C2Tuple_u64u64Z_free)(LDKC2Tuple_u64u64Z); public static native void C2Tuple_u64u64Z_free(long arg); + /// extern const void (*C2Tuple_usizeTransactionZ_free)(LDKC2Tuple_usizeTransactionZ); + public static native void C2Tuple_usizeTransactionZ_free(long arg); /// extern const void (*C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free)(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ); public static native void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(long arg); - /// extern const LDKCResult_C2Tuple_Scriptu64ZChainErrorZ (*CResult_C2Tuple_Scriptu64ZChainErrorZ_err)(LDKChainError); - public static native long CResult_C2Tuple_Scriptu64ZChainErrorZ_err(LDKChainError arg); - /// extern const void (*CResult_C2Tuple_Scriptu64ZChainErrorZ_free)(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ); - public static native void CResult_C2Tuple_Scriptu64ZChainErrorZ_free(long arg); - /// extern const LDKCResult_C2Tuple_Scriptu64ZChainErrorZ (*CResult_C2Tuple_Scriptu64ZChainErrorZ_ok)(LDKC2Tuple_Scriptu64Z); - public static native long CResult_C2Tuple_Scriptu64ZChainErrorZ_ok(long arg); /// extern const void (*CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free)(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ); public static native void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(long arg); /// extern const LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok)(LDKC2Tuple_SignatureCVec_SignatureZZ); @@ -202,12 +190,24 @@ public class bindings { public static native long CResult_NonePeerHandleErrorZ_err(long arg); /// extern const void (*CResult_NonePeerHandleErrorZ_free)(LDKCResult_NonePeerHandleErrorZ); public static native void CResult_NonePeerHandleErrorZ_free(long arg); + /// extern const LDKCResult_PublicKeySecpErrorZ (*CResult_PublicKeySecpErrorZ_err)(LDKSecp256k1Error); + public static native long CResult_PublicKeySecpErrorZ_err(LDKSecp256k1Error arg); + /// extern const void (*CResult_PublicKeySecpErrorZ_free)(LDKCResult_PublicKeySecpErrorZ); + public static native void CResult_PublicKeySecpErrorZ_free(long arg); + /// extern const LDKCResult_PublicKeySecpErrorZ (*CResult_PublicKeySecpErrorZ_ok)(LDKPublicKey); + public static native long CResult_PublicKeySecpErrorZ_ok(long arg); /// extern const LDKCResult_RouteLightningErrorZ (*CResult_RouteLightningErrorZ_err)(LDKLightningError); public static native long CResult_RouteLightningErrorZ_err(long arg); /// extern const void (*CResult_RouteLightningErrorZ_free)(LDKCResult_RouteLightningErrorZ); public static native void CResult_RouteLightningErrorZ_free(long arg); /// extern const LDKCResult_RouteLightningErrorZ (*CResult_RouteLightningErrorZ_ok)(LDKRoute); public static native long CResult_RouteLightningErrorZ_ok(long arg); + /// extern const LDKCResult_SecretKeySecpErrorZ (*CResult_SecretKeySecpErrorZ_err)(LDKSecp256k1Error); + public static native long CResult_SecretKeySecpErrorZ_err(LDKSecp256k1Error arg); + /// extern const void (*CResult_SecretKeySecpErrorZ_free)(LDKCResult_SecretKeySecpErrorZ); + public static native void CResult_SecretKeySecpErrorZ_free(long arg); + /// extern const LDKCResult_SecretKeySecpErrorZ (*CResult_SecretKeySecpErrorZ_ok)(LDKSecretKey); + public static native long CResult_SecretKeySecpErrorZ_ok(long arg); /// extern const void (*CResult_SignatureNoneZ_free)(LDKCResult_SignatureNoneZ); public static native void CResult_SignatureNoneZ_free(long arg); /// extern const LDKCResult_SignatureNoneZ (*CResult_SignatureNoneZ_ok)(LDKSignature); @@ -218,6 +218,12 @@ public class bindings { public static native void CResult_TxCreationKeysSecpErrorZ_free(long arg); /// extern const LDKCResult_TxCreationKeysSecpErrorZ (*CResult_TxCreationKeysSecpErrorZ_ok)(LDKTxCreationKeys); public static native long CResult_TxCreationKeysSecpErrorZ_ok(long arg); + /// extern const LDKCResult_TxOutAccessErrorZ (*CResult_TxOutAccessErrorZ_err)(LDKAccessError); + public static native long CResult_TxOutAccessErrorZ_err(LDKAccessError arg); + /// extern const void (*CResult_TxOutAccessErrorZ_free)(LDKCResult_TxOutAccessErrorZ); + public static native void CResult_TxOutAccessErrorZ_free(long arg); + /// extern const LDKCResult_TxOutAccessErrorZ (*CResult_TxOutAccessErrorZ_ok)(LDKTxOut); + public static native long CResult_TxOutAccessErrorZ_ok(long arg); /// extern const LDKCResult_boolLightningErrorZ (*CResult_boolLightningErrorZ_err)(LDKLightningError); public static native long CResult_boolLightningErrorZ_err(long arg); /// extern const void (*CResult_boolLightningErrorZ_free)(LDKCResult_boolLightningErrorZ); @@ -232,6 +238,10 @@ public class bindings { public static native long CResult_boolPeerHandleErrorZ_ok(boolean arg); /// extern const void (*CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free)(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ); public static native void CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(long arg); + /// extern const void (*CVec_C2Tuple_TxidCVec_TxOutZZZ_free)(LDKCVec_C2Tuple_TxidCVec_TxOutZZZ); + public static native void CVec_C2Tuple_TxidCVec_TxOutZZZ_free(long arg); + /// extern const void (*CVec_C2Tuple_usizeTransactionZZ_free)(LDKCVec_C2Tuple_usizeTransactionZZ); + public static native void CVec_C2Tuple_usizeTransactionZZ_free(long arg); /// extern const void (*CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free)(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ); public static native void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(long arg); /// extern const void (*CVec_CVec_RouteHopZZ_free)(LDKCVec_CVec_RouteHopZZ); @@ -264,6 +274,8 @@ public class bindings { 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); + /// 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); public static native void CVec_UpdateAddHTLCZ_free(long arg); /// extern const void (*CVec_UpdateFailHTLCZ_free)(LDKCVec_UpdateFailHTLCZ); @@ -276,14 +288,20 @@ public class bindings { public static native void CVec_u64Z_free(long arg); /// extern const void (*CVec_u8Z_free)(LDKCVec_u8Z); public static native void CVec_u8Z_free(long arg); - /// extern const void (*CVec_usizeZ_free)(LDKCVec_usizeZ); - public static native void CVec_usizeZ_free(long arg); + /// void Transaction_free(LDKTransaction _res); + public static native void Transaction_free(long _res); /// void TxOut_free(LDKTxOut _res); public static native void TxOut_free(long _res); - /// LDKC2Tuple_Txidu32Z C2Tuple_Txidu32Z_new(LDKThirtyTwoBytes a, uint32_t b); - public static native long C2Tuple_Txidu32Z_new(long a, int b); - /// LDKC2Tuple_Scriptu64Z C2Tuple_Scriptu64Z_new(LDKCVec_u8Z a, uint64_t b); - public static native long C2Tuple_Scriptu64Z_new(long a, long b); + /// LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, LDKTransaction b); + public static native long C2Tuple_usizeTransactionZ_new(long a, long b); + /// LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void); + public static native long CResult_NoneChannelMonitorUpdateErrZ_ok(); + /// LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void); + public static native long CResult_NoneMonitorUpdateErrorZ_ok(); + /// LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(LDKOutPoint a, LDKCVec_u8Z b); + public static native long C2Tuple_OutPointScriptZ_new(long a, long b); + /// LDKC2Tuple_TxidCVec_TxOutZZ C2Tuple_TxidCVec_TxOutZZ_new(LDKThirtyTwoBytes a, LDKCVec_TxOutZ b); + public static native long C2Tuple_TxidCVec_TxOutZZ_new(long a, long b); /// LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b); public static native long C2Tuple_u64u64Z_new(long a, long b); /// LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(LDKSignature a, LDKCVec_SignatureZ b); @@ -298,12 +316,6 @@ public class bindings { public static native long CResult_NoneAPIErrorZ_ok(); /// LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void); public static native long CResult_NonePaymentSendFailureZ_ok(); - /// LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void); - public static native long CResult_NoneChannelMonitorUpdateErrZ_ok(); - /// LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void); - public static native long CResult_NoneMonitorUpdateErrorZ_ok(); - /// LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(LDKOutPoint a, LDKCVec_u8Z b); - public static native long C2Tuple_OutPointScriptZ_new(long a, long b); /// LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(LDKChannelAnnouncement a, LDKChannelUpdate b, LDKChannelUpdate c); public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c); /// LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void); @@ -428,46 +440,66 @@ 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(); - /// void ChainWatchInterface_free(LDKChainWatchInterface this_ptr); - public static native void ChainWatchInterface_free(long this_ptr); + /// void Access_free(LDKAccess this_ptr); + public static native void Access_free(long this_ptr); + /// void Watch_free(LDKWatch this_ptr); + public static native void Watch_free(long this_ptr); + /// void Filter_free(LDKFilter this_ptr); + public static native void Filter_free(long this_ptr); /// void BroadcasterInterface_free(LDKBroadcasterInterface this_ptr); public static native void BroadcasterInterface_free(long this_ptr); - /// void ChainListener_free(LDKChainListener this_ptr); - public static native void ChainListener_free(long this_ptr); /// void FeeEstimator_free(LDKFeeEstimator this_ptr); public static native void FeeEstimator_free(long this_ptr); - /// void ChainWatchedUtil_free(LDKChainWatchedUtil this_ptr); - public static native void ChainWatchedUtil_free(long this_ptr); - /// MUST_USE_RES LDKChainWatchedUtil ChainWatchedUtil_new(void); - public static native long ChainWatchedUtil_new(); - /// MUST_USE_RES bool ChainWatchedUtil_register_tx(LDKChainWatchedUtil *this_arg, const uint8_t (*txid)[32], LDKu8slice script_pub_key); - public static native boolean ChainWatchedUtil_register_tx(long this_arg, byte[] txid, long script_pub_key); - /// MUST_USE_RES bool ChainWatchedUtil_register_outpoint(LDKChainWatchedUtil *this_arg, LDKC2Tuple_Txidu32Z outpoint, LDKu8slice _script_pub_key); - public static native boolean ChainWatchedUtil_register_outpoint(long this_arg, long outpoint, long _script_pub_key); - /// MUST_USE_RES bool ChainWatchedUtil_watch_all(LDKChainWatchedUtil *this_arg); - public static native boolean ChainWatchedUtil_watch_all(long this_arg); - /// MUST_USE_RES bool ChainWatchedUtil_does_match_tx(const LDKChainWatchedUtil *this_arg, LDKTransaction tx); - public static native boolean ChainWatchedUtil_does_match_tx(long this_arg, long tx); - /// void BlockNotifier_free(LDKBlockNotifier this_ptr); - public static native void BlockNotifier_free(long this_ptr); - /// MUST_USE_RES LDKBlockNotifier BlockNotifier_new(LDKChainWatchInterface chain_monitor); - public static native long BlockNotifier_new(long chain_monitor); - /// 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 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 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_height); - /// void ChainWatchInterfaceUtil_free(LDKChainWatchInterfaceUtil this_ptr); - public static native void ChainWatchInterfaceUtil_free(long this_ptr); - /// LDKChainWatchInterface ChainWatchInterfaceUtil_as_ChainWatchInterface(const LDKChainWatchInterfaceUtil *this_arg); - public static native long ChainWatchInterfaceUtil_as_ChainWatchInterface(long this_arg); - /// MUST_USE_RES LDKChainWatchInterfaceUtil ChainWatchInterfaceUtil_new(LDKNetwork network); - public static native long ChainWatchInterfaceUtil_new(LDKNetwork network); - /// MUST_USE_RES bool ChainWatchInterfaceUtil_does_match_tx(const LDKChainWatchInterfaceUtil *this_arg, LDKTransaction tx); - public static native boolean ChainWatchInterfaceUtil_does_match_tx(long this_arg, long tx); + /// void ChainMonitor_free(LDKChainMonitor this_ptr); + public static native void ChainMonitor_free(long this_ptr); + /// void ChainMonitor_block_connected(const LDKChainMonitor *this_arg, const uint8_t (*header)[80], LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height); + public static native void ChainMonitor_block_connected(long this_arg, byte[] header, long txdata, int height); + /// void ChainMonitor_block_disconnected(const LDKChainMonitor *this_arg, const uint8_t (*header)[80], uint32_t disconnected_height); + public static native void ChainMonitor_block_disconnected(long this_arg, byte[] header, int disconnected_height); + /// MUST_USE_RES LDKChainMonitor ChainMonitor_new(LDKFilter *chain_source, LDKBroadcasterInterface broadcaster, LDKLogger logger, LDKFeeEstimator feeest); + public static native long ChainMonitor_new(long chain_source, long broadcaster, long logger, long feeest); + /// LDKWatch ChainMonitor_as_Watch(const LDKChainMonitor *this_arg); + public static native long ChainMonitor_as_Watch(long this_arg); + /// LDKEventsProvider ChainMonitor_as_EventsProvider(const LDKChainMonitor *this_arg); + public static native long ChainMonitor_as_EventsProvider(long this_arg); + /// void ChannelMonitorUpdate_free(LDKChannelMonitorUpdate this_ptr); + public static native void ChannelMonitorUpdate_free(long this_ptr); + /// uint64_t ChannelMonitorUpdate_get_update_id(const LDKChannelMonitorUpdate *this_ptr); + public static native long ChannelMonitorUpdate_get_update_id(long this_ptr); + /// void ChannelMonitorUpdate_set_update_id(LDKChannelMonitorUpdate *this_ptr, uint64_t val); + public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val); + /// LDKCVec_u8Z ChannelMonitorUpdate_write(const LDKChannelMonitorUpdate *obj); + public static native long ChannelMonitorUpdate_write(long obj); + /// LDKChannelMonitorUpdate ChannelMonitorUpdate_read(LDKu8slice ser); + public static native long ChannelMonitorUpdate_read(long ser); + /// 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); + /// void HTLCUpdate_free(LDKHTLCUpdate this_ptr); + public static native void HTLCUpdate_free(long this_ptr); + /// LDKCVec_u8Z HTLCUpdate_write(const LDKHTLCUpdate *obj); + public static native long HTLCUpdate_write(long obj); + /// LDKHTLCUpdate HTLCUpdate_read(LDKu8slice ser); + public static native long HTLCUpdate_read(long ser); + /// void ChannelMonitor_free(LDKChannelMonitor this_ptr); + public static native void ChannelMonitor_free(long this_ptr); + /// MUST_USE_RES LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(LDKChannelMonitor *this_arg, LDKChannelMonitorUpdate updates, const LDKBroadcasterInterface *broadcaster, const LDKLogger *logger); + public static native long ChannelMonitor_update_monitor(long this_arg, long updates, long broadcaster, long logger); + /// MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const LDKChannelMonitor *this_arg); + public static native long ChannelMonitor_get_latest_update_id(long this_arg); + /// MUST_USE_RES LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const LDKChannelMonitor *this_arg); + public static native long ChannelMonitor_get_funding_txo(long this_arg); + /// MUST_USE_RES LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(LDKChannelMonitor *this_arg); + public static native long ChannelMonitor_get_and_clear_pending_monitor_events(long this_arg); + /// 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); + /// 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); + public static native void ChannelMonitor_block_disconnected(long this_arg, byte[] header, int height, long broadcaster, long fee_estimator, long logger); /// void OutPoint_free(LDKOutPoint this_ptr); public static native void OutPoint_free(long this_ptr); /// const uint8_t (*OutPoint_get_txid(const LDKOutPoint *this_ptr))[32]; @@ -520,12 +552,12 @@ public class bindings { 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); public static native long InMemoryChannelKeys_new(long funding_key, long revocation_base_key, long payment_key, long delayed_payment_base_key, long htlc_base_key, long commitment_seed, long channel_value_satoshis, long key_derivation_params); - /// 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 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 short InMemoryChannelKeys_local_to_self_delay(long this_arg); + /// MUST_USE_RES LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const LDKInMemoryChannelKeys *this_arg); + public static native long InMemoryChannelKeys_counterparty_pubkeys(long this_arg); + /// MUST_USE_RES uint16_t InMemoryChannelKeys_counterparty_selected_contest_delay(const LDKInMemoryChannelKeys *this_arg); + public static native short InMemoryChannelKeys_counterparty_selected_contest_delay(long this_arg); + /// MUST_USE_RES uint16_t InMemoryChannelKeys_holder_selected_contest_delay(const LDKInMemoryChannelKeys *this_arg); + public static native short InMemoryChannelKeys_holder_selected_contest_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); @@ -578,8 +610,8 @@ public class bindings { 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(LDKNetwork network, long fee_est, long monitor, long tx_broadcaster, long logger, long keys_manager, long config, long current_blockchain_height); + /// MUST_USE_RES LDKChannelManager ChannelManager_new(LDKNetwork network, LDKFeeEstimator fee_est, LDKWatch chain_monitor, LDKBroadcasterInterface tx_broadcaster, LDKLogger logger, LDKKeysInterface keys_manager, LDKUserConfig config, uintptr_t current_blockchain_height); + public static native long ChannelManager_new(LDKNetwork network, long fee_est, long chain_monitor, long tx_broadcaster, long logger, long keys_manager, long config, long current_blockchain_height); /// MUST_USE_RES LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const LDKChannelManager *this_arg, LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_id, LDKUserConfig override_config); public static native long ChannelManager_create_channel(long this_arg, long their_network_key, long channel_value_satoshis, long push_msat, long user_id, long override_config); /// MUST_USE_RES LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const LDKChannelManager *this_arg); @@ -614,8 +646,10 @@ public class bindings { public static native long ChannelManager_as_MessageSendEventsProvider(long this_arg); /// LDKEventsProvider ChannelManager_as_EventsProvider(const LDKChannelManager *this_arg); public static native long ChannelManager_as_EventsProvider(long this_arg); - /// LDKChainListener ChannelManager_as_ChainListener(const LDKChannelManager *this_arg); - public static native long ChannelManager_as_ChainListener(long this_arg); + /// void ChannelManager_block_connected(const LDKChannelManager *this_arg, const uint8_t (*header)[80], LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height); + public static native void ChannelManager_block_connected(long this_arg, byte[] header, long txdata, int height); + /// void ChannelManager_block_disconnected(const LDKChannelManager *this_arg, const uint8_t (*header)[80]); + public static native void ChannelManager_block_disconnected(long this_arg, byte[] header); /// LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const LDKChannelManager *this_arg); public static native long ChannelManager_as_ChannelMessageHandler(long this_arg); /// void ChannelManagerReadArgs_free(LDKChannelManagerReadArgs this_ptr); @@ -628,10 +662,10 @@ public class bindings { public static native long ChannelManagerReadArgs_get_fee_estimator(long this_ptr); /// void ChannelManagerReadArgs_set_fee_estimator(LDKChannelManagerReadArgs *this_ptr, LDKFeeEstimator val); public static native void ChannelManagerReadArgs_set_fee_estimator(long this_ptr, long val); - /// const LDKManyChannelMonitor *ChannelManagerReadArgs_get_monitor(const LDKChannelManagerReadArgs *this_ptr); - public static native long ChannelManagerReadArgs_get_monitor(long this_ptr); - /// void ChannelManagerReadArgs_set_monitor(LDKChannelManagerReadArgs *this_ptr, LDKManyChannelMonitor val); - public static native void ChannelManagerReadArgs_set_monitor(long this_ptr, long val); + /// const LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const LDKChannelManagerReadArgs *this_ptr); + public static native long ChannelManagerReadArgs_get_chain_monitor(long this_ptr); + /// void ChannelManagerReadArgs_set_chain_monitor(LDKChannelManagerReadArgs *this_ptr, LDKWatch val); + public static native void ChannelManagerReadArgs_set_chain_monitor(long this_ptr, long val); /// const LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const LDKChannelManagerReadArgs *this_ptr); public static native long ChannelManagerReadArgs_get_tx_broadcaster(long this_ptr); /// void ChannelManagerReadArgs_set_tx_broadcaster(LDKChannelManagerReadArgs *this_ptr, LDKBroadcasterInterface val); @@ -644,44 +678,8 @@ public class bindings { public static native long ChannelManagerReadArgs_get_default_config(long this_ptr); /// void ChannelManagerReadArgs_set_default_config(LDKChannelManagerReadArgs *this_ptr, LDKUserConfig val); public static native void ChannelManagerReadArgs_set_default_config(long this_ptr, long val); - /// MUST_USE_RES LDKChannelManagerReadArgs ChannelManagerReadArgs_new(LDKKeysInterface keys_manager, LDKFeeEstimator fee_estimator, LDKManyChannelMonitor monitor, LDKBroadcasterInterface tx_broadcaster, LDKLogger logger, LDKUserConfig default_config, LDKCVec_ChannelMonitorZ channel_monitors); - public static native long ChannelManagerReadArgs_new(long keys_manager, long fee_estimator, long monitor, long tx_broadcaster, long logger, long default_config, long channel_monitors); - /// void ChannelMonitorUpdate_free(LDKChannelMonitorUpdate this_ptr); - public static native void ChannelMonitorUpdate_free(long this_ptr); - /// uint64_t ChannelMonitorUpdate_get_update_id(const LDKChannelMonitorUpdate *this_ptr); - public static native long ChannelMonitorUpdate_get_update_id(long this_ptr); - /// void ChannelMonitorUpdate_set_update_id(LDKChannelMonitorUpdate *this_ptr, uint64_t val); - public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val); - /// LDKCVec_u8Z ChannelMonitorUpdate_write(const LDKChannelMonitorUpdate *obj); - public static native long ChannelMonitorUpdate_write(long obj); - /// LDKChannelMonitorUpdate ChannelMonitorUpdate_read(LDKu8slice ser); - public static native long ChannelMonitorUpdate_read(long ser); - /// 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); - /// void HTLCUpdate_free(LDKHTLCUpdate this_ptr); - public static native void HTLCUpdate_free(long this_ptr); - /// LDKCVec_u8Z HTLCUpdate_write(const LDKHTLCUpdate *obj); - public static native long HTLCUpdate_write(long obj); - /// LDKHTLCUpdate HTLCUpdate_read(LDKu8slice ser); - public static native long HTLCUpdate_read(long ser); - /// void ChannelMonitor_free(LDKChannelMonitor this_ptr); - public static native void ChannelMonitor_free(long this_ptr); - /// void ManyChannelMonitor_free(LDKManyChannelMonitor this_ptr); - public static native void ManyChannelMonitor_free(long this_ptr); - /// MUST_USE_RES LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(LDKChannelMonitor *this_arg, LDKChannelMonitorUpdate updates, const LDKBroadcasterInterface *broadcaster, const LDKLogger *logger); - public static native long ChannelMonitor_update_monitor(long this_arg, long updates, long broadcaster, long logger); - /// MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const LDKChannelMonitor *this_arg); - public static native long ChannelMonitor_get_latest_update_id(long this_arg); - /// MUST_USE_RES LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const LDKChannelMonitor *this_arg); - public static native long ChannelMonitor_get_funding_txo(long this_arg); - /// MUST_USE_RES LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(LDKChannelMonitor *this_arg); - public static native long ChannelMonitor_get_and_clear_pending_monitor_events(long this_arg); - /// 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_local_commitment_txn(LDKChannelMonitor *this_arg, const LDKLogger *logger); - public static native long ChannelMonitor_get_latest_local_commitment_txn(long this_arg, long logger); + /// MUST_USE_RES LDKChannelManagerReadArgs ChannelManagerReadArgs_new(LDKKeysInterface keys_manager, LDKFeeEstimator fee_estimator, LDKWatch chain_monitor, LDKBroadcasterInterface tx_broadcaster, LDKLogger logger, LDKUserConfig default_config, LDKCVec_ChannelMonitorZ channel_monitors); + public static native long ChannelManagerReadArgs_new(long keys_manager, long fee_estimator, long chain_monitor, long tx_broadcaster, long logger, long default_config, long channel_monitors); /// void DecodeError_free(LDKDecodeError this_ptr); public static native void DecodeError_free(long this_ptr); /// void Init_free(LDKInit this_ptr); @@ -1076,6 +1074,10 @@ public class bindings { public static native void NetAddress_free(long this_ptr); /// void UnsignedNodeAnnouncement_free(LDKUnsignedNodeAnnouncement this_ptr); public static native void UnsignedNodeAnnouncement_free(long this_ptr); + /// LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const LDKUnsignedNodeAnnouncement *this_ptr); + public static native long UnsignedNodeAnnouncement_get_features(long this_ptr); + /// void UnsignedNodeAnnouncement_set_features(LDKUnsignedNodeAnnouncement *this_ptr, LDKNodeFeatures val); + public static native void UnsignedNodeAnnouncement_set_features(long this_ptr, long val); /// uint32_t UnsignedNodeAnnouncement_get_timestamp(const LDKUnsignedNodeAnnouncement *this_ptr); public static native int UnsignedNodeAnnouncement_get_timestamp(long this_ptr); /// void UnsignedNodeAnnouncement_set_timestamp(LDKUnsignedNodeAnnouncement *this_ptr, uint32_t val); @@ -1108,6 +1110,10 @@ public class bindings { public static native long NodeAnnouncement_new(long signature_arg, long contents_arg); /// void UnsignedChannelAnnouncement_free(LDKUnsignedChannelAnnouncement this_ptr); public static native void UnsignedChannelAnnouncement_free(long this_ptr); + /// LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const LDKUnsignedChannelAnnouncement *this_ptr); + public static native long UnsignedChannelAnnouncement_get_features(long this_ptr); + /// void UnsignedChannelAnnouncement_set_features(LDKUnsignedChannelAnnouncement *this_ptr, LDKChannelFeatures val); + public static native void UnsignedChannelAnnouncement_set_features(long this_ptr, long val); /// const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const LDKUnsignedChannelAnnouncement *this_ptr))[32]; public static native byte[] UnsignedChannelAnnouncement_get_chain_hash(long this_ptr); /// void UnsignedChannelAnnouncement_set_chain_hash(LDKUnsignedChannelAnnouncement *this_ptr, LDKThirtyTwoBytes val); @@ -1202,6 +1208,82 @@ public class bindings { public static native void ChannelUpdate_set_contents(long this_ptr, long val); /// MUST_USE_RES LDKChannelUpdate ChannelUpdate_new(LDKSignature signature_arg, LDKUnsignedChannelUpdate contents_arg); public static native long ChannelUpdate_new(long signature_arg, long contents_arg); + /// void QueryChannelRange_free(LDKQueryChannelRange this_ptr); + public static native void QueryChannelRange_free(long this_ptr); + /// const uint8_t (*QueryChannelRange_get_chain_hash(const LDKQueryChannelRange *this_ptr))[32]; + public static native byte[] QueryChannelRange_get_chain_hash(long this_ptr); + /// void QueryChannelRange_set_chain_hash(LDKQueryChannelRange *this_ptr, LDKThirtyTwoBytes val); + public static native void QueryChannelRange_set_chain_hash(long this_ptr, long val); + /// uint32_t QueryChannelRange_get_first_blocknum(const LDKQueryChannelRange *this_ptr); + public static native int QueryChannelRange_get_first_blocknum(long this_ptr); + /// void QueryChannelRange_set_first_blocknum(LDKQueryChannelRange *this_ptr, uint32_t val); + public static native void QueryChannelRange_set_first_blocknum(long this_ptr, int val); + /// uint32_t QueryChannelRange_get_number_of_blocks(const LDKQueryChannelRange *this_ptr); + public static native int QueryChannelRange_get_number_of_blocks(long this_ptr); + /// void QueryChannelRange_set_number_of_blocks(LDKQueryChannelRange *this_ptr, uint32_t val); + public static native void QueryChannelRange_set_number_of_blocks(long this_ptr, int val); + /// MUST_USE_RES LDKQueryChannelRange QueryChannelRange_new(LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg); + public static native long QueryChannelRange_new(long chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg); + /// void ReplyChannelRange_free(LDKReplyChannelRange this_ptr); + public static native void ReplyChannelRange_free(long this_ptr); + /// const uint8_t (*ReplyChannelRange_get_chain_hash(const LDKReplyChannelRange *this_ptr))[32]; + public static native byte[] ReplyChannelRange_get_chain_hash(long this_ptr); + /// void ReplyChannelRange_set_chain_hash(LDKReplyChannelRange *this_ptr, LDKThirtyTwoBytes val); + public static native void ReplyChannelRange_set_chain_hash(long this_ptr, long val); + /// uint32_t ReplyChannelRange_get_first_blocknum(const LDKReplyChannelRange *this_ptr); + public static native int ReplyChannelRange_get_first_blocknum(long this_ptr); + /// void ReplyChannelRange_set_first_blocknum(LDKReplyChannelRange *this_ptr, uint32_t val); + public static native void ReplyChannelRange_set_first_blocknum(long this_ptr, int val); + /// uint32_t ReplyChannelRange_get_number_of_blocks(const LDKReplyChannelRange *this_ptr); + public static native int ReplyChannelRange_get_number_of_blocks(long this_ptr); + /// void ReplyChannelRange_set_number_of_blocks(LDKReplyChannelRange *this_ptr, uint32_t val); + public static native void ReplyChannelRange_set_number_of_blocks(long this_ptr, int val); + /// bool ReplyChannelRange_get_full_information(const LDKReplyChannelRange *this_ptr); + public static native boolean ReplyChannelRange_get_full_information(long this_ptr); + /// void ReplyChannelRange_set_full_information(LDKReplyChannelRange *this_ptr, bool val); + public static native void ReplyChannelRange_set_full_information(long this_ptr, boolean val); + /// void ReplyChannelRange_set_short_channel_ids(LDKReplyChannelRange *this_ptr, LDKCVec_u64Z val); + public static native void ReplyChannelRange_set_short_channel_ids(long this_ptr, long val); + /// MUST_USE_RES LDKReplyChannelRange ReplyChannelRange_new(LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool full_information_arg, LDKCVec_u64Z short_channel_ids_arg); + public static native long ReplyChannelRange_new(long chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long short_channel_ids_arg); + /// void QueryShortChannelIds_free(LDKQueryShortChannelIds this_ptr); + public static native void QueryShortChannelIds_free(long this_ptr); + /// const uint8_t (*QueryShortChannelIds_get_chain_hash(const LDKQueryShortChannelIds *this_ptr))[32]; + public static native byte[] QueryShortChannelIds_get_chain_hash(long this_ptr); + /// void QueryShortChannelIds_set_chain_hash(LDKQueryShortChannelIds *this_ptr, LDKThirtyTwoBytes val); + public static native void QueryShortChannelIds_set_chain_hash(long this_ptr, long val); + /// void QueryShortChannelIds_set_short_channel_ids(LDKQueryShortChannelIds *this_ptr, LDKCVec_u64Z val); + public static native void QueryShortChannelIds_set_short_channel_ids(long this_ptr, long val); + /// MUST_USE_RES LDKQueryShortChannelIds QueryShortChannelIds_new(LDKThirtyTwoBytes chain_hash_arg, LDKCVec_u64Z short_channel_ids_arg); + public static native long QueryShortChannelIds_new(long chain_hash_arg, long short_channel_ids_arg); + /// void ReplyShortChannelIdsEnd_free(LDKReplyShortChannelIdsEnd this_ptr); + public static native void ReplyShortChannelIdsEnd_free(long this_ptr); + /// const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const LDKReplyShortChannelIdsEnd *this_ptr))[32]; + public static native byte[] ReplyShortChannelIdsEnd_get_chain_hash(long this_ptr); + /// void ReplyShortChannelIdsEnd_set_chain_hash(LDKReplyShortChannelIdsEnd *this_ptr, LDKThirtyTwoBytes val); + public static native void ReplyShortChannelIdsEnd_set_chain_hash(long this_ptr, long val); + /// bool ReplyShortChannelIdsEnd_get_full_information(const LDKReplyShortChannelIdsEnd *this_ptr); + public static native boolean ReplyShortChannelIdsEnd_get_full_information(long this_ptr); + /// void ReplyShortChannelIdsEnd_set_full_information(LDKReplyShortChannelIdsEnd *this_ptr, bool val); + public static native void ReplyShortChannelIdsEnd_set_full_information(long this_ptr, boolean val); + /// MUST_USE_RES LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg); + public static native long ReplyShortChannelIdsEnd_new(long chain_hash_arg, boolean full_information_arg); + /// void GossipTimestampFilter_free(LDKGossipTimestampFilter this_ptr); + public static native void GossipTimestampFilter_free(long this_ptr); + /// const uint8_t (*GossipTimestampFilter_get_chain_hash(const LDKGossipTimestampFilter *this_ptr))[32]; + public static native byte[] GossipTimestampFilter_get_chain_hash(long this_ptr); + /// void GossipTimestampFilter_set_chain_hash(LDKGossipTimestampFilter *this_ptr, LDKThirtyTwoBytes val); + public static native void GossipTimestampFilter_set_chain_hash(long this_ptr, long val); + /// uint32_t GossipTimestampFilter_get_first_timestamp(const LDKGossipTimestampFilter *this_ptr); + public static native int GossipTimestampFilter_get_first_timestamp(long this_ptr); + /// void GossipTimestampFilter_set_first_timestamp(LDKGossipTimestampFilter *this_ptr, uint32_t val); + public static native void GossipTimestampFilter_set_first_timestamp(long this_ptr, int val); + /// uint32_t GossipTimestampFilter_get_timestamp_range(const LDKGossipTimestampFilter *this_ptr); + public static native int GossipTimestampFilter_get_timestamp_range(long this_ptr); + /// void GossipTimestampFilter_set_timestamp_range(LDKGossipTimestampFilter *this_ptr, uint32_t val); + public static native void GossipTimestampFilter_set_timestamp_range(long this_ptr, int val); + /// MUST_USE_RES LDKGossipTimestampFilter GossipTimestampFilter_new(LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg); + public static native long GossipTimestampFilter_new(long 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); /// void LightningError_free(LDKLightningError this_ptr); @@ -1346,6 +1428,26 @@ public class bindings { public static native long NodeAnnouncement_write(long obj); /// LDKNodeAnnouncement NodeAnnouncement_read(LDKu8slice ser); public static native long NodeAnnouncement_read(long ser); + /// LDKQueryShortChannelIds QueryShortChannelIds_read(LDKu8slice ser); + public static native long QueryShortChannelIds_read(long ser); + /// LDKCVec_u8Z QueryShortChannelIds_write(const LDKQueryShortChannelIds *obj); + public static native long QueryShortChannelIds_write(long obj); + /// LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_read(LDKu8slice ser); + public static native long ReplyShortChannelIdsEnd_read(long ser); + /// LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const LDKReplyShortChannelIdsEnd *obj); + public static native long ReplyShortChannelIdsEnd_write(long obj); + /// LDKQueryChannelRange QueryChannelRange_read(LDKu8slice ser); + public static native long QueryChannelRange_read(long ser); + /// LDKCVec_u8Z QueryChannelRange_write(const LDKQueryChannelRange *obj); + public static native long QueryChannelRange_write(long obj); + /// LDKReplyChannelRange ReplyChannelRange_read(LDKu8slice ser); + public static native long ReplyChannelRange_read(long ser); + /// LDKCVec_u8Z ReplyChannelRange_write(const LDKReplyChannelRange *obj); + public static native long ReplyChannelRange_write(long obj); + /// LDKGossipTimestampFilter GossipTimestampFilter_read(LDKu8slice ser); + public static native long GossipTimestampFilter_read(long ser); + /// LDKCVec_u8Z GossipTimestampFilter_write(const LDKGossipTimestampFilter *obj); + public static native long GossipTimestampFilter_write(long obj); /// void MessageHandler_free(LDKMessageHandler this_ptr); public static native void MessageHandler_free(long this_ptr); /// const LDKChannelMessageHandler *MessageHandler_get_chan_handler(const LDKMessageHandler *this_ptr); @@ -1390,6 +1492,14 @@ public class bindings { 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 idx); + /// LDKCResult_SecretKeySecpErrorZ derive_private_key(LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]); + public static native long derive_private_key(long per_commitment_point, byte[] base_secret); + /// LDKCResult_PublicKeySecpErrorZ derive_public_key(LDKPublicKey per_commitment_point, LDKPublicKey base_point); + public static native long derive_public_key(long per_commitment_point, long base_point); + /// LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]); + public static native long derive_private_revocation_key(byte[] per_commitment_secret, byte[] countersignatory_revocation_base_secret); + /// LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(LDKPublicKey per_commitment_point, LDKPublicKey countersignatory_revocation_base_point); + public static native long derive_public_revocation_key(long per_commitment_point, long countersignatory_revocation_base_point); /// 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); @@ -1400,20 +1510,20 @@ public class bindings { public static native long TxCreationKeys_get_revocation_key(long this_ptr); /// void TxCreationKeys_set_revocation_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val); public static native void TxCreationKeys_set_revocation_key(long this_ptr, long val); - /// LDKPublicKey TxCreationKeys_get_a_htlc_key(const LDKTxCreationKeys *this_ptr); - public static native long TxCreationKeys_get_a_htlc_key(long this_ptr); - /// void TxCreationKeys_set_a_htlc_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val); - public static native void TxCreationKeys_set_a_htlc_key(long this_ptr, long val); - /// LDKPublicKey TxCreationKeys_get_b_htlc_key(const LDKTxCreationKeys *this_ptr); - public static native long TxCreationKeys_get_b_htlc_key(long this_ptr); - /// void TxCreationKeys_set_b_htlc_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val); - public static native void TxCreationKeys_set_b_htlc_key(long this_ptr, long val); - /// LDKPublicKey TxCreationKeys_get_a_delayed_payment_key(const LDKTxCreationKeys *this_ptr); - public static native long TxCreationKeys_get_a_delayed_payment_key(long this_ptr); - /// void TxCreationKeys_set_a_delayed_payment_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val); - public static native void TxCreationKeys_set_a_delayed_payment_key(long this_ptr, long val); - /// MUST_USE_RES LDKTxCreationKeys TxCreationKeys_new(LDKPublicKey per_commitment_point_arg, LDKPublicKey revocation_key_arg, LDKPublicKey a_htlc_key_arg, LDKPublicKey b_htlc_key_arg, LDKPublicKey a_delayed_payment_key_arg); - public static native long TxCreationKeys_new(long per_commitment_point_arg, long revocation_key_arg, long a_htlc_key_arg, long b_htlc_key_arg, long a_delayed_payment_key_arg); + /// LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const LDKTxCreationKeys *this_ptr); + public static native long TxCreationKeys_get_broadcaster_htlc_key(long this_ptr); + /// void TxCreationKeys_set_broadcaster_htlc_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val); + public static native void TxCreationKeys_set_broadcaster_htlc_key(long this_ptr, long val); + /// LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const LDKTxCreationKeys *this_ptr); + public static native long TxCreationKeys_get_countersignatory_htlc_key(long this_ptr); + /// void TxCreationKeys_set_countersignatory_htlc_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val); + public static native void TxCreationKeys_set_countersignatory_htlc_key(long this_ptr, long val); + /// LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const LDKTxCreationKeys *this_ptr); + public static native long TxCreationKeys_get_broadcaster_delayed_payment_key(long this_ptr); + /// void TxCreationKeys_set_broadcaster_delayed_payment_key(LDKTxCreationKeys *this_ptr, LDKPublicKey val); + public static native void TxCreationKeys_set_broadcaster_delayed_payment_key(long this_ptr, long val); + /// MUST_USE_RES LDKTxCreationKeys TxCreationKeys_new(LDKPublicKey per_commitment_point_arg, LDKPublicKey revocation_key_arg, LDKPublicKey broadcaster_htlc_key_arg, LDKPublicKey countersignatory_htlc_key_arg, LDKPublicKey broadcaster_delayed_payment_key_arg); + public static native long TxCreationKeys_new(long per_commitment_point_arg, long revocation_key_arg, long broadcaster_htlc_key_arg, long countersignatory_htlc_key_arg, long broadcaster_delayed_payment_key_arg); /// LDKCVec_u8Z TxCreationKeys_write(const LDKTxCreationKeys *obj); public static native long TxCreationKeys_write(long obj); /// LDKTxCreationKeys TxCreationKeys_read(LDKu8slice ser); @@ -1454,10 +1564,10 @@ public class bindings { public static native long ChannelPublicKeys_write(long obj); /// LDKChannelPublicKeys ChannelPublicKeys_read(LDKu8slice ser); public static native long ChannelPublicKeys_read(long ser); - /// MUST_USE_RES LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(LDKPublicKey per_commitment_point, LDKPublicKey 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, short to_self_delay, long delayed_payment_key); + /// MUST_USE_RES LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(LDKPublicKey per_commitment_point, LDKPublicKey broadcaster_delayed_payment_base, LDKPublicKey broadcaster_htlc_base, LDKPublicKey countersignatory_revocation_base, LDKPublicKey countersignatory_htlc_base); + public static native long TxCreationKeys_derive_new(long per_commitment_point, long broadcaster_delayed_payment_base, long broadcaster_htlc_base, long countersignatory_revocation_base, long countersignatory_htlc_base); + /// LDKCVec_u8Z get_revokeable_redeemscript(LDKPublicKey revocation_key, uint16_t contest_delay, LDKPublicKey broadcaster_delayed_payment_key); + public static native long get_revokeable_redeemscript(long revocation_key, short contest_delay, long broadcaster_delayed_payment_key); /// void HTLCOutputInCommitment_free(LDKHTLCOutputInCommitment this_ptr); public static native void HTLCOutputInCommitment_free(long this_ptr); /// bool HTLCOutputInCommitment_get_offered(const LDKHTLCOutputInCommitment *this_ptr); @@ -1482,40 +1592,40 @@ public class bindings { public static native long HTLCOutputInCommitment_read(long ser); /// LDKCVec_u8Z get_htlc_redeemscript(const LDKHTLCOutputInCommitment *htlc, const LDKTxCreationKeys *keys); public static native long get_htlc_redeemscript(long htlc, long keys); - /// LDKCVec_u8Z make_funding_redeemscript(LDKPublicKey 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, 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); - public static native long LocalCommitmentTransaction_get_unsigned_tx(long this_ptr); - /// void LocalCommitmentTransaction_set_unsigned_tx(LDKLocalCommitmentTransaction *this_ptr, LDKCVec_u8Z val); - public static native void LocalCommitmentTransaction_set_unsigned_tx(long this_ptr, long val); - /// LDKSignature LocalCommitmentTransaction_get_their_sig(const LDKLocalCommitmentTransaction *this_ptr); - public static native long LocalCommitmentTransaction_get_their_sig(long this_ptr); - /// void LocalCommitmentTransaction_set_their_sig(LDKLocalCommitmentTransaction *this_ptr, LDKSignature val); - public static native void LocalCommitmentTransaction_set_their_sig(long this_ptr, long val); - /// uint32_t LocalCommitmentTransaction_get_feerate_per_kw(const LDKLocalCommitmentTransaction *this_ptr); - public static native int LocalCommitmentTransaction_get_feerate_per_kw(long this_ptr); - /// void LocalCommitmentTransaction_set_feerate_per_kw(LDKLocalCommitmentTransaction *this_ptr, uint32_t val); - public static native void LocalCommitmentTransaction_set_feerate_per_kw(long this_ptr, int val); - /// void LocalCommitmentTransaction_set_per_htlc(LDKLocalCommitmentTransaction *this_ptr, LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val); - public static native void LocalCommitmentTransaction_set_per_htlc(long this_ptr, long val); - /// MUST_USE_RES LDKLocalCommitmentTransaction LocalCommitmentTransaction_new_missing_local_sig(LDKCVec_u8Z unsigned_tx, LDKSignature their_sig, LDKPublicKey our_funding_key, LDKPublicKey their_funding_key, LDKTxCreationKeys local_keys, uint32_t feerate_per_kw, LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data); - public static native long LocalCommitmentTransaction_new_missing_local_sig(long unsigned_tx, long their_sig, long our_funding_key, long their_funding_key, long local_keys, int feerate_per_kw, long htlc_data); - /// MUST_USE_RES LDKTxCreationKeys LocalCommitmentTransaction_trust_key_derivation(const LDKLocalCommitmentTransaction *this_arg); - public static native long LocalCommitmentTransaction_trust_key_derivation(long this_arg); - /// MUST_USE_RES LDKThirtyTwoBytes LocalCommitmentTransaction_txid(const LDKLocalCommitmentTransaction *this_arg); - public static native long LocalCommitmentTransaction_txid(long this_arg); - /// 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, short local_csv); - /// LDKCVec_u8Z LocalCommitmentTransaction_write(const LDKLocalCommitmentTransaction *obj); - public static native long LocalCommitmentTransaction_write(long obj); - /// LDKLocalCommitmentTransaction LocalCommitmentTransaction_read(LDKu8slice ser); - public static native long LocalCommitmentTransaction_read(long ser); + /// LDKCVec_u8Z make_funding_redeemscript(LDKPublicKey broadcaster, LDKPublicKey countersignatory); + public static native long make_funding_redeemscript(long broadcaster, long countersignatory); + /// LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const LDKHTLCOutputInCommitment *htlc, LDKPublicKey broadcaster_delayed_payment_key, LDKPublicKey revocation_key); + public static native long build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, short contest_delay, long htlc, long broadcaster_delayed_payment_key, long revocation_key); + /// void HolderCommitmentTransaction_free(LDKHolderCommitmentTransaction this_ptr); + public static native void HolderCommitmentTransaction_free(long this_ptr); + /// LDKTransaction HolderCommitmentTransaction_get_unsigned_tx(const LDKHolderCommitmentTransaction *this_ptr); + public static native long HolderCommitmentTransaction_get_unsigned_tx(long this_ptr); + /// void HolderCommitmentTransaction_set_unsigned_tx(LDKHolderCommitmentTransaction *this_ptr, LDKTransaction val); + public static native void HolderCommitmentTransaction_set_unsigned_tx(long this_ptr, long val); + /// LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const LDKHolderCommitmentTransaction *this_ptr); + public static native long HolderCommitmentTransaction_get_counterparty_sig(long this_ptr); + /// void HolderCommitmentTransaction_set_counterparty_sig(LDKHolderCommitmentTransaction *this_ptr, LDKSignature val); + public static native void HolderCommitmentTransaction_set_counterparty_sig(long this_ptr, long val); + /// uint32_t HolderCommitmentTransaction_get_feerate_per_kw(const LDKHolderCommitmentTransaction *this_ptr); + public static native int HolderCommitmentTransaction_get_feerate_per_kw(long this_ptr); + /// void HolderCommitmentTransaction_set_feerate_per_kw(LDKHolderCommitmentTransaction *this_ptr, uint32_t val); + public static native void HolderCommitmentTransaction_set_feerate_per_kw(long this_ptr, int val); + /// void HolderCommitmentTransaction_set_per_htlc(LDKHolderCommitmentTransaction *this_ptr, LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val); + public static native void HolderCommitmentTransaction_set_per_htlc(long this_ptr, long val); + /// MUST_USE_RES LDKHolderCommitmentTransaction HolderCommitmentTransaction_new_missing_holder_sig(LDKTransaction unsigned_tx, LDKSignature counterparty_sig, LDKPublicKey holder_funding_key, LDKPublicKey counterparty_funding_key, LDKTxCreationKeys keys, uint32_t feerate_per_kw, LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data); + public static native long HolderCommitmentTransaction_new_missing_holder_sig(long unsigned_tx, long counterparty_sig, long holder_funding_key, long counterparty_funding_key, long keys, int feerate_per_kw, long htlc_data); + /// 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); + public static native long HolderCommitmentTransaction_txid(long this_arg); + /// MUST_USE_RES LDKSignature HolderCommitmentTransaction_get_holder_sig(const LDKHolderCommitmentTransaction *this_arg, const uint8_t (*funding_key)[32], LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis); + public static native long HolderCommitmentTransaction_get_holder_sig(long this_arg, byte[] funding_key, long funding_redeemscript, long channel_value_satoshis); + /// MUST_USE_RES LDKCResult_CVec_SignatureZNoneZ HolderCommitmentTransaction_get_htlc_sigs(const LDKHolderCommitmentTransaction *this_arg, const uint8_t (*htlc_base_key)[32], uint16_t counterparty_selected_contest_delay); + public static native long HolderCommitmentTransaction_get_htlc_sigs(long this_arg, byte[] htlc_base_key, short counterparty_selected_contest_delay); + /// LDKCVec_u8Z HolderCommitmentTransaction_write(const LDKHolderCommitmentTransaction *obj); + public static native long HolderCommitmentTransaction_write(long obj); + /// LDKHolderCommitmentTransaction HolderCommitmentTransaction_read(LDKu8slice ser); + public static native long HolderCommitmentTransaction_read(long ser); /// void InitFeatures_free(LDKInitFeatures this_ptr); public static native void InitFeatures_free(long this_ptr); /// void NodeFeatures_free(LDKNodeFeatures this_ptr); @@ -1528,10 +1638,18 @@ public class bindings { public static native long RouteHop_get_pubkey(long this_ptr); /// void RouteHop_set_pubkey(LDKRouteHop *this_ptr, LDKPublicKey val); public static native void RouteHop_set_pubkey(long this_ptr, long val); + /// LDKNodeFeatures RouteHop_get_node_features(const LDKRouteHop *this_ptr); + public static native long RouteHop_get_node_features(long this_ptr); + /// void RouteHop_set_node_features(LDKRouteHop *this_ptr, LDKNodeFeatures val); + public static native void RouteHop_set_node_features(long this_ptr, long val); /// uint64_t RouteHop_get_short_channel_id(const LDKRouteHop *this_ptr); public static native long RouteHop_get_short_channel_id(long this_ptr); /// void RouteHop_set_short_channel_id(LDKRouteHop *this_ptr, uint64_t val); public static native void RouteHop_set_short_channel_id(long this_ptr, long val); + /// LDKChannelFeatures RouteHop_get_channel_features(const LDKRouteHop *this_ptr); + public static native long RouteHop_get_channel_features(long this_ptr); + /// void RouteHop_set_channel_features(LDKRouteHop *this_ptr, LDKChannelFeatures val); + public static native void RouteHop_set_channel_features(long this_ptr, long val); /// uint64_t RouteHop_get_fee_msat(const LDKRouteHop *this_ptr); public static native long RouteHop_get_fee_msat(long this_ptr); /// void RouteHop_set_fee_msat(LDKRouteHop *this_ptr, uint64_t val); @@ -1540,6 +1658,8 @@ public class bindings { public static native int RouteHop_get_cltv_expiry_delta(long this_ptr); /// void RouteHop_set_cltv_expiry_delta(LDKRouteHop *this_ptr, uint32_t val); public static native void RouteHop_set_cltv_expiry_delta(long this_ptr, int val); + /// MUST_USE_RES LDKRouteHop RouteHop_new(LDKPublicKey pubkey_arg, LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg); + public static native long RouteHop_new(long pubkey_arg, long node_features_arg, long short_channel_id_arg, long channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg); /// void Route_free(LDKRoute this_ptr); public static native void Route_free(long this_ptr); /// void Route_set_paths(LDKRoute *this_ptr, LDKCVec_CVec_RouteHopZZ val); @@ -1582,10 +1702,10 @@ public class bindings { public static native void LockedNetworkGraph_free(long this_ptr); /// void NetGraphMsgHandler_free(LDKNetGraphMsgHandler this_ptr); public static native void NetGraphMsgHandler_free(long this_ptr); - /// MUST_USE_RES LDKNetGraphMsgHandler NetGraphMsgHandler_new(LDKChainWatchInterface chain_monitor, LDKLogger logger); - public static native long NetGraphMsgHandler_new(long chain_monitor, long logger); - /// MUST_USE_RES LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(LDKChainWatchInterface chain_monitor, LDKLogger logger, LDKNetworkGraph network_graph); - public static native long NetGraphMsgHandler_from_net_graph(long chain_monitor, long logger, long network_graph); + /// MUST_USE_RES LDKNetGraphMsgHandler NetGraphMsgHandler_new(LDKAccess *chain_access, LDKLogger logger); + public static native long NetGraphMsgHandler_new(long chain_access, long logger); + /// MUST_USE_RES LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(LDKAccess *chain_access, LDKLogger logger, LDKNetworkGraph network_graph); + public static native long NetGraphMsgHandler_from_net_graph(long chain_access, long logger, long network_graph); /// MUST_USE_RES LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const LDKNetGraphMsgHandler *this_arg); public static native long NetGraphMsgHandler_read_locked_graph(long this_arg); /// MUST_USE_RES LDKNetworkGraph LockedNetworkGraph_graph(const LDKLockedNetworkGraph *this_arg); @@ -1610,12 +1730,20 @@ public class bindings { public static native long DirectionalChannelInfo_get_htlc_minimum_msat(long this_ptr); /// void DirectionalChannelInfo_set_htlc_minimum_msat(LDKDirectionalChannelInfo *this_ptr, uint64_t val); public static native void DirectionalChannelInfo_set_htlc_minimum_msat(long this_ptr, long val); + /// LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const LDKDirectionalChannelInfo *this_ptr); + public static native long DirectionalChannelInfo_get_last_update_message(long this_ptr); + /// void DirectionalChannelInfo_set_last_update_message(LDKDirectionalChannelInfo *this_ptr, LDKChannelUpdate val); + public static native void DirectionalChannelInfo_set_last_update_message(long this_ptr, long val); /// LDKCVec_u8Z DirectionalChannelInfo_write(const LDKDirectionalChannelInfo *obj); public static native long DirectionalChannelInfo_write(long obj); /// LDKDirectionalChannelInfo DirectionalChannelInfo_read(LDKu8slice ser); public static native long DirectionalChannelInfo_read(long ser); /// void ChannelInfo_free(LDKChannelInfo this_ptr); public static native void ChannelInfo_free(long this_ptr); + /// LDKChannelFeatures ChannelInfo_get_features(const LDKChannelInfo *this_ptr); + public static native long ChannelInfo_get_features(long this_ptr); + /// void ChannelInfo_set_features(LDKChannelInfo *this_ptr, LDKChannelFeatures val); + public static native void ChannelInfo_set_features(long this_ptr, long val); /// LDKPublicKey ChannelInfo_get_node_one(const LDKChannelInfo *this_ptr); public static native long ChannelInfo_get_node_one(long this_ptr); /// void ChannelInfo_set_node_one(LDKChannelInfo *this_ptr, LDKPublicKey val); @@ -1632,6 +1760,10 @@ public class bindings { public static native long ChannelInfo_get_two_to_one(long this_ptr); /// void ChannelInfo_set_two_to_one(LDKChannelInfo *this_ptr, LDKDirectionalChannelInfo val); public static native void ChannelInfo_set_two_to_one(long this_ptr, long val); + /// LDKChannelAnnouncement ChannelInfo_get_announcement_message(const LDKChannelInfo *this_ptr); + public static native long ChannelInfo_get_announcement_message(long this_ptr); + /// void ChannelInfo_set_announcement_message(LDKChannelInfo *this_ptr, LDKChannelAnnouncement val); + public static native void ChannelInfo_set_announcement_message(long this_ptr, long val); /// LDKCVec_u8Z ChannelInfo_write(const LDKChannelInfo *obj); public static native long ChannelInfo_write(long obj); /// LDKChannelInfo ChannelInfo_read(LDKu8slice ser); @@ -1654,6 +1786,10 @@ public class bindings { public static native long RoutingFees_write(long obj); /// void NodeAnnouncementInfo_free(LDKNodeAnnouncementInfo this_ptr); public static native void NodeAnnouncementInfo_free(long this_ptr); + /// LDKNodeFeatures NodeAnnouncementInfo_get_features(const LDKNodeAnnouncementInfo *this_ptr); + public static native long NodeAnnouncementInfo_get_features(long this_ptr); + /// void NodeAnnouncementInfo_set_features(LDKNodeAnnouncementInfo *this_ptr, LDKNodeFeatures val); + public static native void NodeAnnouncementInfo_set_features(long this_ptr, long val); /// uint32_t NodeAnnouncementInfo_get_last_update(const LDKNodeAnnouncementInfo *this_ptr); public static native int NodeAnnouncementInfo_get_last_update(long this_ptr); /// void NodeAnnouncementInfo_set_last_update(LDKNodeAnnouncementInfo *this_ptr, uint32_t val); @@ -1668,6 +1804,12 @@ public class bindings { public static native void NodeAnnouncementInfo_set_alias(long this_ptr, long val); /// void NodeAnnouncementInfo_set_addresses(LDKNodeAnnouncementInfo *this_ptr, LDKCVec_NetAddressZ val); public static native void NodeAnnouncementInfo_set_addresses(long this_ptr, long val); + /// LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const LDKNodeAnnouncementInfo *this_ptr); + public static native long NodeAnnouncementInfo_get_announcement_message(long this_ptr); + /// void NodeAnnouncementInfo_set_announcement_message(LDKNodeAnnouncementInfo *this_ptr, LDKNodeAnnouncement val); + public static native void NodeAnnouncementInfo_set_announcement_message(long this_ptr, long val); + /// MUST_USE_RES LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(LDKNodeFeatures features_arg, uint32_t last_update_arg, LDKThreeBytes rgb_arg, LDKThirtyTwoBytes alias_arg, LDKCVec_NetAddressZ addresses_arg, LDKNodeAnnouncement announcement_message_arg); + public static native long NodeAnnouncementInfo_new(long features_arg, int last_update_arg, long rgb_arg, long alias_arg, long addresses_arg, long announcement_message_arg); /// LDKCVec_u8Z NodeAnnouncementInfo_write(const LDKNodeAnnouncementInfo *obj); public static native long NodeAnnouncementInfo_write(long obj); /// LDKNodeAnnouncementInfo NodeAnnouncementInfo_read(LDKu8slice ser); diff --git a/src/main/jni/bindings.c b/src/main/jni/bindings.c index e3ed980c..d80311a7 100644 --- a/src/main/jni/bindings.c +++ b/src/main/jni/bindings.c @@ -11,78 +11,32 @@ JNIEXPORT void Java_org_ldk_impl_bindings_init(JNIEnv * env, jclass _b, jclass e assert(ordinal_meth != NULL); } -#include -static mtx_t allocation_mtx; - -void __attribute__((constructor)) init_mtx() { - assert(mtx_init(&allocation_mtx, mtx_plain) == thrd_success); -} - -typedef struct allocation { - struct allocation* next; - void* ptr; - const char* struct_name; -} allocation; -static allocation* allocation_ll = NULL; - -void* MALLOC(size_t len, const char* struct_name) { - void* res = malloc(len); - allocation* new_alloc = malloc(sizeof(allocation)); - new_alloc->ptr = res; - new_alloc->struct_name = struct_name; - assert(mtx_lock(&allocation_mtx) == thrd_success); - new_alloc->next = allocation_ll; - allocation_ll = new_alloc; - assert(mtx_unlock(&allocation_mtx) == thrd_success); - return res; -} - -void FREE(void* ptr) { - allocation* p = NULL; - assert(mtx_lock(&allocation_mtx) == thrd_success); - allocation* it = allocation_ll; - while (it->ptr != ptr) { p = it; it = it->next; } - if (p) { p->next = it->next; } else { allocation_ll = it->next; } - assert(mtx_unlock(&allocation_mtx) == thrd_success); - assert(it->ptr == ptr); - free(it); - free(ptr); -} - -void __attribute__((destructor)) check_leaks() { - for (allocation* a = allocation_ll; a != NULL; a = a->next) { fprintf(stderr, "%s %p remains\n", a->struct_name, a->ptr); } - assert(allocation_ll == NULL); -} +#define MALLOC(a, _) malloc(a) +#define FREE free JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSecretKey_1new(JNIEnv * _env, jclass _b) { LDKSecretKey* key = (LDKSecretKey*)MALLOC(sizeof(LDKSecretKey), "LDKSecretKey"); return (long)key; } -static inline LDKChainError LDKChainError_from_java(JNIEnv *env, jclass val) { +static inline LDKAccessError LDKAccessError_from_java(JNIEnv *env, jclass val) { switch ((*env)->CallIntMethod(env, val, ordinal_meth)) { - case 0: return LDKChainError_NotSupported; - case 1: return LDKChainError_NotWatched; - case 2: return LDKChainError_UnknownTx; + case 0: return LDKAccessError_UnknownChain; + case 1: return LDKAccessError_UnknownTx; } assert(false); } -static inline jclass LDKChainError_to_java(JNIEnv *env, LDKChainError val) { +static inline jclass LDKAccessError_to_java(JNIEnv *env, LDKAccessError val) { // TODO: This is pretty inefficient, we really need to cache the field IDs and class - jclass enum_class = (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKChainError;"); + jclass enum_class = (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAccessError;"); assert(enum_class != NULL); switch (val) { - case LDKChainError_NotSupported: { - jfieldID field = (*env)->GetStaticFieldID(env, enum_class, "LDKChainError_NotSupported", "Lorg/ldk/impl/bindings$LDKChainError;"); - assert(field != NULL); - return (*env)->GetStaticObjectField(env, enum_class, field); - } - case LDKChainError_NotWatched: { - jfieldID field = (*env)->GetStaticFieldID(env, enum_class, "LDKChainError_NotWatched", "Lorg/ldk/impl/bindings$LDKChainError;"); + case LDKAccessError_UnknownChain: { + jfieldID field = (*env)->GetStaticFieldID(env, enum_class, "LDKAccessError_UnknownChain", "Lorg/ldk/impl/bindings$LDKAccessError;"); assert(field != NULL); return (*env)->GetStaticObjectField(env, enum_class, field); } - case LDKChainError_UnknownTx: { - jfieldID field = (*env)->GetStaticFieldID(env, enum_class, "LDKChainError_UnknownTx", "Lorg/ldk/impl/bindings$LDKChainError;"); + case LDKAccessError_UnknownTx: { + jfieldID field = (*env)->GetStaticFieldID(env, enum_class, "LDKAccessError_UnknownTx", "Lorg/ldk/impl/bindings$LDKAccessError;"); assert(field != NULL); return (*env)->GetStaticObjectField(env, enum_class, field); } @@ -437,241 +391,53 @@ JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new (JNIEnv * env, *res_ptr = LDKLogger_init(env, _a, o); return (long)res_ptr; } -typedef struct LDKChainWatchInterface_JCalls { +typedef struct LDKAccess_JCalls { atomic_size_t refcnt; JNIEnv *env; jobject o; - jmethodID install_watch_tx_meth; - jmethodID install_watch_outpoint_meth; - jmethodID watch_all_txn_meth; - jmethodID get_chain_utxo_meth; - jmethodID filter_block_meth; - jmethodID reentered_meth; -} LDKChainWatchInterface_JCalls; -void install_watch_tx_jcall(const void* this_arg, const uint8_t (*txid)[32], LDKu8slice script_pub_key) { - LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg; - jbyteArray txid_arr = (*j_calls->env)->NewByteArray(j_calls->env, 32); - (*j_calls->env)->SetByteArrayRegion(j_calls->env, txid_arr, 0, 32, *txid); - return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->install_watch_tx_meth, txid_arr, script_pub_key); -} -void install_watch_outpoint_jcall(const void* this_arg, LDKC2Tuple_Txidu32Z outpoint, LDKu8slice out_script) { - LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg; - return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->install_watch_outpoint_meth, outpoint, out_script); -} -void watch_all_txn_jcall(const void* this_arg) { - LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg; - return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->watch_all_txn_meth); -} -LDKCResult_C2Tuple_Scriptu64ZChainErrorZ get_chain_utxo_jcall(const void* this_arg, LDKThirtyTwoBytes genesis_hash, uint64_t unspent_tx_output_identifier) { - LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg; - LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = (LDKCResult_C2Tuple_Scriptu64ZChainErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_chain_utxo_meth, genesis_hash, unspent_tx_output_identifier); - LDKCResult_C2Tuple_Scriptu64ZChainErrorZ res = *ret; + jmethodID get_utxo_meth; +} LDKAccess_JCalls; +LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id) { + LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg; + jbyteArray genesis_hash_arr = (*j_calls->env)->NewByteArray(j_calls->env, 32); + (*j_calls->env)->SetByteArrayRegion(j_calls->env, genesis_hash_arr, 0, 32, *genesis_hash); + LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id); + LDKCResult_TxOutAccessErrorZ res = *ret; FREE(ret); return res; } -LDKCVec_usizeZ filter_block_jcall(const void* this_arg, LDKu8slice block) { - LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg; - LDKCVec_usizeZ* ret = (LDKCVec_usizeZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->filter_block_meth, block); - LDKCVec_usizeZ res = *ret; - FREE(ret); - return res; -} -uintptr_t reentered_jcall(const void* this_arg) { - LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg; - return (*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->reentered_meth); -} -static void LDKChainWatchInterface_JCalls_free(void* this_arg) { - LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); - FREE(j_calls); - } -} -static void* LDKChainWatchInterface_JCalls_clone(const void* this_arg) { - LDKChainWatchInterface_JCalls *j_calls = (LDKChainWatchInterface_JCalls*) this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); - return (void*) this_arg; -} -static inline LDKChainWatchInterface LDKChainWatchInterface_init (JNIEnv * env, jclass _a, jobject o) { - jclass c = (*env)->GetObjectClass(env, o); - assert(c != NULL); - LDKChainWatchInterface_JCalls *calls = MALLOC(sizeof(LDKChainWatchInterface_JCalls), "LDKChainWatchInterface_JCalls"); - atomic_init(&calls->refcnt, 1); - calls->env = env; - calls->o = (*env)->NewGlobalRef(env, o); - calls->install_watch_tx_meth = (*env)->GetMethodID(env, c, "install_watch_tx", "([BJ)V"); - assert(calls->install_watch_tx_meth != NULL); - calls->install_watch_outpoint_meth = (*env)->GetMethodID(env, c, "install_watch_outpoint", "(JJ)V"); - assert(calls->install_watch_outpoint_meth != NULL); - calls->watch_all_txn_meth = (*env)->GetMethodID(env, c, "watch_all_txn", "()V"); - assert(calls->watch_all_txn_meth != NULL); - calls->get_chain_utxo_meth = (*env)->GetMethodID(env, c, "get_chain_utxo", "(JJ)J"); - assert(calls->get_chain_utxo_meth != NULL); - calls->filter_block_meth = (*env)->GetMethodID(env, c, "filter_block", "(J)J"); - assert(calls->filter_block_meth != NULL); - calls->reentered_meth = (*env)->GetMethodID(env, c, "reentered", "()J"); - assert(calls->reentered_meth != NULL); - - LDKChainWatchInterface ret = { - .this_arg = (void*) calls, - .install_watch_tx = install_watch_tx_jcall, - .install_watch_outpoint = install_watch_outpoint_jcall, - .watch_all_txn = watch_all_txn_jcall, - .get_chain_utxo = get_chain_utxo_jcall, - .filter_block = filter_block_jcall, - .reentered = reentered_jcall, - .free = LDKChainWatchInterface_JCalls_free, - }; - return ret; -} -JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainWatchInterface_1new (JNIEnv * env, jclass _a, jobject o) { - LDKChainWatchInterface *res_ptr = MALLOC(sizeof(LDKChainWatchInterface), "LDKChainWatchInterface"); - *res_ptr = LDKChainWatchInterface_init(env, _a, o); - return (long)res_ptr; -} -typedef struct LDKBroadcasterInterface_JCalls { - atomic_size_t refcnt; - JNIEnv *env; - jobject o; - jmethodID broadcast_transaction_meth; -} LDKBroadcasterInterface_JCalls; -void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) { - LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg; - return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->broadcast_transaction_meth, tx); -} -static void LDKBroadcasterInterface_JCalls_free(void* this_arg) { - LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg; +static void LDKAccess_JCalls_free(void* this_arg) { + LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg; if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); FREE(j_calls); } } -static void* LDKBroadcasterInterface_JCalls_clone(const void* this_arg) { - LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg; +static void* LDKAccess_JCalls_clone(const void* this_arg) { + LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg; atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); return (void*) this_arg; } -static inline LDKBroadcasterInterface LDKBroadcasterInterface_init (JNIEnv * env, jclass _a, jobject o) { +static inline LDKAccess LDKAccess_init (JNIEnv * env, jclass _a, jobject o) { jclass c = (*env)->GetObjectClass(env, o); assert(c != NULL); - LDKBroadcasterInterface_JCalls *calls = MALLOC(sizeof(LDKBroadcasterInterface_JCalls), "LDKBroadcasterInterface_JCalls"); + LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls"); atomic_init(&calls->refcnt, 1); calls->env = env; calls->o = (*env)->NewGlobalRef(env, o); - calls->broadcast_transaction_meth = (*env)->GetMethodID(env, c, "broadcast_transaction", "(J)V"); - assert(calls->broadcast_transaction_meth != NULL); + calls->get_utxo_meth = (*env)->GetMethodID(env, c, "get_utxo", "([BJ)J"); + assert(calls->get_utxo_meth != NULL); - LDKBroadcasterInterface ret = { + LDKAccess ret = { .this_arg = (void*) calls, - .broadcast_transaction = broadcast_transaction_jcall, - .free = LDKBroadcasterInterface_JCalls_free, + .get_utxo = get_utxo_jcall, + .free = LDKAccess_JCalls_free, }; return ret; } -JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new (JNIEnv * env, jclass _a, jobject o) { - LDKBroadcasterInterface *res_ptr = MALLOC(sizeof(LDKBroadcasterInterface), "LDKBroadcasterInterface"); - *res_ptr = LDKBroadcasterInterface_init(env, _a, o); - return (long)res_ptr; -} -typedef struct LDKChainListener_JCalls { - atomic_size_t refcnt; - JNIEnv *env; - jobject o; - jmethodID block_connected_meth; - jmethodID block_disconnected_meth; -} LDKChainListener_JCalls; -void block_connected_jcall(const void* this_arg, const uint8_t (*header)[80], uint32_t height, LDKCVec_TransactionZ txn_matched, LDKusizeslice indexes_of_txn_matched) { - LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg; - jbyteArray header_arr = (*j_calls->env)->NewByteArray(j_calls->env, 80); - (*j_calls->env)->SetByteArrayRegion(j_calls->env, header_arr, 0, 80, *header); - return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->block_connected_meth, header_arr, height, txn_matched, indexes_of_txn_matched); -} -void block_disconnected_jcall(const void* this_arg, const uint8_t (*header)[80], uint32_t disconnected_height) { - LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg; - jbyteArray header_arr = (*j_calls->env)->NewByteArray(j_calls->env, 80); - (*j_calls->env)->SetByteArrayRegion(j_calls->env, header_arr, 0, 80, *header); - return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->block_disconnected_meth, header_arr, disconnected_height); -} -static void LDKChainListener_JCalls_free(void* this_arg) { - LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); - FREE(j_calls); - } -} -static void* LDKChainListener_JCalls_clone(const void* this_arg) { - LDKChainListener_JCalls *j_calls = (LDKChainListener_JCalls*) this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); - return (void*) this_arg; -} -static inline LDKChainListener LDKChainListener_init (JNIEnv * env, jclass _a, jobject o) { - jclass c = (*env)->GetObjectClass(env, o); - assert(c != NULL); - LDKChainListener_JCalls *calls = MALLOC(sizeof(LDKChainListener_JCalls), "LDKChainListener_JCalls"); - atomic_init(&calls->refcnt, 1); - calls->env = env; - calls->o = (*env)->NewGlobalRef(env, o); - calls->block_connected_meth = (*env)->GetMethodID(env, c, "block_connected", "([BIJJ)V"); - assert(calls->block_connected_meth != NULL); - calls->block_disconnected_meth = (*env)->GetMethodID(env, c, "block_disconnected", "([BI)V"); - assert(calls->block_disconnected_meth != NULL); - - LDKChainListener ret = { - .this_arg = (void*) calls, - .block_connected = block_connected_jcall, - .block_disconnected = block_disconnected_jcall, - .free = LDKChainListener_JCalls_free, - }; - return ret; -} -JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChainListener_1new (JNIEnv * env, jclass _a, jobject o) { - LDKChainListener *res_ptr = MALLOC(sizeof(LDKChainListener), "LDKChainListener"); - *res_ptr = LDKChainListener_init(env, _a, o); - return (long)res_ptr; -} -typedef struct LDKFeeEstimator_JCalls { - atomic_size_t refcnt; - JNIEnv *env; - jobject o; - jmethodID get_est_sat_per_1000_weight_meth; -} LDKFeeEstimator_JCalls; -uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) { - LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg; - jclass confirmation_target_conv = LDKConfirmationTarget_to_java(j_calls->env, confirmation_target); - return (*j_calls->env)->CallIntMethod(j_calls->env, j_calls->o, j_calls->get_est_sat_per_1000_weight_meth, confirmation_target_conv); -} -static void LDKFeeEstimator_JCalls_free(void* this_arg) { - LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); - FREE(j_calls); - } -} -static void* LDKFeeEstimator_JCalls_clone(const void* this_arg) { - LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); - return (void*) this_arg; -} -static inline LDKFeeEstimator LDKFeeEstimator_init (JNIEnv * env, jclass _a, jobject o) { - jclass c = (*env)->GetObjectClass(env, o); - assert(c != NULL); - LDKFeeEstimator_JCalls *calls = MALLOC(sizeof(LDKFeeEstimator_JCalls), "LDKFeeEstimator_JCalls"); - atomic_init(&calls->refcnt, 1); - calls->env = env; - calls->o = (*env)->NewGlobalRef(env, o); - calls->get_est_sat_per_1000_weight_meth = (*env)->GetMethodID(env, c, "get_est_sat_per_1000_weight", "(Lorg/ldk/impl/bindings$LDKConfirmationTarget;)I"); - assert(calls->get_est_sat_per_1000_weight_meth != NULL); - - LDKFeeEstimator ret = { - .this_arg = (void*) calls, - .get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall, - .free = LDKFeeEstimator_JCalls_free, - }; - return ret; -} -JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new (JNIEnv * env, jclass _a, jobject o) { - LDKFeeEstimator *res_ptr = MALLOC(sizeof(LDKFeeEstimator), "LDKFeeEstimator"); - *res_ptr = LDKFeeEstimator_init(env, _a, o); +JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new (JNIEnv * env, jclass _a, jobject o) { + LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess"); + *res_ptr = LDKAccess_init(env, _a, o); return (long)res_ptr; } typedef struct LDKChannelKeys_JCalls { @@ -681,11 +447,11 @@ typedef struct LDKChannelKeys_JCalls { jmethodID get_per_commitment_point_meth; jmethodID release_commitment_secret_meth; jmethodID key_derivation_params_meth; - jmethodID sign_remote_commitment_meth; - jmethodID sign_local_commitment_meth; - jmethodID sign_local_commitment_htlc_transactions_meth; + jmethodID sign_counterparty_commitment_meth; + jmethodID sign_holder_commitment_meth; + jmethodID sign_holder_commitment_htlc_transactions_meth; jmethodID sign_justice_transaction_meth; - jmethodID sign_remote_htlc_transaction_meth; + jmethodID sign_counterparty_htlc_transaction_meth; jmethodID sign_closing_transaction_meth; jmethodID sign_channel_announcement_meth; jmethodID on_accept_meth; @@ -711,23 +477,23 @@ LDKC2Tuple_u64u64Z key_derivation_params_jcall(const void* this_arg) { FREE(ret); return res; } -LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_remote_commitment_jcall(const void* this_arg, uint32_t feerate_per_kw, LDKTransaction commitment_tx, const LDKPreCalculatedTxCreationKeys *keys, LDKCVec_HTLCOutputInCommitmentZ htlcs) { +LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment_jcall(const void* this_arg, uint32_t feerate_per_kw, LDKTransaction commitment_tx, const LDKPreCalculatedTxCreationKeys *keys, LDKCVec_HTLCOutputInCommitmentZ htlcs) { LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg; - LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_remote_commitment_meth, feerate_per_kw, commitment_tx, keys, htlcs); + LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_counterparty_commitment_meth, feerate_per_kw, commitment_tx, keys, htlcs); LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ res = *ret; FREE(ret); return res; } -LDKCResult_SignatureNoneZ sign_local_commitment_jcall(const void* this_arg, const LDKLocalCommitmentTransaction *local_commitment_tx) { +LDKCResult_SignatureNoneZ sign_holder_commitment_jcall(const void* this_arg, const LDKHolderCommitmentTransaction *holder_commitment_tx) { LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg; - LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_local_commitment_meth, local_commitment_tx); + LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_holder_commitment_meth, holder_commitment_tx); LDKCResult_SignatureNoneZ res = *ret; FREE(ret); return res; } -LDKCResult_CVec_SignatureZNoneZ sign_local_commitment_htlc_transactions_jcall(const void* this_arg, const LDKLocalCommitmentTransaction *local_commitment_tx) { +LDKCResult_CVec_SignatureZNoneZ sign_holder_commitment_htlc_transactions_jcall(const void* this_arg, const LDKHolderCommitmentTransaction *holder_commitment_tx) { LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg; - LDKCResult_CVec_SignatureZNoneZ* ret = (LDKCResult_CVec_SignatureZNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_local_commitment_htlc_transactions_meth, local_commitment_tx); + LDKCResult_CVec_SignatureZNoneZ* ret = (LDKCResult_CVec_SignatureZNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_holder_commitment_htlc_transactions_meth, holder_commitment_tx); LDKCResult_CVec_SignatureZNoneZ res = *ret; FREE(ret); return res; @@ -741,9 +507,9 @@ LDKCResult_SignatureNoneZ sign_justice_transaction_jcall(const void* this_arg, L FREE(ret); return res; } -LDKCResult_SignatureNoneZ sign_remote_htlc_transaction_jcall(const void* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment *htlc) { +LDKCResult_SignatureNoneZ sign_counterparty_htlc_transaction_jcall(const void* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment *htlc) { LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg; - LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_remote_htlc_transaction_meth, htlc_tx, input, amount, per_commitment_point, htlc); + LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->sign_counterparty_htlc_transaction_meth, htlc_tx, input, amount, per_commitment_point, htlc); LDKCResult_SignatureNoneZ res = *ret; FREE(ret); return res; @@ -762,9 +528,9 @@ LDKCResult_SignatureNoneZ sign_channel_announcement_jcall(const void* this_arg, FREE(ret); return res; } -void on_accept_jcall(void* this_arg, const LDKChannelPublicKeys *channel_points, uint16_t remote_to_self_delay, uint16_t local_to_self_delay) { +void on_accept_jcall(void* this_arg, const LDKChannelPublicKeys *channel_points, uint16_t counterparty_selected_contest_delay, uint16_t holder_selected_contest_delay) { LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg; - return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->on_accept_meth, channel_points, remote_to_self_delay, local_to_self_delay); + return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->on_accept_meth, channel_points, counterparty_selected_contest_delay, holder_selected_contest_delay); } static void LDKChannelKeys_JCalls_free(void* this_arg) { LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg; @@ -791,16 +557,16 @@ static inline LDKChannelKeys LDKChannelKeys_init (JNIEnv * env, jclass _a, jobje assert(calls->release_commitment_secret_meth != NULL); calls->key_derivation_params_meth = (*env)->GetMethodID(env, c, "key_derivation_params", "()J"); assert(calls->key_derivation_params_meth != NULL); - calls->sign_remote_commitment_meth = (*env)->GetMethodID(env, c, "sign_remote_commitment", "(IJJJ)J"); - assert(calls->sign_remote_commitment_meth != NULL); - calls->sign_local_commitment_meth = (*env)->GetMethodID(env, c, "sign_local_commitment", "(J)J"); - assert(calls->sign_local_commitment_meth != NULL); - calls->sign_local_commitment_htlc_transactions_meth = (*env)->GetMethodID(env, c, "sign_local_commitment_htlc_transactions", "(J)J"); - assert(calls->sign_local_commitment_htlc_transactions_meth != NULL); + calls->sign_counterparty_commitment_meth = (*env)->GetMethodID(env, c, "sign_counterparty_commitment", "(IJJJ)J"); + assert(calls->sign_counterparty_commitment_meth != NULL); + calls->sign_holder_commitment_meth = (*env)->GetMethodID(env, c, "sign_holder_commitment", "(J)J"); + assert(calls->sign_holder_commitment_meth != NULL); + calls->sign_holder_commitment_htlc_transactions_meth = (*env)->GetMethodID(env, c, "sign_holder_commitment_htlc_transactions", "(J)J"); + assert(calls->sign_holder_commitment_htlc_transactions_meth != NULL); calls->sign_justice_transaction_meth = (*env)->GetMethodID(env, c, "sign_justice_transaction", "(JJJ[BJ)J"); assert(calls->sign_justice_transaction_meth != NULL); - calls->sign_remote_htlc_transaction_meth = (*env)->GetMethodID(env, c, "sign_remote_htlc_transaction", "(JJJJJ)J"); - assert(calls->sign_remote_htlc_transaction_meth != NULL); + calls->sign_counterparty_htlc_transaction_meth = (*env)->GetMethodID(env, c, "sign_counterparty_htlc_transaction", "(JJJJJ)J"); + assert(calls->sign_counterparty_htlc_transaction_meth != NULL); calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "(J)J"); assert(calls->sign_closing_transaction_meth != NULL); calls->sign_channel_announcement_meth = (*env)->GetMethodID(env, c, "sign_channel_announcement", "(J)J"); @@ -813,11 +579,11 @@ static inline LDKChannelKeys LDKChannelKeys_init (JNIEnv * env, jclass _a, jobje .get_per_commitment_point = get_per_commitment_point_jcall, .release_commitment_secret = release_commitment_secret_jcall, .key_derivation_params = key_derivation_params_jcall, - .sign_remote_commitment = sign_remote_commitment_jcall, - .sign_local_commitment = sign_local_commitment_jcall, - .sign_local_commitment_htlc_transactions = sign_local_commitment_htlc_transactions_jcall, + .sign_counterparty_commitment = sign_counterparty_commitment_jcall, + .sign_holder_commitment = sign_holder_commitment_jcall, + .sign_holder_commitment_htlc_transactions = sign_holder_commitment_htlc_transactions_jcall, .sign_justice_transaction = sign_justice_transaction_jcall, - .sign_remote_htlc_transaction = sign_remote_htlc_transaction_jcall, + .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_jcall, .sign_closing_transaction = sign_closing_transaction_jcall, .sign_channel_announcement = sign_channel_announcement_jcall, .on_accept = on_accept_jcall, @@ -831,6 +597,218 @@ JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new (JNIEnv * *res_ptr = LDKChannelKeys_init(env, _a, o); return (long)res_ptr; } +typedef struct LDKWatch_JCalls { + atomic_size_t refcnt; + JNIEnv *env; + jobject o; + jmethodID watch_channel_meth; + jmethodID update_channel_meth; + jmethodID release_pending_monitor_events_meth; +} LDKWatch_JCalls; +LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) { + LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; + LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->watch_channel_meth, funding_txo, monitor); + LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret; + FREE(ret); + return res; +} +LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) { + LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; + LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->update_channel_meth, funding_txo, update); + LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret; + FREE(ret); + return res; +} +LDKCVec_MonitorEventZ release_pending_monitor_events_jcall(const void* this_arg) { + LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; + LDKCVec_MonitorEventZ* ret = (LDKCVec_MonitorEventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->release_pending_monitor_events_meth); + LDKCVec_MonitorEventZ res = *ret; + FREE(ret); + return res; +} +static void LDKWatch_JCalls_free(void* this_arg) { + LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); + FREE(j_calls); + } +} +static void* LDKWatch_JCalls_clone(const void* this_arg) { + LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); + return (void*) this_arg; +} +static inline LDKWatch LDKWatch_init (JNIEnv * env, jclass _a, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + assert(c != NULL); + LDKWatch_JCalls *calls = MALLOC(sizeof(LDKWatch_JCalls), "LDKWatch_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->env = env; + calls->o = (*env)->NewGlobalRef(env, o); + calls->watch_channel_meth = (*env)->GetMethodID(env, c, "watch_channel", "(JJ)J"); + assert(calls->watch_channel_meth != NULL); + calls->update_channel_meth = (*env)->GetMethodID(env, c, "update_channel", "(JJ)J"); + assert(calls->update_channel_meth != NULL); + calls->release_pending_monitor_events_meth = (*env)->GetMethodID(env, c, "release_pending_monitor_events", "()J"); + assert(calls->release_pending_monitor_events_meth != NULL); + + LDKWatch ret = { + .this_arg = (void*) calls, + .watch_channel = watch_channel_jcall, + .update_channel = update_channel_jcall, + .release_pending_monitor_events = release_pending_monitor_events_jcall, + .free = LDKWatch_JCalls_free, + }; + return ret; +} +JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new (JNIEnv * env, jclass _a, jobject o) { + LDKWatch *res_ptr = MALLOC(sizeof(LDKWatch), "LDKWatch"); + *res_ptr = LDKWatch_init(env, _a, o); + return (long)res_ptr; +} +typedef struct LDKFilter_JCalls { + atomic_size_t refcnt; + JNIEnv *env; + jobject o; + jmethodID register_tx_meth; + jmethodID register_output_meth; +} LDKFilter_JCalls; +void register_tx_jcall(const void* this_arg, const uint8_t (*txid)[32], LDKu8slice script_pubkey) { + LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg; + jbyteArray txid_arr = (*j_calls->env)->NewByteArray(j_calls->env, 32); + (*j_calls->env)->SetByteArrayRegion(j_calls->env, txid_arr, 0, 32, *txid); + return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->register_tx_meth, txid_arr, script_pubkey); +} +void register_output_jcall(const void* this_arg, const LDKOutPoint *outpoint, LDKu8slice script_pubkey) { + LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg; + return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->register_output_meth, outpoint, script_pubkey); +} +static void LDKFilter_JCalls_free(void* this_arg) { + LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); + FREE(j_calls); + } +} +static void* LDKFilter_JCalls_clone(const void* this_arg) { + LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); + return (void*) this_arg; +} +static inline LDKFilter LDKFilter_init (JNIEnv * env, jclass _a, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + assert(c != NULL); + LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->env = env; + calls->o = (*env)->NewGlobalRef(env, o); + calls->register_tx_meth = (*env)->GetMethodID(env, c, "register_tx", "([BJ)V"); + assert(calls->register_tx_meth != NULL); + calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(JJ)V"); + assert(calls->register_output_meth != NULL); + + LDKFilter ret = { + .this_arg = (void*) calls, + .register_tx = register_tx_jcall, + .register_output = register_output_jcall, + .free = LDKFilter_JCalls_free, + }; + return ret; +} +JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new (JNIEnv * env, jclass _a, jobject o) { + LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter"); + *res_ptr = LDKFilter_init(env, _a, o); + return (long)res_ptr; +} +typedef struct LDKBroadcasterInterface_JCalls { + atomic_size_t refcnt; + JNIEnv *env; + jobject o; + jmethodID broadcast_transaction_meth; +} LDKBroadcasterInterface_JCalls; +void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) { + LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg; + return (*j_calls->env)->CallVoidMethod(j_calls->env, j_calls->o, j_calls->broadcast_transaction_meth, tx); +} +static void LDKBroadcasterInterface_JCalls_free(void* this_arg) { + LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); + FREE(j_calls); + } +} +static void* LDKBroadcasterInterface_JCalls_clone(const void* this_arg) { + LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); + return (void*) this_arg; +} +static inline LDKBroadcasterInterface LDKBroadcasterInterface_init (JNIEnv * env, jclass _a, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + assert(c != NULL); + LDKBroadcasterInterface_JCalls *calls = MALLOC(sizeof(LDKBroadcasterInterface_JCalls), "LDKBroadcasterInterface_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->env = env; + calls->o = (*env)->NewGlobalRef(env, o); + calls->broadcast_transaction_meth = (*env)->GetMethodID(env, c, "broadcast_transaction", "(J)V"); + assert(calls->broadcast_transaction_meth != NULL); + + LDKBroadcasterInterface ret = { + .this_arg = (void*) calls, + .broadcast_transaction = broadcast_transaction_jcall, + .free = LDKBroadcasterInterface_JCalls_free, + }; + return ret; +} +JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new (JNIEnv * env, jclass _a, jobject o) { + LDKBroadcasterInterface *res_ptr = MALLOC(sizeof(LDKBroadcasterInterface), "LDKBroadcasterInterface"); + *res_ptr = LDKBroadcasterInterface_init(env, _a, o); + return (long)res_ptr; +} +typedef struct LDKFeeEstimator_JCalls { + atomic_size_t refcnt; + JNIEnv *env; + jobject o; + jmethodID get_est_sat_per_1000_weight_meth; +} LDKFeeEstimator_JCalls; +uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) { + LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg; + jclass confirmation_target_conv = LDKConfirmationTarget_to_java(j_calls->env, confirmation_target); + return (*j_calls->env)->CallIntMethod(j_calls->env, j_calls->o, j_calls->get_est_sat_per_1000_weight_meth, confirmation_target_conv); +} +static void LDKFeeEstimator_JCalls_free(void* this_arg) { + LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg; + if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { + (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); + FREE(j_calls); + } +} +static void* LDKFeeEstimator_JCalls_clone(const void* this_arg) { + LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg; + atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); + return (void*) this_arg; +} +static inline LDKFeeEstimator LDKFeeEstimator_init (JNIEnv * env, jclass _a, jobject o) { + jclass c = (*env)->GetObjectClass(env, o); + assert(c != NULL); + LDKFeeEstimator_JCalls *calls = MALLOC(sizeof(LDKFeeEstimator_JCalls), "LDKFeeEstimator_JCalls"); + atomic_init(&calls->refcnt, 1); + calls->env = env; + calls->o = (*env)->NewGlobalRef(env, o); + calls->get_est_sat_per_1000_weight_meth = (*env)->GetMethodID(env, c, "get_est_sat_per_1000_weight", "(Lorg/ldk/impl/bindings$LDKConfirmationTarget;)I"); + assert(calls->get_est_sat_per_1000_weight_meth != NULL); + + LDKFeeEstimator ret = { + .this_arg = (void*) calls, + .get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall, + .free = LDKFeeEstimator_JCalls_free, + }; + return ret; +} +JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new (JNIEnv * env, jclass _a, jobject o) { + LDKFeeEstimator *res_ptr = MALLOC(sizeof(LDKFeeEstimator), "LDKFeeEstimator"); + *res_ptr = LDKFeeEstimator_init(env, _a, o); + return (long)res_ptr; +} typedef struct LDKKeysInterface_JCalls { atomic_size_t refcnt; JNIEnv *env; @@ -922,75 +900,6 @@ JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new (JNIEnv *res_ptr = LDKKeysInterface_init(env, _a, o); return (long)res_ptr; } -typedef struct LDKManyChannelMonitor_JCalls { - atomic_size_t refcnt; - JNIEnv *env; - jobject o; - jmethodID add_monitor_meth; - jmethodID update_monitor_meth; - jmethodID get_and_clear_pending_monitor_events_meth; -} LDKManyChannelMonitor_JCalls; -LDKCResult_NoneChannelMonitorUpdateErrZ add_monitor_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) { - LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg; - LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->add_monitor_meth, funding_txo, monitor); - LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret; - FREE(ret); - return res; -} -LDKCResult_NoneChannelMonitorUpdateErrZ update_monitor_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate monitor) { - LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg; - LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->update_monitor_meth, funding_txo, monitor); - LDKCResult_NoneChannelMonitorUpdateErrZ res = *ret; - FREE(ret); - return res; -} -LDKCVec_MonitorEventZ get_and_clear_pending_monitor_events_jcall(const void* this_arg) { - LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg; - LDKCVec_MonitorEventZ* ret = (LDKCVec_MonitorEventZ*)(*j_calls->env)->CallLongMethod(j_calls->env, j_calls->o, j_calls->get_and_clear_pending_monitor_events_meth); - LDKCVec_MonitorEventZ res = *ret; - FREE(ret); - return res; -} -static void LDKManyChannelMonitor_JCalls_free(void* this_arg) { - LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg; - if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) { - (*j_calls->env)->DeleteGlobalRef(j_calls->env, j_calls->o); - FREE(j_calls); - } -} -static void* LDKManyChannelMonitor_JCalls_clone(const void* this_arg) { - LDKManyChannelMonitor_JCalls *j_calls = (LDKManyChannelMonitor_JCalls*) this_arg; - atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release); - return (void*) this_arg; -} -static inline LDKManyChannelMonitor LDKManyChannelMonitor_init (JNIEnv * env, jclass _a, jobject o) { - jclass c = (*env)->GetObjectClass(env, o); - assert(c != NULL); - LDKManyChannelMonitor_JCalls *calls = MALLOC(sizeof(LDKManyChannelMonitor_JCalls), "LDKManyChannelMonitor_JCalls"); - atomic_init(&calls->refcnt, 1); - calls->env = env; - calls->o = (*env)->NewGlobalRef(env, o); - calls->add_monitor_meth = (*env)->GetMethodID(env, c, "add_monitor", "(JJ)J"); - assert(calls->add_monitor_meth != NULL); - calls->update_monitor_meth = (*env)->GetMethodID(env, c, "update_monitor", "(JJ)J"); - assert(calls->update_monitor_meth != NULL); - calls->get_and_clear_pending_monitor_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_monitor_events", "()J"); - assert(calls->get_and_clear_pending_monitor_events_meth != NULL); - - LDKManyChannelMonitor ret = { - .this_arg = (void*) calls, - .add_monitor = add_monitor_jcall, - .update_monitor = update_monitor_jcall, - .get_and_clear_pending_monitor_events = get_and_clear_pending_monitor_events_jcall, - .free = LDKManyChannelMonitor_JCalls_free, - }; - return ret; -} -JNIEXPORT long JNICALL Java_org_ldk_impl_bindings_LDKManyChannelMonitor_1new (JNIEnv * env, jclass _a, jobject o) { - LDKManyChannelMonitor *res_ptr = MALLOC(sizeof(LDKManyChannelMonitor), "LDKManyChannelMonitor"); - *res_ptr = LDKManyChannelMonitor_init(env, _a, o); - return (long)res_ptr; -} typedef struct LDKChannelMessageHandler_JCalls { atomic_size_t refcnt; JNIEnv *env; @@ -1371,22 +1280,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free return C2Tuple_OutPointScriptZ_free(arg_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1free(JNIEnv * _env, jclass _b, jlong arg) { - LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg; - FREE((void*)arg); - return C2Tuple_Scriptu64Z_free(arg_conv); -} - JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv * _env, jclass _b, jlong arg) { LDKC2Tuple_SignatureCVec_SignatureZZ arg_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)arg; FREE((void*)arg); return C2Tuple_SignatureCVec_SignatureZZ_free(arg_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1free(JNIEnv * _env, jclass _b, jlong arg) { - LDKC2Tuple_Txidu32Z arg_conv = *(LDKC2Tuple_Txidu32Z*)arg; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1TxOutZZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKC2Tuple_TxidCVec_TxOutZZ arg_conv = *(LDKC2Tuple_TxidCVec_TxOutZZ*)arg; FREE((void*)arg); - return C2Tuple_Txidu32Z_free(arg_conv); + return C2Tuple_TxidCVec_TxOutZZ_free(arg_conv); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv * _env, jclass _b, jlong arg) { @@ -1395,32 +1298,16 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv return C2Tuple_u64u64Z_free(arg_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv * _env, jclass _b, jlong arg) { - LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arg_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)arg; - FREE((void*)arg); - return C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arg_conv); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1err(JNIEnv * _env, jclass _b, jclass arg) { - LDKChainError arg_conv = *(LDKChainError*)arg; - FREE((void*)arg); - LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = MALLOC(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ), "LDKCResult_C2Tuple_Scriptu64ZChainErrorZ"); - *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_err(arg_conv); - return (long)ret; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) { - LDKCResult_C2Tuple_Scriptu64ZChainErrorZ arg_conv = *(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ*)arg; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKC2Tuple_usizeTransactionZ arg_conv = *(LDKC2Tuple_usizeTransactionZ*)arg; FREE((void*)arg); - return CResult_C2Tuple_Scriptu64ZChainErrorZ_free(arg_conv); + return C2Tuple_usizeTransactionZ_free(arg_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) { - LDKC2Tuple_Scriptu64Z arg_conv = *(LDKC2Tuple_Scriptu64Z*)arg; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arg_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)arg; FREE((void*)arg); - LDKCResult_C2Tuple_Scriptu64ZChainErrorZ* ret = MALLOC(sizeof(LDKCResult_C2Tuple_Scriptu64ZChainErrorZ), "LDKCResult_C2Tuple_Scriptu64ZChainErrorZ"); - *ret = CResult_C2Tuple_Scriptu64ZChainErrorZ_ok(arg_conv); - return (long)ret; + return C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arg_conv); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) { @@ -1543,6 +1430,28 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_ return CResult_NonePeerHandleErrorZ_free(arg_conv); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1err(JNIEnv * _env, jclass _b, jclass arg) { + LDKSecp256k1Error arg_conv = *(LDKSecp256k1Error*)arg; + FREE((void*)arg); + LDKCResult_PublicKeySecpErrorZ* ret = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ"); + *ret = CResult_PublicKeySecpErrorZ_err(arg_conv); + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKCResult_PublicKeySecpErrorZ arg_conv = *(LDKCResult_PublicKeySecpErrorZ*)arg; + FREE((void*)arg); + return CResult_PublicKeySecpErrorZ_free(arg_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) { + LDKPublicKey arg_conv = *(LDKPublicKey*)arg; + FREE((void*)arg); + LDKCResult_PublicKeySecpErrorZ* ret = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ"); + *ret = CResult_PublicKeySecpErrorZ_ok(arg_conv); + return (long)ret; +} + JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) { LDKLightningError arg_conv = *(LDKLightningError*)arg; FREE((void*)arg); @@ -1565,6 +1474,28 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ return (long)ret; } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1err(JNIEnv * _env, jclass _b, jclass arg) { + LDKSecp256k1Error arg_conv = *(LDKSecp256k1Error*)arg; + FREE((void*)arg); + LDKCResult_SecretKeySecpErrorZ* ret = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ"); + *ret = CResult_SecretKeySecpErrorZ_err(arg_conv); + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKCResult_SecretKeySecpErrorZ arg_conv = *(LDKCResult_SecretKeySecpErrorZ*)arg; + FREE((void*)arg); + return CResult_SecretKeySecpErrorZ_free(arg_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) { + LDKSecretKey arg_conv = *(LDKSecretKey*)arg; + FREE((void*)arg); + LDKCResult_SecretKeySecpErrorZ* ret = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ"); + *ret = CResult_SecretKeySecpErrorZ_ok(arg_conv); + return (long)ret; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1free(JNIEnv * _env, jclass _b, jlong arg) { LDKCResult_SignatureNoneZ arg_conv = *(LDKCResult_SignatureNoneZ*)arg; FREE((void*)arg); @@ -1601,6 +1532,28 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpEr return (long)ret; } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err(JNIEnv * _env, jclass _b, jclass arg) { + LDKAccessError arg_conv = *(LDKAccessError*)arg; + FREE((void*)arg); + LDKCResult_TxOutAccessErrorZ* ret = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ"); + *ret = CResult_TxOutAccessErrorZ_err(arg_conv); + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKCResult_TxOutAccessErrorZ arg_conv = *(LDKCResult_TxOutAccessErrorZ*)arg; + FREE((void*)arg); + return CResult_TxOutAccessErrorZ_free(arg_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok(JNIEnv * _env, jclass _b, jlong arg) { + LDKTxOut arg_conv = *(LDKTxOut*)arg; + FREE((void*)arg); + LDKCResult_TxOutAccessErrorZ* ret = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ"); + *ret = CResult_TxOutAccessErrorZ_ok(arg_conv); + return (long)ret; +} + JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv * _env, jclass _b, jlong arg) { LDKLightningError arg_conv = *(LDKLightningError*)arg; FREE((void*)arg); @@ -1647,6 +1600,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCom return CVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ_free(arg_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1TxOutZZZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKCVec_C2Tuple_TxidCVec_TxOutZZZ arg_conv = *(LDKCVec_C2Tuple_TxidCVec_TxOutZZZ*)arg; + FREE((void*)arg); + return CVec_C2Tuple_TxidCVec_TxOutZZZ_free(arg_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKCVec_C2Tuple_usizeTransactionZZ arg_conv = *(LDKCVec_C2Tuple_usizeTransactionZZ*)arg; + FREE((void*)arg); + return CVec_C2Tuple_usizeTransactionZZ_free(arg_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv * _env, jclass _b, jlong arg) { LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_conv = *(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ*)arg; FREE((void*)arg); @@ -1743,6 +1708,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEn return CVec_TransactionZ_free(arg_conv); } +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxOutZ_1free(JNIEnv * _env, jclass _b, jlong arg) { + LDKCVec_TxOutZ arg_conv = *(LDKCVec_TxOutZ*)arg; + FREE((void*)arg); + return CVec_TxOutZ_free(arg_conv); +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv * _env, jclass _b, jlong arg) { LDKCVec_UpdateAddHTLCZ arg_conv = *(LDKCVec_UpdateAddHTLCZ*)arg; FREE((void*)arg); @@ -1779,10 +1750,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free(JNIEnv * _env, return CVec_u8Z_free(arg_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1usizeZ_1free(JNIEnv * _env, jclass _b, jlong arg) { - LDKCVec_usizeZ arg_conv = *(LDKCVec_usizeZ*)arg; - FREE((void*)arg); - return CVec_usizeZ_free(arg_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free(JNIEnv * _env, jclass _b, jlong _res) { + LDKTransaction _res_conv = *(LDKTransaction*)_res; + FREE((void*)_res); + return Transaction_free(_res_conv); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv * _env, jclass _b, jlong _res) { @@ -1791,19 +1762,44 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv * _env, jcl return TxOut_free(_res_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1new(JNIEnv * _env, jclass _b, jlong a, jint b) { - LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) { + LDKTransaction b_conv = *(LDKTransaction*)b; + FREE((void*)b); + LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ"); + *ret = C2Tuple_usizeTransactionZ_new(a, b_conv); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv * _env, jclass _b) { + LDKCResult_NoneChannelMonitorUpdateErrZ* ret = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ"); + *ret = CResult_NoneChannelMonitorUpdateErrZ_ok(); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv * _env, jclass _b) { + LDKCResult_NoneMonitorUpdateErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ"); + *ret = CResult_NoneMonitorUpdateErrorZ_ok(); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) { + LDKOutPoint a_conv = *(LDKOutPoint*)a; FREE((void*)a); - LDKC2Tuple_Txidu32Z* ret = MALLOC(sizeof(LDKC2Tuple_Txidu32Z), "LDKC2Tuple_Txidu32Z"); - *ret = C2Tuple_Txidu32Z_new(a_conv, b); + a_conv.is_owned = true; + LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b; + FREE((void*)b); + LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ"); + *ret = C2Tuple_OutPointScriptZ_new(a_conv, b_conv); return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) { - LDKCVec_u8Z a_conv = *(LDKCVec_u8Z*)a; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1TxOutZZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) { + LDKThirtyTwoBytes a_conv = *(LDKThirtyTwoBytes*)a; FREE((void*)a); - LDKC2Tuple_Scriptu64Z* ret = MALLOC(sizeof(LDKC2Tuple_Scriptu64Z), "LDKC2Tuple_Scriptu64Z"); - *ret = C2Tuple_Scriptu64Z_new(a_conv, b); + LDKCVec_TxOutZ b_conv = *(LDKCVec_TxOutZ*)b; + FREE((void*)b); + LDKC2Tuple_TxidCVec_TxOutZZ* ret = MALLOC(sizeof(LDKC2Tuple_TxidCVec_TxOutZZ), "LDKC2Tuple_TxidCVec_TxOutZZ"); + *ret = C2Tuple_TxidCVec_TxOutZZ_new(a_conv, b_conv); return (long)ret; } @@ -1853,29 +1849,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailu return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv * _env, jclass _b) { - LDKCResult_NoneChannelMonitorUpdateErrZ* ret = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ"); - *ret = CResult_NoneChannelMonitorUpdateErrZ_ok(); - return (long)ret; -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv * _env, jclass _b) { - LDKCResult_NoneMonitorUpdateErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ"); - *ret = CResult_NoneMonitorUpdateErrorZ_ok(); - return (long)ret; -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b) { - LDKOutPoint a_conv = *(LDKOutPoint*)a; - FREE((void*)a); - a_conv.is_owned = true; - LDKCVec_u8Z b_conv = *(LDKCVec_u8Z*)b; - FREE((void*)b); - LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ"); - *ret = C2Tuple_OutPointScriptZ_new(a_conv, b_conv); - return (long)ret; -} - JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv * _env, jclass _b, jlong a, jlong b, jlong c) { LDKChannelAnnouncement a_conv = *(LDKChannelAnnouncement*)a; FREE((void*)a); @@ -2278,22 +2251,28 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv * return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChainWatchInterface this_ptr_conv = *(LDKChainWatchInterface*)this_ptr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Access_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKAccess this_ptr_conv = *(LDKAccess*)this_ptr; FREE((void*)this_ptr); - return ChainWatchInterface_free(this_ptr_conv); + return Access_free(this_ptr_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)this_ptr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Watch_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKWatch this_ptr_conv = *(LDKWatch*)this_ptr; FREE((void*)this_ptr); - return BroadcasterInterface_free(this_ptr_conv); + return Watch_free(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKFilter this_ptr_conv = *(LDKFilter*)this_ptr; + FREE((void*)this_ptr); + return Filter_free(this_ptr_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainListener_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChainListener this_ptr_conv = *(LDKChainListener*)this_ptr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKBroadcasterInterface this_ptr_conv = *(LDKBroadcasterInterface*)this_ptr; FREE((void*)this_ptr); - return ChainListener_free(this_ptr_conv); + return BroadcasterInterface_free(this_ptr_conv); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { @@ -2302,137 +2281,242 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1free(JNIEnv * _e return FeeEstimator_free(this_ptr_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChainWatchedUtil this_ptr_conv = *(LDKChainWatchedUtil*)this_ptr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChainMonitor this_ptr_conv = *(LDKChainMonitor*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return ChainMonitor_free(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jlong txdata, jint height) { + LDKChainMonitor* this_arg_conv = (LDKChainMonitor*)this_arg; + unsigned char header_arr[80]; + (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr); + unsigned char (*header_ref)[80] = &header_arr; + LDKCVec_C2Tuple_usizeTransactionZZ txdata_conv = *(LDKCVec_C2Tuple_usizeTransactionZZ*)txdata; + FREE((void*)txdata); + return ChainMonitor_block_connected(this_arg_conv, header_ref, txdata_conv, height); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint disconnected_height) { + LDKChainMonitor* this_arg_conv = (LDKChainMonitor*)this_arg; + unsigned char header_arr[80]; + (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr); + unsigned char (*header_ref)[80] = &header_arr; + return ChainMonitor_block_disconnected(this_arg_conv, header_ref, disconnected_height); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1new(JNIEnv * _env, jclass _b, jlong chain_source, jlong broadcaster, jlong logger, jlong feeest) { + LDKFilter* chain_source_conv = (LDKFilter*)chain_source; + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)broadcaster; + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_clone(broadcaster_conv.this_arg); + } + LDKLogger logger_conv = *(LDKLogger*)logger; + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_clone(logger_conv.this_arg); + } + LDKFeeEstimator feeest_conv = *(LDKFeeEstimator*)feeest; + if (feeest_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_clone(feeest_conv.this_arg); + } + LDKChainMonitor* ret = MALLOC(sizeof(LDKChainMonitor), "LDKChainMonitor"); + *ret = ChainMonitor_new(chain_source_conv, broadcaster_conv, logger_conv, feeest_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Watch(JNIEnv * _env, jclass _b, jlong this_arg) { + LDKChainMonitor* this_arg_conv = (LDKChainMonitor*)this_arg; + LDKWatch* ret = MALLOC(sizeof(LDKWatch), "LDKWatch"); + *ret = ChainMonitor_as_Watch(this_arg_conv); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1EventsProvider(JNIEnv * _env, jclass _b, jlong this_arg) { + LDKChainMonitor* this_arg_conv = (LDKChainMonitor*)this_arg; + LDKEventsProvider* ret = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider"); + *ret = ChainMonitor_as_EventsProvider(this_arg_conv); + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelMonitorUpdate this_ptr_conv = *(LDKChannelMonitorUpdate*)this_ptr; FREE((void*)this_ptr); this_ptr_conv.is_owned = true; - return ChainWatchedUtil_free(this_ptr_conv); + return ChannelMonitorUpdate_free(this_ptr_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr; + return ChannelMonitorUpdate_get_update_id(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr; + return ChannelMonitorUpdate_set_update_id(this_ptr_conv, val); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) { + LDKChannelMonitorUpdate* obj_conv = (LDKChannelMonitorUpdate*)obj; + LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); + *ret = ChannelMonitorUpdate_write(obj_conv); + return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1new(JNIEnv * _env, jclass _b) { - LDKChainWatchedUtil* ret = MALLOC(sizeof(LDKChainWatchedUtil), "LDKChainWatchedUtil"); - *ret = ChainWatchedUtil_new(); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) { + LDKu8slice ser_conv = *(LDKu8slice*)ser; + FREE((void*)ser); + LDKChannelMonitorUpdate* ret = MALLOC(sizeof(LDKChannelMonitorUpdate), "LDKChannelMonitorUpdate"); + *ret = ChannelMonitorUpdate_read(ser_conv); assert(ret->is_owned); ret->is_owned = false; return (long)ret; } -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray txid, jlong script_pub_key) { - LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg; - unsigned char txid_arr[32]; - (*_env)->GetByteArrayRegion (_env, txid, 0, 32, txid_arr); - unsigned char (*txid_ref)[32] = &txid_arr; - LDKu8slice script_pub_key_conv = *(LDKu8slice*)script_pub_key; - FREE((void*)script_pub_key); - return ChainWatchedUtil_register_tx(this_arg_conv, txid_ref, script_pub_key_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKMonitorUpdateError this_ptr_conv = *(LDKMonitorUpdateError*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return MonitorUpdateError_free(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return MonitorEvent_free(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKHTLCUpdate this_ptr_conv = *(LDKHTLCUpdate*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return HTLCUpdate_free(this_ptr_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) { + LDKHTLCUpdate* obj_conv = (LDKHTLCUpdate*)obj; + LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); + *ret = HTLCUpdate_write(obj_conv); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) { + LDKu8slice ser_conv = *(LDKu8slice*)ser; + FREE((void*)ser); + LDKHTLCUpdate* ret = MALLOC(sizeof(LDKHTLCUpdate), "LDKHTLCUpdate"); + *ret = HTLCUpdate_read(ser_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; } -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1outpoint(JNIEnv * _env, jclass _b, jlong this_arg, jlong outpoint, jlong _script_pub_key) { - LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg; - LDKC2Tuple_Txidu32Z outpoint_conv = *(LDKC2Tuple_Txidu32Z*)outpoint; - FREE((void*)outpoint); - LDKu8slice _script_pub_key_conv = *(LDKu8slice*)_script_pub_key; - FREE((void*)_script_pub_key); - return ChainWatchedUtil_register_outpoint(this_arg_conv, outpoint_conv, _script_pub_key_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelMonitor this_ptr_conv = *(LDKChannelMonitor*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return ChannelMonitor_free(this_ptr_conv); } -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1watch_1all(JNIEnv * _env, jclass _b, jlong this_arg) { - LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg; - return ChainWatchedUtil_watch_all(this_arg_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor(JNIEnv * _env, jclass _b, jlong this_arg, jlong updates, jlong broadcaster, jlong logger) { + LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; + LDKChannelMonitorUpdate updates_conv = *(LDKChannelMonitorUpdate*)updates; + FREE((void*)updates); + updates_conv.is_owned = true; + LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster; + LDKLogger* logger_conv = (LDKLogger*)logger; + LDKCResult_NoneMonitorUpdateErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ"); + *ret = ChannelMonitor_update_monitor(this_arg_conv, updates_conv, broadcaster_conv, logger_conv); + return (long)ret; } -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) { - LDKChainWatchedUtil* this_arg_conv = (LDKChainWatchedUtil*)this_arg; - LDKTransaction tx_conv = *(LDKTransaction*)tx; - FREE((void*)tx); - return ChainWatchedUtil_does_match_tx(this_arg_conv, tx_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id(JNIEnv * _env, jclass _b, jlong this_arg) { + LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; + return ChannelMonitor_get_latest_update_id(this_arg_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKBlockNotifier this_ptr_conv = *(LDKBlockNotifier*)this_ptr; - FREE((void*)this_ptr); - this_ptr_conv.is_owned = true; - return BlockNotifier_free(this_ptr_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo(JNIEnv * _env, jclass _b, jlong this_arg) { + LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; + LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ"); + *ret = ChannelMonitor_get_funding_txo(this_arg_conv); + return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1new(JNIEnv * _env, jclass _b, jlong chain_monitor) { - LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor; - if (chain_monitor_conv.free == LDKChainWatchInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKChainWatchInterface_JCalls_clone(chain_monitor_conv.this_arg); - } - LDKBlockNotifier* ret = MALLOC(sizeof(LDKBlockNotifier), "LDKBlockNotifier"); - *ret = BlockNotifier_new(chain_monitor_conv); - assert(ret->is_owned); - ret->is_owned = false; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events(JNIEnv * _env, jclass _b, jlong this_arg) { + LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; + LDKCVec_MonitorEventZ* ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ"); + *ret = ChannelMonitor_get_and_clear_pending_monitor_events(this_arg_conv); return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1register_1listener(JNIEnv * _env, jclass _b, jlong this_arg, jlong listener) { - LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg; - LDKChainListener listener_conv = *(LDKChainListener*)listener; - if (listener_conv.free == LDKChainListener_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKChainListener_JCalls_clone(listener_conv.this_arg); - } - return BlockNotifier_register_listener(this_arg_conv, listener_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events(JNIEnv * _env, jclass _b, jlong this_arg) { + LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; + LDKCVec_EventZ* ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ"); + *ret = ChannelMonitor_get_and_clear_pending_events(this_arg_conv); + return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jlong block, jint height) { - LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg; - LDKu8slice block_conv = *(LDKu8slice*)block; - FREE((void*)block); - return BlockNotifier_block_connected(this_arg_conv, block_conv, height); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn(JNIEnv * _env, jclass _b, jlong this_arg, jlong logger) { + LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; + LDKLogger* logger_conv = (LDKLogger*)logger; + LDKCVec_TransactionZ* ret = MALLOC(sizeof(LDKCVec_TransactionZ), "LDKCVec_TransactionZ"); + *ret = ChannelMonitor_get_latest_holder_commitment_txn(this_arg_conv, logger_conv); + return (long)ret; } -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected_1checked(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint height, jlong txn_matched, jlong indexes_of_txn_matched) { - LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jlong txdata, jint height, jlong broadcaster, jlong fee_estimator, jlong logger) { + LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; unsigned char header_arr[80]; (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr); unsigned char (*header_ref)[80] = &header_arr; - LDKCVec_TransactionZ txn_matched_conv = *(LDKCVec_TransactionZ*)txn_matched; - FREE((void*)txn_matched); - LDKusizeslice indexes_of_txn_matched_conv = *(LDKusizeslice*)indexes_of_txn_matched; - FREE((void*)indexes_of_txn_matched); - return BlockNotifier_block_connected_checked(this_arg_conv, header_ref, height, txn_matched_conv, indexes_of_txn_matched_conv); + LDKCVec_C2Tuple_usizeTransactionZZ txdata_conv = *(LDKCVec_C2Tuple_usizeTransactionZZ*)txdata; + FREE((void*)txdata); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)broadcaster; + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_clone(broadcaster_conv.this_arg); + } + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator; + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_clone(fee_estimator_conv.this_arg); + } + LDKLogger logger_conv = *(LDKLogger*)logger; + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_clone(logger_conv.this_arg); + } + LDKCVec_C2Tuple_TxidCVec_TxOutZZZ* ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_TxOutZZZ), "LDKCVec_C2Tuple_TxidCVec_TxOutZZZ"); + *ret = ChannelMonitor_block_connected(this_arg_conv, header_ref, txdata_conv, height, broadcaster_conv, fee_estimator_conv, logger_conv); + return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint disconnected_height) { - LDKBlockNotifier* this_arg_conv = (LDKBlockNotifier*)this_arg; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jint height, jlong broadcaster, jlong fee_estimator, jlong logger) { + LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; unsigned char header_arr[80]; (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr); unsigned char (*header_ref)[80] = &header_arr; - return BlockNotifier_block_disconnected(this_arg_conv, header_ref, disconnected_height); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChainWatchInterfaceUtil this_ptr_conv = *(LDKChainWatchInterfaceUtil*)this_ptr; - FREE((void*)this_ptr); - this_ptr_conv.is_owned = true; - return ChainWatchInterfaceUtil_free(this_ptr_conv); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1as_1ChainWatchInterface(JNIEnv * _env, jclass _b, jlong this_arg) { - LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg; - LDKChainWatchInterface* ret = MALLOC(sizeof(LDKChainWatchInterface), "LDKChainWatchInterface"); - *ret = ChainWatchInterfaceUtil_as_ChainWatchInterface(this_arg_conv); - return (long)ret; -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1new(JNIEnv * _env, jclass _b, jclass network) { - LDKNetwork network_conv = LDKNetwork_from_java(_env, network); - LDKChainWatchInterfaceUtil* ret = MALLOC(sizeof(LDKChainWatchInterfaceUtil), "LDKChainWatchInterfaceUtil"); - *ret = ChainWatchInterfaceUtil_new(network_conv); - assert(ret->is_owned); - ret->is_owned = false; - return (long)ret; -} - -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1does_1match_1tx(JNIEnv * _env, jclass _b, jlong this_arg, jlong tx) { - LDKChainWatchInterfaceUtil* this_arg_conv = (LDKChainWatchInterfaceUtil*)this_arg; - LDKTransaction tx_conv = *(LDKTransaction*)tx; - FREE((void*)tx); - return ChainWatchInterfaceUtil_does_match_tx(this_arg_conv, tx_conv); + LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)broadcaster; + if (broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_clone(broadcaster_conv.this_arg); + } + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator; + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_clone(fee_estimator_conv.this_arg); + } + LDKLogger logger_conv = *(LDKLogger*)logger; + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_clone(logger_conv.this_arg); + } + return ChannelMonitor_block_disconnected(this_arg_conv, header_ref, height, broadcaster_conv, fee_estimator_conv, logger_conv); } JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { @@ -2631,23 +2715,23 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new(JNIE return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1pubkeys(JNIEnv * _env, jclass _b, jlong this_arg) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1pubkeys(JNIEnv * _env, jclass _b, jlong this_arg) { LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg; LDKChannelPublicKeys* ret = MALLOC(sizeof(LDKChannelPublicKeys), "LDKChannelPublicKeys"); - *ret = InMemoryChannelKeys_remote_pubkeys(this_arg_conv); + *ret = InMemoryChannelKeys_counterparty_pubkeys(this_arg_conv); assert(ret->is_owned); ret->is_owned = false; return (long)ret; } -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) { +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1selected_1contest_1delay(JNIEnv * _env, jclass _b, jlong this_arg) { LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg; - return InMemoryChannelKeys_remote_to_self_delay(this_arg_conv); + return InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg_conv); } -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1local_1to_1self_1delay(JNIEnv * _env, jclass _b, jlong this_arg) { +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1holder_1selected_1contest_1delay(JNIEnv * _env, jclass _b, jlong this_arg) { LDKInMemoryChannelKeys* this_arg_conv = (LDKInMemoryChannelKeys*)this_arg; - return InMemoryChannelKeys_local_to_self_delay(this_arg_conv); + return InMemoryChannelKeys_holder_selected_contest_delay(this_arg_conv); } JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1ChannelKeys(JNIEnv * _env, jclass _b, jlong this_arg) { @@ -2825,17 +2909,17 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEn return PaymentSendFailure_free(this_ptr_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new(JNIEnv * _env, jclass _b, jclass network, jlong fee_est, jlong monitor, jlong tx_broadcaster, jlong logger, jlong keys_manager, jlong config, jlong current_blockchain_height) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new(JNIEnv * _env, jclass _b, jclass network, jlong fee_est, jlong chain_monitor, jlong tx_broadcaster, jlong logger, jlong keys_manager, jlong config, jlong current_blockchain_height) { LDKNetwork network_conv = LDKNetwork_from_java(_env, network); LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)fee_est; if (fee_est_conv.free == LDKFeeEstimator_JCalls_free) { // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKFeeEstimator_JCalls_clone(fee_est_conv.this_arg); } - LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor; - if (monitor_conv.free == LDKManyChannelMonitor_JCalls_free) { + LDKWatch chain_monitor_conv = *(LDKWatch*)chain_monitor; + if (chain_monitor_conv.free == LDKWatch_JCalls_free) { // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKManyChannelMonitor_JCalls_clone(monitor_conv.this_arg); + LDKWatch_JCalls_clone(chain_monitor_conv.this_arg); } LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster; if (tx_broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { @@ -2856,7 +2940,7 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new(JNIEnv * FREE((void*)config); config_conv.is_owned = true; LDKChannelManager* ret = MALLOC(sizeof(LDKChannelManager), "LDKChannelManager"); - *ret = ChannelManager_new(network_conv, fee_est_conv, monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height); + *ret = ChannelManager_new(network_conv, fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height); assert(ret->is_owned); ret->is_owned = false; return (long)ret; @@ -3001,11 +3085,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsPro return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChainListener(JNIEnv * _env, jclass _b, jlong this_arg) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1connected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header, jlong txdata, jint height) { LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg; - LDKChainListener* ret = MALLOC(sizeof(LDKChainListener), "LDKChainListener"); - *ret = ChannelManager_as_ChainListener(this_arg_conv); - return (long)ret; + unsigned char header_arr[80]; + (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr); + unsigned char (*header_ref)[80] = &header_arr; + LDKCVec_C2Tuple_usizeTransactionZZ txdata_conv = *(LDKCVec_C2Tuple_usizeTransactionZZ*)txdata; + FREE((void*)txdata); + return ChannelManager_block_connected(this_arg_conv, header_ref, txdata_conv, height); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconnected(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray header) { + LDKChannelManager* this_arg_conv = (LDKChannelManager*)this_arg; + unsigned char header_arr[80]; + (*_env)->GetByteArrayRegion (_env, header, 0, 80, header_arr); + unsigned char (*header_ref)[80] = &header_arr; + return ChannelManager_block_disconnected(this_arg_conv, header_ref); } JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler(JNIEnv * _env, jclass _b, jlong this_arg) { @@ -3054,20 +3149,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1f return ChannelManagerReadArgs_set_fee_estimator(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1chain_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; - long ret = (long)ChannelManagerReadArgs_get_monitor(this_ptr_conv); + long ret = (long)ChannelManagerReadArgs_get_chain_monitor(this_ptr_conv); return ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1chain_1monitor(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; - LDKManyChannelMonitor val_conv = *(LDKManyChannelMonitor*)val; - if (val_conv.free == LDKManyChannelMonitor_JCalls_free) { + LDKWatch val_conv = *(LDKWatch*)val; + if (val_conv.free == LDKWatch_JCalls_free) { // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKManyChannelMonitor_JCalls_clone(val_conv.this_arg); + LDKWatch_JCalls_clone(val_conv.this_arg); } - return ChannelManagerReadArgs_set_monitor(this_ptr_conv, val_conv); + return ChannelManagerReadArgs_set_chain_monitor(this_ptr_conv, val_conv); } JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1tx_1broadcaster(JNIEnv * _env, jclass _b, jlong this_ptr) { @@ -3081,210 +3176,79 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1t LDKBroadcasterInterface val_conv = *(LDKBroadcasterInterface*)val; if (val_conv.free == LDKBroadcasterInterface_JCalls_free) { // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKBroadcasterInterface_JCalls_clone(val_conv.this_arg); - } - return ChannelManagerReadArgs_set_tx_broadcaster(this_ptr_conv, val_conv); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1logger(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; - long ret = (long)ChannelManagerReadArgs_get_logger(this_ptr_conv); - return ret; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1logger(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; - LDKLogger val_conv = *(LDKLogger*)val; - if (val_conv.free == LDKLogger_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKLogger_JCalls_clone(val_conv.this_arg); - } - return ChannelManagerReadArgs_set_logger(this_ptr_conv, val_conv); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; - LDKUserConfig* ret = MALLOC(sizeof(LDKUserConfig), "LDKUserConfig"); - *ret = ChannelManagerReadArgs_get_default_config(this_ptr_conv); - assert(ret->is_owned); - ret->is_owned = false; - return (long)ret; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; - LDKUserConfig val_conv = *(LDKUserConfig*)val; - FREE((void*)val); - val_conv.is_owned = true; - return ChannelManagerReadArgs_set_default_config(this_ptr_conv, val_conv); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1new(JNIEnv * _env, jclass _b, jlong keys_manager, jlong fee_estimator, jlong monitor, jlong tx_broadcaster, jlong logger, jlong default_config, jlong channel_monitors) { - LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager; - if (keys_manager_conv.free == LDKKeysInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKKeysInterface_JCalls_clone(keys_manager_conv.this_arg); - } - LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator; - if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKFeeEstimator_JCalls_clone(fee_estimator_conv.this_arg); - } - LDKManyChannelMonitor monitor_conv = *(LDKManyChannelMonitor*)monitor; - if (monitor_conv.free == LDKManyChannelMonitor_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKManyChannelMonitor_JCalls_clone(monitor_conv.this_arg); - } - LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster; - if (tx_broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKBroadcasterInterface_JCalls_clone(tx_broadcaster_conv.this_arg); - } - LDKLogger logger_conv = *(LDKLogger*)logger; - if (logger_conv.free == LDKLogger_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKLogger_JCalls_clone(logger_conv.this_arg); - } - LDKUserConfig default_config_conv = *(LDKUserConfig*)default_config; - FREE((void*)default_config); - default_config_conv.is_owned = true; - LDKCVec_ChannelMonitorZ channel_monitors_conv = *(LDKCVec_ChannelMonitorZ*)channel_monitors; - FREE((void*)channel_monitors); - LDKChannelManagerReadArgs* ret = MALLOC(sizeof(LDKChannelManagerReadArgs), "LDKChannelManagerReadArgs"); - *ret = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_conv); - assert(ret->is_owned); - ret->is_owned = false; - return (long)ret; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChannelMonitorUpdate this_ptr_conv = *(LDKChannelMonitorUpdate*)this_ptr; - FREE((void*)this_ptr); - this_ptr_conv.is_owned = true; - return ChannelMonitorUpdate_free(this_ptr_conv); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr; - return ChannelMonitorUpdate_get_update_id(this_ptr_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKChannelMonitorUpdate* this_ptr_conv = (LDKChannelMonitorUpdate*)this_ptr; - return ChannelMonitorUpdate_set_update_id(this_ptr_conv, val); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) { - LDKChannelMonitorUpdate* obj_conv = (LDKChannelMonitorUpdate*)obj; - LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); - *ret = ChannelMonitorUpdate_write(obj_conv); - return (long)ret; -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) { - LDKu8slice ser_conv = *(LDKu8slice*)ser; - FREE((void*)ser); - LDKChannelMonitorUpdate* ret = MALLOC(sizeof(LDKChannelMonitorUpdate), "LDKChannelMonitorUpdate"); - *ret = ChannelMonitorUpdate_read(ser_conv); - assert(ret->is_owned); - ret->is_owned = false; - return (long)ret; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKMonitorUpdateError this_ptr_conv = *(LDKMonitorUpdateError*)this_ptr; - FREE((void*)this_ptr); - this_ptr_conv.is_owned = true; - return MonitorUpdateError_free(this_ptr_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)this_ptr; - FREE((void*)this_ptr); - this_ptr_conv.is_owned = true; - return MonitorEvent_free(this_ptr_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKHTLCUpdate this_ptr_conv = *(LDKHTLCUpdate*)this_ptr; - FREE((void*)this_ptr); - this_ptr_conv.is_owned = true; - return HTLCUpdate_free(this_ptr_conv); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEnv * _env, jclass _b, jlong obj) { - LDKHTLCUpdate* obj_conv = (LDKHTLCUpdate*)obj; - LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); - *ret = HTLCUpdate_write(obj_conv); - return (long)ret; -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read(JNIEnv * _env, jclass _b, jlong ser) { - LDKu8slice ser_conv = *(LDKu8slice*)ser; - FREE((void*)ser); - LDKHTLCUpdate* ret = MALLOC(sizeof(LDKHTLCUpdate), "LDKHTLCUpdate"); - *ret = HTLCUpdate_read(ser_conv); - assert(ret->is_owned); - ret->is_owned = false; - return (long)ret; -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChannelMonitor this_ptr_conv = *(LDKChannelMonitor*)this_ptr; - FREE((void*)this_ptr); - this_ptr_conv.is_owned = true; - return ChannelMonitor_free(this_ptr_conv); -} - -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ManyChannelMonitor_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKManyChannelMonitor this_ptr_conv = *(LDKManyChannelMonitor*)this_ptr; - FREE((void*)this_ptr); - return ManyChannelMonitor_free(this_ptr_conv); -} - -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor(JNIEnv * _env, jclass _b, jlong this_arg, jlong updates, jlong broadcaster, jlong logger) { - LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; - LDKChannelMonitorUpdate updates_conv = *(LDKChannelMonitorUpdate*)updates; - FREE((void*)updates); - updates_conv.is_owned = true; - LDKBroadcasterInterface* broadcaster_conv = (LDKBroadcasterInterface*)broadcaster; - LDKLogger* logger_conv = (LDKLogger*)logger; - LDKCResult_NoneMonitorUpdateErrorZ* ret = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ"); - *ret = ChannelMonitor_update_monitor(this_arg_conv, updates_conv, broadcaster_conv, logger_conv); - return (long)ret; + LDKBroadcasterInterface_JCalls_clone(val_conv.this_arg); + } + return ChannelManagerReadArgs_set_tx_broadcaster(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id(JNIEnv * _env, jclass _b, jlong this_arg) { - LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; - return ChannelMonitor_get_latest_update_id(this_arg_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1logger(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; + long ret = (long)ChannelManagerReadArgs_get_logger(this_ptr_conv); + return ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo(JNIEnv * _env, jclass _b, jlong this_arg) { - LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; - LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ"); - *ret = ChannelMonitor_get_funding_txo(this_arg_conv); - return (long)ret; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1logger(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; + LDKLogger val_conv = *(LDKLogger*)val; + if (val_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_clone(val_conv.this_arg); + } + return ChannelManagerReadArgs_set_logger(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events(JNIEnv * _env, jclass _b, jlong this_arg) { - LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; - LDKCVec_MonitorEventZ* ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ"); - *ret = ChannelMonitor_get_and_clear_pending_monitor_events(this_arg_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; + LDKUserConfig* ret = MALLOC(sizeof(LDKUserConfig), "LDKUserConfig"); + *ret = ChannelManagerReadArgs_get_default_config(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events(JNIEnv * _env, jclass _b, jlong this_arg) { - LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; - LDKCVec_EventZ* ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ"); - *ret = ChannelMonitor_get_and_clear_pending_events(this_arg_conv); - return (long)ret; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1default_1config(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKChannelManagerReadArgs* this_ptr_conv = (LDKChannelManagerReadArgs*)this_ptr; + LDKUserConfig val_conv = *(LDKUserConfig*)val; + FREE((void*)val); + val_conv.is_owned = true; + return ChannelManagerReadArgs_set_default_config(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1local_1commitment_1txn(JNIEnv * _env, jclass _b, jlong this_arg, jlong logger) { - LDKChannelMonitor* this_arg_conv = (LDKChannelMonitor*)this_arg; - LDKLogger* logger_conv = (LDKLogger*)logger; - LDKCVec_TransactionZ* ret = MALLOC(sizeof(LDKCVec_TransactionZ), "LDKCVec_TransactionZ"); - *ret = ChannelMonitor_get_latest_local_commitment_txn(this_arg_conv, logger_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1new(JNIEnv * _env, jclass _b, jlong keys_manager, jlong fee_estimator, jlong chain_monitor, jlong tx_broadcaster, jlong logger, jlong default_config, jlong channel_monitors) { + LDKKeysInterface keys_manager_conv = *(LDKKeysInterface*)keys_manager; + if (keys_manager_conv.free == LDKKeysInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKKeysInterface_JCalls_clone(keys_manager_conv.this_arg); + } + LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)fee_estimator; + if (fee_estimator_conv.free == LDKFeeEstimator_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKFeeEstimator_JCalls_clone(fee_estimator_conv.this_arg); + } + LDKWatch chain_monitor_conv = *(LDKWatch*)chain_monitor; + if (chain_monitor_conv.free == LDKWatch_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKWatch_JCalls_clone(chain_monitor_conv.this_arg); + } + LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)tx_broadcaster; + if (tx_broadcaster_conv.free == LDKBroadcasterInterface_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKBroadcasterInterface_JCalls_clone(tx_broadcaster_conv.this_arg); + } + LDKLogger logger_conv = *(LDKLogger*)logger; + if (logger_conv.free == LDKLogger_JCalls_free) { + // If this_arg is a JCalls struct, then we need to increment the refcnt in it. + LDKLogger_JCalls_clone(logger_conv.this_arg); + } + LDKUserConfig default_config_conv = *(LDKUserConfig*)default_config; + FREE((void*)default_config); + default_config_conv.is_owned = true; + LDKCVec_ChannelMonitorZ channel_monitors_conv = *(LDKCVec_ChannelMonitorZ*)channel_monitors; + FREE((void*)channel_monitors); + LDKChannelManagerReadArgs* ret = MALLOC(sizeof(LDKChannelManagerReadArgs), "LDKChannelManagerReadArgs"); + *ret = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_conv); + assert(ret->is_owned); + ret->is_owned = false; return (long)ret; } @@ -4602,6 +4566,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free return UnsignedNodeAnnouncement_free(this_ptr_conv); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1features(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr; + LDKNodeFeatures* ret = MALLOC(sizeof(LDKNodeFeatures), "LDKNodeFeatures"); + *ret = UnsignedNodeAnnouncement_get_features(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr; + LDKNodeFeatures val_conv = *(LDKNodeFeatures*)val; + FREE((void*)val); + val_conv.is_owned = true; + return UnsignedNodeAnnouncement_set_features(this_ptr_conv, val_conv); +} + JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKUnsignedNodeAnnouncement* this_ptr_conv = (LDKUnsignedNodeAnnouncement*)this_ptr; return UnsignedNodeAnnouncement_get_timestamp(this_ptr_conv); @@ -4719,6 +4700,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1f return UnsignedChannelAnnouncement_free(this_ptr_conv); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1features(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr; + LDKChannelFeatures* ret = MALLOC(sizeof(LDKChannelFeatures), "LDKChannelFeatures"); + *ret = UnsignedChannelAnnouncement_get_features(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr; + LDKChannelFeatures val_conv = *(LDKChannelFeatures*)val; + FREE((void*)val); + val_conv.is_owned = true; + return UnsignedChannelAnnouncement_set_features(this_ptr_conv, val_conv); +} + JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKUnsignedChannelAnnouncement* this_ptr_conv = (LDKUnsignedChannelAnnouncement*)this_ptr; jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32); @@ -4949,92 +4947,345 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fl return UnsignedChannelUpdate_set_flags(this_ptr_conv, val); } -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; - return UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr_conv); +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; + return UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) { + LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; + return UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr_conv, val); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; + return UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; + return UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr_conv, val); +} + +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; + return UnsignedChannelUpdate_get_fee_base_msat(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; + return UnsignedChannelUpdate_set_fee_base_msat(this_ptr_conv, val); +} + +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; + return UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; + return UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr_conv, val); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelUpdate this_ptr_conv = *(LDKChannelUpdate*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return ChannelUpdate_free(this_ptr_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr; + LDKSignature* ret = MALLOC(sizeof(LDKSignature), "LDKSignature"); + *ret = ChannelUpdate_get_signature(this_ptr_conv); + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr; + LDKSignature val_conv = *(LDKSignature*)val; + FREE((void*)val); + return ChannelUpdate_set_signature(this_ptr_conv, val_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr; + LDKUnsignedChannelUpdate* ret = MALLOC(sizeof(LDKUnsignedChannelUpdate), "LDKUnsignedChannelUpdate"); + *ret = ChannelUpdate_get_contents(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr; + LDKUnsignedChannelUpdate val_conv = *(LDKUnsignedChannelUpdate*)val; + FREE((void*)val); + val_conv.is_owned = true; + return ChannelUpdate_set_contents(this_ptr_conv, val_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) { + LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg; + FREE((void*)signature_arg); + LDKUnsignedChannelUpdate contents_arg_conv = *(LDKUnsignedChannelUpdate*)contents_arg; + FREE((void*)contents_arg); + contents_arg_conv.is_owned = true; + LDKChannelUpdate* ret = MALLOC(sizeof(LDKChannelUpdate), "LDKChannelUpdate"); + *ret = ChannelUpdate_new(signature_arg_conv, contents_arg_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKQueryChannelRange this_ptr_conv = *(LDKQueryChannelRange*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return QueryChannelRange_free(this_ptr_conv); +} + +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKQueryChannelRange* this_ptr_conv = (LDKQueryChannelRange*)this_ptr; + jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32); + (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *QueryChannelRange_get_chain_hash(this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKQueryChannelRange* this_ptr_conv = (LDKQueryChannelRange*)this_ptr; + LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val; + FREE((void*)val); + return QueryChannelRange_set_chain_hash(this_ptr_conv, val_conv); +} + +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1first_1blocknum(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKQueryChannelRange* this_ptr_conv = (LDKQueryChannelRange*)this_ptr; + return QueryChannelRange_get_first_blocknum(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1first_1blocknum(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKQueryChannelRange* this_ptr_conv = (LDKQueryChannelRange*)this_ptr; + return QueryChannelRange_set_first_blocknum(this_ptr_conv, val); +} + +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1number_1of_1blocks(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKQueryChannelRange* this_ptr_conv = (LDKQueryChannelRange*)this_ptr; + return QueryChannelRange_get_number_of_blocks(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1number_1of_1blocks(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKQueryChannelRange* this_ptr_conv = (LDKQueryChannelRange*)this_ptr; + return QueryChannelRange_set_number_of_blocks(this_ptr_conv, val); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jint first_blocknum_arg, jint number_of_blocks_arg) { + LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg; + FREE((void*)chain_hash_arg); + LDKQueryChannelRange* ret = MALLOC(sizeof(LDKQueryChannelRange), "LDKQueryChannelRange"); + *ret = QueryChannelRange_new(chain_hash_arg_conv, first_blocknum_arg, number_of_blocks_arg); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKReplyChannelRange this_ptr_conv = *(LDKReplyChannelRange*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return ReplyChannelRange_free(this_ptr_conv); +} + +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32); + (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ReplyChannelRange_get_chain_hash(this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val; + FREE((void*)val); + return ReplyChannelRange_set_chain_hash(this_ptr_conv, val_conv); +} + +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1first_1blocknum(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + return ReplyChannelRange_get_first_blocknum(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1first_1blocknum(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + return ReplyChannelRange_set_first_blocknum(this_ptr_conv, val); +} + +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1number_1of_1blocks(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + return ReplyChannelRange_get_number_of_blocks(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1number_1of_1blocks(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + return ReplyChannelRange_set_number_of_blocks(this_ptr_conv, val); +} + +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1full_1information(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + return ReplyChannelRange_get_full_information(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1full_1information(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + return ReplyChannelRange_set_full_information(this_ptr_conv, val); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1short_1channel_1ids(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKReplyChannelRange* this_ptr_conv = (LDKReplyChannelRange*)this_ptr; + LDKCVec_u64Z val_conv = *(LDKCVec_u64Z*)val; + FREE((void*)val); + return ReplyChannelRange_set_short_channel_ids(this_ptr_conv, val_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jint first_blocknum_arg, jint number_of_blocks_arg, jboolean full_information_arg, jlong short_channel_ids_arg) { + LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg; + FREE((void*)chain_hash_arg); + LDKCVec_u64Z short_channel_ids_arg_conv = *(LDKCVec_u64Z*)short_channel_ids_arg; + FREE((void*)short_channel_ids_arg); + LDKReplyChannelRange* ret = MALLOC(sizeof(LDKReplyChannelRange), "LDKReplyChannelRange"); + *ret = ReplyChannelRange_new(chain_hash_arg_conv, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKQueryShortChannelIds this_ptr_conv = *(LDKQueryShortChannelIds*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return QueryShortChannelIds_free(this_ptr_conv); +} + +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKQueryShortChannelIds* this_ptr_conv = (LDKQueryShortChannelIds*)this_ptr; + jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32); + (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *QueryShortChannelIds_get_chain_hash(this_ptr_conv)); + return ret_arr; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKQueryShortChannelIds* this_ptr_conv = (LDKQueryShortChannelIds*)this_ptr; + LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val; + FREE((void*)val); + return QueryShortChannelIds_set_chain_hash(this_ptr_conv, val_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1cltv_1expiry_1delta(JNIEnv * _env, jclass _b, jlong this_ptr, jshort val) { - LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; - return UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr_conv, val); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1short_1channel_1ids(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKQueryShortChannelIds* this_ptr_conv = (LDKQueryShortChannelIds*)this_ptr; + LDKCVec_u64Z val_conv = *(LDKCVec_u64Z*)val; + FREE((void*)val); + return QueryShortChannelIds_set_short_channel_ids(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; - return UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jlong short_channel_ids_arg) { + LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg; + FREE((void*)chain_hash_arg); + LDKCVec_u64Z short_channel_ids_arg_conv = *(LDKCVec_u64Z*)short_channel_ids_arg; + FREE((void*)short_channel_ids_arg); + LDKQueryShortChannelIds* ret = MALLOC(sizeof(LDKQueryShortChannelIds), "LDKQueryShortChannelIds"); + *ret = QueryShortChannelIds_new(chain_hash_arg_conv, short_channel_ids_arg_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1htlc_1minimum_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; - return UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr_conv, val); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKReplyShortChannelIdsEnd this_ptr_conv = *(LDKReplyShortChannelIdsEnd*)this_ptr; + FREE((void*)this_ptr); + this_ptr_conv.is_owned = true; + return ReplyShortChannelIdsEnd_free(this_ptr_conv); } -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; - return UnsignedChannelUpdate_get_fee_base_msat(this_ptr_conv); +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKReplyShortChannelIdsEnd* this_ptr_conv = (LDKReplyShortChannelIdsEnd*)this_ptr; + jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32); + (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *ReplyShortChannelIdsEnd_get_chain_hash(this_ptr_conv)); + return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1base_1msat(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { - LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; - return UnsignedChannelUpdate_set_fee_base_msat(this_ptr_conv, val); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKReplyShortChannelIdsEnd* this_ptr_conv = (LDKReplyShortChannelIdsEnd*)this_ptr; + LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val; + FREE((void*)val); + return ReplyShortChannelIdsEnd_set_chain_hash(this_ptr_conv, val_conv); } -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; - return UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr_conv); +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1get_1full_1information(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKReplyShortChannelIdsEnd* this_ptr_conv = (LDKReplyShortChannelIdsEnd*)this_ptr; + return ReplyShortChannelIdsEnd_get_full_information(this_ptr_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { - LDKUnsignedChannelUpdate* this_ptr_conv = (LDKUnsignedChannelUpdate*)this_ptr; - return UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr_conv, val); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1set_1full_1information(JNIEnv * _env, jclass _b, jlong this_ptr, jboolean val) { + LDKReplyShortChannelIdsEnd* this_ptr_conv = (LDKReplyShortChannelIdsEnd*)this_ptr; + return ReplyShortChannelIdsEnd_set_full_information(this_ptr_conv, val); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChannelUpdate this_ptr_conv = *(LDKChannelUpdate*)this_ptr; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jboolean full_information_arg) { + LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg; + FREE((void*)chain_hash_arg); + LDKReplyShortChannelIdsEnd* ret = MALLOC(sizeof(LDKReplyShortChannelIdsEnd), "LDKReplyShortChannelIdsEnd"); + *ret = ReplyShortChannelIdsEnd_new(chain_hash_arg_conv, full_information_arg); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKGossipTimestampFilter this_ptr_conv = *(LDKGossipTimestampFilter*)this_ptr; FREE((void*)this_ptr); this_ptr_conv.is_owned = true; - return ChannelUpdate_free(this_ptr_conv); + return GossipTimestampFilter_free(this_ptr_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr; - LDKSignature* ret = MALLOC(sizeof(LDKSignature), "LDKSignature"); - *ret = ChannelUpdate_get_signature(this_ptr_conv); - return (long)ret; +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKGossipTimestampFilter* this_ptr_conv = (LDKGossipTimestampFilter*)this_ptr; + jbyteArray ret_arr = (*_env)->NewByteArray(_env, 32); + (*_env)->SetByteArrayRegion(_env, ret_arr, 0, 32, *GossipTimestampFilter_get_chain_hash(this_ptr_conv)); + return ret_arr; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr; - LDKSignature val_conv = *(LDKSignature*)val; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1chain_1hash(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKGossipTimestampFilter* this_ptr_conv = (LDKGossipTimestampFilter*)this_ptr; + LDKThirtyTwoBytes val_conv = *(LDKThirtyTwoBytes*)val; FREE((void*)val); - return ChannelUpdate_set_signature(this_ptr_conv, val_conv); + return GossipTimestampFilter_set_chain_hash(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1contents(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr; - LDKUnsignedChannelUpdate* ret = MALLOC(sizeof(LDKUnsignedChannelUpdate), "LDKUnsignedChannelUpdate"); - *ret = ChannelUpdate_get_contents(this_ptr_conv); - assert(ret->is_owned); - ret->is_owned = false; - return (long)ret; +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1first_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKGossipTimestampFilter* this_ptr_conv = (LDKGossipTimestampFilter*)this_ptr; + return GossipTimestampFilter_get_first_timestamp(this_ptr_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1contents(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKChannelUpdate* this_ptr_conv = (LDKChannelUpdate*)this_ptr; - LDKUnsignedChannelUpdate val_conv = *(LDKUnsignedChannelUpdate*)val; - FREE((void*)val); - val_conv.is_owned = true; - return ChannelUpdate_set_contents(this_ptr_conv, val_conv); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1first_1timestamp(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKGossipTimestampFilter* this_ptr_conv = (LDKGossipTimestampFilter*)this_ptr; + return GossipTimestampFilter_set_first_timestamp(this_ptr_conv, val); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new(JNIEnv * _env, jclass _b, jlong signature_arg, jlong contents_arg) { - LDKSignature signature_arg_conv = *(LDKSignature*)signature_arg; - FREE((void*)signature_arg); - LDKUnsignedChannelUpdate contents_arg_conv = *(LDKUnsignedChannelUpdate*)contents_arg; - FREE((void*)contents_arg); - contents_arg_conv.is_owned = true; - LDKChannelUpdate* ret = MALLOC(sizeof(LDKChannelUpdate), "LDKChannelUpdate"); - *ret = ChannelUpdate_new(signature_arg_conv, contents_arg_conv); +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1timestamp_1range(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKGossipTimestampFilter* this_ptr_conv = (LDKGossipTimestampFilter*)this_ptr; + return GossipTimestampFilter_get_timestamp_range(this_ptr_conv); +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1timestamp_1range(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKGossipTimestampFilter* this_ptr_conv = (LDKGossipTimestampFilter*)this_ptr; + return GossipTimestampFilter_set_timestamp_range(this_ptr_conv, val); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new(JNIEnv * _env, jclass _b, jlong chain_hash_arg, jint first_timestamp_arg, jint timestamp_range_arg) { + LDKThirtyTwoBytes chain_hash_arg_conv = *(LDKThirtyTwoBytes*)chain_hash_arg; + FREE((void*)chain_hash_arg); + LDKGossipTimestampFilter* ret = MALLOC(sizeof(LDKGossipTimestampFilter), "LDKGossipTimestampFilter"); + *ret = GossipTimestampFilter_new(chain_hash_arg_conv, first_timestamp_arg, timestamp_range_arg); assert(ret->is_owned); ret->is_owned = false; return (long)ret; @@ -5644,6 +5895,91 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1read(JNIEnv return (long)ret; } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1read(JNIEnv * _env, jclass _b, jlong ser) { + LDKu8slice ser_conv = *(LDKu8slice*)ser; + FREE((void*)ser); + LDKQueryShortChannelIds* ret = MALLOC(sizeof(LDKQueryShortChannelIds), "LDKQueryShortChannelIds"); + *ret = QueryShortChannelIds_read(ser_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1write(JNIEnv * _env, jclass _b, jlong obj) { + LDKQueryShortChannelIds* obj_conv = (LDKQueryShortChannelIds*)obj; + LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); + *ret = QueryShortChannelIds_write(obj_conv); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1read(JNIEnv * _env, jclass _b, jlong ser) { + LDKu8slice ser_conv = *(LDKu8slice*)ser; + FREE((void*)ser); + LDKReplyShortChannelIdsEnd* ret = MALLOC(sizeof(LDKReplyShortChannelIdsEnd), "LDKReplyShortChannelIdsEnd"); + *ret = ReplyShortChannelIdsEnd_read(ser_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1write(JNIEnv * _env, jclass _b, jlong obj) { + LDKReplyShortChannelIdsEnd* obj_conv = (LDKReplyShortChannelIdsEnd*)obj; + LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); + *ret = ReplyShortChannelIdsEnd_write(obj_conv); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1read(JNIEnv * _env, jclass _b, jlong ser) { + LDKu8slice ser_conv = *(LDKu8slice*)ser; + FREE((void*)ser); + LDKQueryChannelRange* ret = MALLOC(sizeof(LDKQueryChannelRange), "LDKQueryChannelRange"); + *ret = QueryChannelRange_read(ser_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1write(JNIEnv * _env, jclass _b, jlong obj) { + LDKQueryChannelRange* obj_conv = (LDKQueryChannelRange*)obj; + LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); + *ret = QueryChannelRange_write(obj_conv); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1read(JNIEnv * _env, jclass _b, jlong ser) { + LDKu8slice ser_conv = *(LDKu8slice*)ser; + FREE((void*)ser); + LDKReplyChannelRange* ret = MALLOC(sizeof(LDKReplyChannelRange), "LDKReplyChannelRange"); + *ret = ReplyChannelRange_read(ser_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1write(JNIEnv * _env, jclass _b, jlong obj) { + LDKReplyChannelRange* obj_conv = (LDKReplyChannelRange*)obj; + LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); + *ret = ReplyChannelRange_write(obj_conv); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1read(JNIEnv * _env, jclass _b, jlong ser) { + LDKu8slice ser_conv = *(LDKu8slice*)ser; + FREE((void*)ser); + LDKGossipTimestampFilter* ret = MALLOC(sizeof(LDKGossipTimestampFilter), "LDKGossipTimestampFilter"); + *ret = GossipTimestampFilter_read(ser_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1write(JNIEnv * _env, jclass _b, jlong obj) { + LDKGossipTimestampFilter* obj_conv = (LDKGossipTimestampFilter*)obj; + LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); + *ret = GossipTimestampFilter_write(obj_conv); + return (long)ret; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKMessageHandler this_ptr_conv = *(LDKMessageHandler*)this_ptr; FREE((void*)this_ptr); @@ -5836,6 +6172,49 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret(JNI return (long)ret; } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1private_1key(JNIEnv * _env, jclass _b, jlong per_commitment_point, jbyteArray base_secret) { + LDKPublicKey per_commitment_point_conv = *(LDKPublicKey*)per_commitment_point; + FREE((void*)per_commitment_point); + unsigned char base_secret_arr[32]; + (*_env)->GetByteArrayRegion (_env, base_secret, 0, 32, base_secret_arr); + unsigned char (*base_secret_ref)[32] = &base_secret_arr; + LDKCResult_SecretKeySecpErrorZ* ret = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ"); + *ret = derive_private_key(per_commitment_point_conv, base_secret_ref); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1public_1key(JNIEnv * _env, jclass _b, jlong per_commitment_point, jlong base_point) { + LDKPublicKey per_commitment_point_conv = *(LDKPublicKey*)per_commitment_point; + FREE((void*)per_commitment_point); + LDKPublicKey base_point_conv = *(LDKPublicKey*)base_point; + FREE((void*)base_point); + LDKCResult_PublicKeySecpErrorZ* ret = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ"); + *ret = derive_public_key(per_commitment_point_conv, base_point_conv); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1private_1revocation_1key(JNIEnv * _env, jclass _b, jbyteArray per_commitment_secret, jbyteArray countersignatory_revocation_base_secret) { + unsigned char per_commitment_secret_arr[32]; + (*_env)->GetByteArrayRegion (_env, per_commitment_secret, 0, 32, per_commitment_secret_arr); + unsigned char (*per_commitment_secret_ref)[32] = &per_commitment_secret_arr; + unsigned char countersignatory_revocation_base_secret_arr[32]; + (*_env)->GetByteArrayRegion (_env, countersignatory_revocation_base_secret, 0, 32, countersignatory_revocation_base_secret_arr); + unsigned char (*countersignatory_revocation_base_secret_ref)[32] = &countersignatory_revocation_base_secret_arr; + LDKCResult_SecretKeySecpErrorZ* ret = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ"); + *ret = derive_private_revocation_key(per_commitment_secret_ref, countersignatory_revocation_base_secret_ref); + return (long)ret; +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1public_1revocation_1key(JNIEnv * _env, jclass _b, jlong per_commitment_point, jlong countersignatory_revocation_base_point) { + LDKPublicKey per_commitment_point_conv = *(LDKPublicKey*)per_commitment_point; + FREE((void*)per_commitment_point); + LDKPublicKey countersignatory_revocation_base_point_conv = *(LDKPublicKey*)countersignatory_revocation_base_point; + FREE((void*)countersignatory_revocation_base_point); + LDKCResult_PublicKeySecpErrorZ* ret = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ"); + *ret = derive_public_revocation_key(per_commitment_point_conv, countersignatory_revocation_base_point_conv); + return (long)ret; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKTxCreationKeys this_ptr_conv = *(LDKTxCreationKeys*)this_ptr; FREE((void*)this_ptr); @@ -5871,61 +6250,61 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1revocatio return TxCreationKeys_set_revocation_key(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1broadcaster_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr; LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey"); - *ret = TxCreationKeys_get_a_htlc_key(this_ptr_conv); + *ret = TxCreationKeys_get_broadcaster_htlc_key(this_ptr_conv); return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1broadcaster_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr; LDKPublicKey val_conv = *(LDKPublicKey*)val; FREE((void*)val); - return TxCreationKeys_set_a_htlc_key(this_ptr_conv, val_conv); + return TxCreationKeys_set_broadcaster_htlc_key(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1countersignatory_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr; LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey"); - *ret = TxCreationKeys_get_b_htlc_key(this_ptr_conv); + *ret = TxCreationKeys_get_countersignatory_htlc_key(this_ptr_conv); return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1b_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1countersignatory_1htlc_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr; LDKPublicKey val_conv = *(LDKPublicKey*)val; FREE((void*)val); - return TxCreationKeys_set_b_htlc_key(this_ptr_conv, val_conv); + return TxCreationKeys_set_countersignatory_htlc_key(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1broadcaster_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr; LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey"); - *ret = TxCreationKeys_get_a_delayed_payment_key(this_ptr_conv); + *ret = TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr_conv); return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1broadcaster_1delayed_1payment_1key(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { LDKTxCreationKeys* this_ptr_conv = (LDKTxCreationKeys*)this_ptr; LDKPublicKey val_conv = *(LDKPublicKey*)val; FREE((void*)val); - return TxCreationKeys_set_a_delayed_payment_key(this_ptr_conv, val_conv); + return TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new(JNIEnv * _env, jclass _b, jlong per_commitment_point_arg, jlong revocation_key_arg, jlong a_htlc_key_arg, jlong b_htlc_key_arg, jlong a_delayed_payment_key_arg) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new(JNIEnv * _env, jclass _b, jlong per_commitment_point_arg, jlong revocation_key_arg, jlong broadcaster_htlc_key_arg, jlong countersignatory_htlc_key_arg, jlong broadcaster_delayed_payment_key_arg) { LDKPublicKey per_commitment_point_arg_conv = *(LDKPublicKey*)per_commitment_point_arg; FREE((void*)per_commitment_point_arg); LDKPublicKey revocation_key_arg_conv = *(LDKPublicKey*)revocation_key_arg; FREE((void*)revocation_key_arg); - LDKPublicKey a_htlc_key_arg_conv = *(LDKPublicKey*)a_htlc_key_arg; - FREE((void*)a_htlc_key_arg); - LDKPublicKey b_htlc_key_arg_conv = *(LDKPublicKey*)b_htlc_key_arg; - FREE((void*)b_htlc_key_arg); - LDKPublicKey a_delayed_payment_key_arg_conv = *(LDKPublicKey*)a_delayed_payment_key_arg; - FREE((void*)a_delayed_payment_key_arg); + LDKPublicKey broadcaster_htlc_key_arg_conv = *(LDKPublicKey*)broadcaster_htlc_key_arg; + FREE((void*)broadcaster_htlc_key_arg); + LDKPublicKey countersignatory_htlc_key_arg_conv = *(LDKPublicKey*)countersignatory_htlc_key_arg; + FREE((void*)countersignatory_htlc_key_arg); + LDKPublicKey broadcaster_delayed_payment_key_arg_conv = *(LDKPublicKey*)broadcaster_delayed_payment_key_arg; + FREE((void*)broadcaster_delayed_payment_key_arg); LDKTxCreationKeys* ret = MALLOC(sizeof(LDKTxCreationKeys), "LDKTxCreationKeys"); - *ret = TxCreationKeys_new(per_commitment_point_arg_conv, revocation_key_arg_conv, a_htlc_key_arg_conv, b_htlc_key_arg_conv, a_delayed_payment_key_arg_conv); + *ret = TxCreationKeys_new(per_commitment_point_arg_conv, revocation_key_arg_conv, broadcaster_htlc_key_arg_conv, countersignatory_htlc_key_arg_conv, broadcaster_delayed_payment_key_arg_conv); assert(ret->is_owned); ret->is_owned = false; return (long)ret; @@ -6094,29 +6473,29 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1read(JNIEn return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1derive_1new(JNIEnv * _env, jclass _b, jlong per_commitment_point, jlong a_delayed_payment_base, jlong a_htlc_base, jlong b_revocation_base, jlong b_htlc_base) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1derive_1new(JNIEnv * _env, jclass _b, jlong per_commitment_point, jlong broadcaster_delayed_payment_base, jlong broadcaster_htlc_base, jlong countersignatory_revocation_base, jlong countersignatory_htlc_base) { LDKPublicKey per_commitment_point_conv = *(LDKPublicKey*)per_commitment_point; FREE((void*)per_commitment_point); - LDKPublicKey a_delayed_payment_base_conv = *(LDKPublicKey*)a_delayed_payment_base; - FREE((void*)a_delayed_payment_base); - LDKPublicKey a_htlc_base_conv = *(LDKPublicKey*)a_htlc_base; - FREE((void*)a_htlc_base); - LDKPublicKey b_revocation_base_conv = *(LDKPublicKey*)b_revocation_base; - FREE((void*)b_revocation_base); - LDKPublicKey b_htlc_base_conv = *(LDKPublicKey*)b_htlc_base; - FREE((void*)b_htlc_base); + LDKPublicKey broadcaster_delayed_payment_base_conv = *(LDKPublicKey*)broadcaster_delayed_payment_base; + FREE((void*)broadcaster_delayed_payment_base); + LDKPublicKey broadcaster_htlc_base_conv = *(LDKPublicKey*)broadcaster_htlc_base; + FREE((void*)broadcaster_htlc_base); + LDKPublicKey countersignatory_revocation_base_conv = *(LDKPublicKey*)countersignatory_revocation_base; + FREE((void*)countersignatory_revocation_base); + LDKPublicKey countersignatory_htlc_base_conv = *(LDKPublicKey*)countersignatory_htlc_base; + FREE((void*)countersignatory_htlc_base); LDKCResult_TxCreationKeysSecpErrorZ* ret = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ"); - *ret = TxCreationKeys_derive_new(per_commitment_point_conv, a_delayed_payment_base_conv, a_htlc_base_conv, b_revocation_base_conv, b_htlc_base_conv); + *ret = TxCreationKeys_derive_new(per_commitment_point_conv, broadcaster_delayed_payment_base_conv, broadcaster_htlc_base_conv, countersignatory_revocation_base_conv, countersignatory_htlc_base_conv); return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1revokeable_1redeemscript(JNIEnv * _env, jclass _b, jlong revocation_key, jshort to_self_delay, jlong delayed_payment_key) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1revokeable_1redeemscript(JNIEnv * _env, jclass _b, jlong revocation_key, jshort contest_delay, jlong broadcaster_delayed_payment_key) { LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key; FREE((void*)revocation_key); - LDKPublicKey delayed_payment_key_conv = *(LDKPublicKey*)delayed_payment_key; - FREE((void*)delayed_payment_key); + LDKPublicKey broadcaster_delayed_payment_key_conv = *(LDKPublicKey*)broadcaster_delayed_payment_key; + FREE((void*)broadcaster_delayed_payment_key); LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); - *ret = get_revokeable_redeemscript(revocation_key_conv, to_self_delay, delayed_payment_key_conv); + *ret = get_revokeable_redeemscript(revocation_key_conv, contest_delay, broadcaster_delayed_payment_key_conv); return (long)ret; } @@ -6196,153 +6575,153 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1htlc_1redeemscript(JNIEn return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_make_1funding_1redeemscript(JNIEnv * _env, jclass _b, jlong a, jlong b) { - LDKPublicKey a_conv = *(LDKPublicKey*)a; - FREE((void*)a); - LDKPublicKey b_conv = *(LDKPublicKey*)b; - FREE((void*)b); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_make_1funding_1redeemscript(JNIEnv * _env, jclass _b, jlong broadcaster, jlong countersignatory) { + LDKPublicKey broadcaster_conv = *(LDKPublicKey*)broadcaster; + FREE((void*)broadcaster); + LDKPublicKey countersignatory_conv = *(LDKPublicKey*)countersignatory; + FREE((void*)countersignatory); LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); - *ret = make_funding_redeemscript(a_conv, b_conv); + *ret = make_funding_redeemscript(broadcaster_conv, countersignatory_conv); return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transaction(JNIEnv * _env, jclass _b, jbyteArray prev_hash, jint feerate_per_kw, jshort to_self_delay, jlong htlc, jlong a_delayed_payment_key, jlong revocation_key) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transaction(JNIEnv * _env, jclass _b, jbyteArray prev_hash, jint feerate_per_kw, jshort contest_delay, jlong htlc, jlong broadcaster_delayed_payment_key, jlong revocation_key) { unsigned char prev_hash_arr[32]; (*_env)->GetByteArrayRegion (_env, prev_hash, 0, 32, prev_hash_arr); unsigned char (*prev_hash_ref)[32] = &prev_hash_arr; LDKHTLCOutputInCommitment* htlc_conv = (LDKHTLCOutputInCommitment*)htlc; - LDKPublicKey a_delayed_payment_key_conv = *(LDKPublicKey*)a_delayed_payment_key; - FREE((void*)a_delayed_payment_key); + LDKPublicKey broadcaster_delayed_payment_key_conv = *(LDKPublicKey*)broadcaster_delayed_payment_key; + FREE((void*)broadcaster_delayed_payment_key); LDKPublicKey revocation_key_conv = *(LDKPublicKey*)revocation_key; FREE((void*)revocation_key); - LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); - *ret = build_htlc_transaction(prev_hash_ref, feerate_per_kw, to_self_delay, htlc_conv, a_delayed_payment_key_conv, revocation_key_conv); + LDKTransaction* ret = MALLOC(sizeof(LDKTransaction), "LDKTransaction"); + *ret = build_htlc_transaction(prev_hash_ref, feerate_per_kw, contest_delay, htlc_conv, broadcaster_delayed_payment_key_conv, revocation_key_conv); return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKLocalCommitmentTransaction this_ptr_conv = *(LDKLocalCommitmentTransaction*)this_ptr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKHolderCommitmentTransaction this_ptr_conv = *(LDKHolderCommitmentTransaction*)this_ptr; FREE((void*)this_ptr); this_ptr_conv.is_owned = true; - return LocalCommitmentTransaction_free(this_ptr_conv); + return HolderCommitmentTransaction_free(this_ptr_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr; - LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); - *ret = LocalCommitmentTransaction_get_unsigned_tx(this_ptr_conv); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKHolderCommitmentTransaction* this_ptr_conv = (LDKHolderCommitmentTransaction*)this_ptr; + LDKTransaction* ret = MALLOC(sizeof(LDKTransaction), "LDKTransaction"); + *ret = HolderCommitmentTransaction_get_unsigned_tx(this_ptr_conv); return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr; - LDKCVec_u8Z val_conv = *(LDKCVec_u8Z*)val; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1unsigned_1tx(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKHolderCommitmentTransaction* this_ptr_conv = (LDKHolderCommitmentTransaction*)this_ptr; + LDKTransaction val_conv = *(LDKTransaction*)val; FREE((void*)val); - return LocalCommitmentTransaction_set_unsigned_tx(this_ptr_conv, val_conv); + return HolderCommitmentTransaction_set_unsigned_tx(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1counterparty_1sig(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKHolderCommitmentTransaction* this_ptr_conv = (LDKHolderCommitmentTransaction*)this_ptr; LDKSignature* ret = MALLOC(sizeof(LDKSignature), "LDKSignature"); - *ret = LocalCommitmentTransaction_get_their_sig(this_ptr_conv); + *ret = HolderCommitmentTransaction_get_counterparty_sig(this_ptr_conv); return (long)ret; } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1their_1sig(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1counterparty_1sig(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKHolderCommitmentTransaction* this_ptr_conv = (LDKHolderCommitmentTransaction*)this_ptr; LDKSignature val_conv = *(LDKSignature*)val; FREE((void*)val); - return LocalCommitmentTransaction_set_their_sig(this_ptr_conv, val_conv); + return HolderCommitmentTransaction_set_counterparty_sig(this_ptr_conv, val_conv); } -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) { - LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr; - return LocalCommitmentTransaction_get_feerate_per_kw(this_ptr_conv); +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKHolderCommitmentTransaction* this_ptr_conv = (LDKHolderCommitmentTransaction*)this_ptr; + return HolderCommitmentTransaction_get_feerate_per_kw(this_ptr_conv); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { - LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr; - return LocalCommitmentTransaction_set_feerate_per_kw(this_ptr_conv, val); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1feerate_1per_1kw(JNIEnv * _env, jclass _b, jlong this_ptr, jint val) { + LDKHolderCommitmentTransaction* this_ptr_conv = (LDKHolderCommitmentTransaction*)this_ptr; + return HolderCommitmentTransaction_set_feerate_per_kw(this_ptr_conv, val); } -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1per_1htlc(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { - LDKLocalCommitmentTransaction* this_ptr_conv = (LDKLocalCommitmentTransaction*)this_ptr; +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1per_1htlc(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKHolderCommitmentTransaction* this_ptr_conv = (LDKHolderCommitmentTransaction*)this_ptr; LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ val_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)val; FREE((void*)val); - return LocalCommitmentTransaction_set_per_htlc(this_ptr_conv, val_conv); + return HolderCommitmentTransaction_set_per_htlc(this_ptr_conv, val_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1new_1missing_1local_1sig(JNIEnv * _env, jclass _b, jlong unsigned_tx, jlong their_sig, jlong our_funding_key, jlong their_funding_key, jlong local_keys, jint feerate_per_kw, jlong htlc_data) { - LDKCVec_u8Z unsigned_tx_conv = *(LDKCVec_u8Z*)unsigned_tx; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1new_1missing_1holder_1sig(JNIEnv * _env, jclass _b, jlong unsigned_tx, jlong counterparty_sig, jlong holder_funding_key, jlong counterparty_funding_key, jlong keys, jint feerate_per_kw, jlong htlc_data) { + LDKTransaction unsigned_tx_conv = *(LDKTransaction*)unsigned_tx; FREE((void*)unsigned_tx); - LDKSignature their_sig_conv = *(LDKSignature*)their_sig; - FREE((void*)their_sig); - LDKPublicKey our_funding_key_conv = *(LDKPublicKey*)our_funding_key; - FREE((void*)our_funding_key); - LDKPublicKey their_funding_key_conv = *(LDKPublicKey*)their_funding_key; - FREE((void*)their_funding_key); - LDKTxCreationKeys local_keys_conv = *(LDKTxCreationKeys*)local_keys; - FREE((void*)local_keys); - local_keys_conv.is_owned = true; + LDKSignature counterparty_sig_conv = *(LDKSignature*)counterparty_sig; + FREE((void*)counterparty_sig); + LDKPublicKey holder_funding_key_conv = *(LDKPublicKey*)holder_funding_key; + FREE((void*)holder_funding_key); + LDKPublicKey counterparty_funding_key_conv = *(LDKPublicKey*)counterparty_funding_key; + FREE((void*)counterparty_funding_key); + LDKTxCreationKeys keys_conv = *(LDKTxCreationKeys*)keys; + FREE((void*)keys); + keys_conv.is_owned = true; LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ htlc_data_conv = *(LDKCVec_C2Tuple_HTLCOutputInCommitmentSignatureZZ*)htlc_data; FREE((void*)htlc_data); - LDKLocalCommitmentTransaction* ret = MALLOC(sizeof(LDKLocalCommitmentTransaction), "LDKLocalCommitmentTransaction"); - *ret = LocalCommitmentTransaction_new_missing_local_sig(unsigned_tx_conv, their_sig_conv, our_funding_key_conv, their_funding_key_conv, local_keys_conv, feerate_per_kw, htlc_data_conv); + LDKHolderCommitmentTransaction* ret = MALLOC(sizeof(LDKHolderCommitmentTransaction), "LDKHolderCommitmentTransaction"); + *ret = HolderCommitmentTransaction_new_missing_holder_sig(unsigned_tx_conv, counterparty_sig_conv, holder_funding_key_conv, counterparty_funding_key_conv, keys_conv, feerate_per_kw, htlc_data_conv); assert(ret->is_owned); ret->is_owned = false; return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) { - LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1trust_1key_1derivation(JNIEnv * _env, jclass _b, jlong this_arg) { + LDKHolderCommitmentTransaction* this_arg_conv = (LDKHolderCommitmentTransaction*)this_arg; LDKTxCreationKeys* ret = MALLOC(sizeof(LDKTxCreationKeys), "LDKTxCreationKeys"); - *ret = LocalCommitmentTransaction_trust_key_derivation(this_arg_conv); + *ret = HolderCommitmentTransaction_trust_key_derivation(this_arg_conv); assert(ret->is_owned); ret->is_owned = false; return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1txid(JNIEnv * _env, jclass _b, jlong this_arg) { - LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1txid(JNIEnv * _env, jclass _b, jlong this_arg) { + LDKHolderCommitmentTransaction* this_arg_conv = (LDKHolderCommitmentTransaction*)this_arg; LDKThirtyTwoBytes* ret = MALLOC(sizeof(LDKThirtyTwoBytes), "LDKThirtyTwoBytes"); - *ret = LocalCommitmentTransaction_txid(this_arg_conv); + *ret = HolderCommitmentTransaction_txid(this_arg_conv); return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1local_1sig(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray funding_key, jlong funding_redeemscript, jlong channel_value_satoshis) { - LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1holder_1sig(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray funding_key, jlong funding_redeemscript, jlong channel_value_satoshis) { + LDKHolderCommitmentTransaction* this_arg_conv = (LDKHolderCommitmentTransaction*)this_arg; unsigned char funding_key_arr[32]; (*_env)->GetByteArrayRegion (_env, funding_key, 0, 32, funding_key_arr); unsigned char (*funding_key_ref)[32] = &funding_key_arr; LDKu8slice funding_redeemscript_conv = *(LDKu8slice*)funding_redeemscript; FREE((void*)funding_redeemscript); LDKSignature* ret = MALLOC(sizeof(LDKSignature), "LDKSignature"); - *ret = LocalCommitmentTransaction_get_local_sig(this_arg_conv, funding_key_ref, funding_redeemscript_conv, channel_value_satoshis); + *ret = HolderCommitmentTransaction_get_holder_sig(this_arg_conv, funding_key_ref, funding_redeemscript_conv, channel_value_satoshis); return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1htlc_1sigs(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray htlc_base_key, jshort local_csv) { - LDKLocalCommitmentTransaction* this_arg_conv = (LDKLocalCommitmentTransaction*)this_arg; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1htlc_1sigs(JNIEnv * _env, jclass _b, jlong this_arg, jbyteArray htlc_base_key, jshort counterparty_selected_contest_delay) { + LDKHolderCommitmentTransaction* this_arg_conv = (LDKHolderCommitmentTransaction*)this_arg; unsigned char htlc_base_key_arr[32]; (*_env)->GetByteArrayRegion (_env, htlc_base_key, 0, 32, htlc_base_key_arr); unsigned char (*htlc_base_key_ref)[32] = &htlc_base_key_arr; LDKCResult_CVec_SignatureZNoneZ* ret = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ"); - *ret = LocalCommitmentTransaction_get_htlc_sigs(this_arg_conv, htlc_base_key_ref, local_csv); + *ret = HolderCommitmentTransaction_get_htlc_sigs(this_arg_conv, htlc_base_key_ref, counterparty_selected_contest_delay); return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1write(JNIEnv * _env, jclass _b, jlong obj) { - LDKLocalCommitmentTransaction* obj_conv = (LDKLocalCommitmentTransaction*)obj; +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1write(JNIEnv * _env, jclass _b, jlong obj) { + LDKHolderCommitmentTransaction* obj_conv = (LDKHolderCommitmentTransaction*)obj; LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); - *ret = LocalCommitmentTransaction_write(obj_conv); + *ret = HolderCommitmentTransaction_write(obj_conv); return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1read(JNIEnv * _env, jclass _b, jlong ser) { +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1read(JNIEnv * _env, jclass _b, jlong ser) { LDKu8slice ser_conv = *(LDKu8slice*)ser; FREE((void*)ser); - LDKLocalCommitmentTransaction* ret = MALLOC(sizeof(LDKLocalCommitmentTransaction), "LDKLocalCommitmentTransaction"); - *ret = LocalCommitmentTransaction_read(ser_conv); + LDKHolderCommitmentTransaction* ret = MALLOC(sizeof(LDKHolderCommitmentTransaction), "LDKHolderCommitmentTransaction"); + *ret = HolderCommitmentTransaction_read(ser_conv); assert(ret->is_owned); ret->is_owned = false; return (long)ret; @@ -6390,6 +6769,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1pubkey(JNIEnv * return RouteHop_set_pubkey(this_ptr_conv, val_conv); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1node_1features(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr; + LDKNodeFeatures* ret = MALLOC(sizeof(LDKNodeFeatures), "LDKNodeFeatures"); + *ret = RouteHop_get_node_features(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1node_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr; + LDKNodeFeatures val_conv = *(LDKNodeFeatures*)val; + FREE((void*)val); + val_conv.is_owned = true; + return RouteHop_set_node_features(this_ptr_conv, val_conv); +} + JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1short_1channel_1id(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr; return RouteHop_get_short_channel_id(this_ptr_conv); @@ -6400,6 +6796,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1short_1channel_ return RouteHop_set_short_channel_id(this_ptr_conv, val); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1channel_1features(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr; + LDKChannelFeatures* ret = MALLOC(sizeof(LDKChannelFeatures), "LDKChannelFeatures"); + *ret = RouteHop_get_channel_features(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1channel_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr; + LDKChannelFeatures val_conv = *(LDKChannelFeatures*)val; + FREE((void*)val); + val_conv.is_owned = true; + return RouteHop_set_channel_features(this_ptr_conv, val_conv); +} + JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1fee_1msat(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKRouteHop* this_ptr_conv = (LDKRouteHop*)this_ptr; return RouteHop_get_fee_msat(this_ptr_conv); @@ -6420,6 +6833,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1cltv_1expiry_1d return RouteHop_set_cltv_expiry_delta(this_ptr_conv, val); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1new(JNIEnv * _env, jclass _b, jlong pubkey_arg, jlong node_features_arg, jlong short_channel_id_arg, jlong channel_features_arg, jlong fee_msat_arg, jint cltv_expiry_delta_arg) { + LDKPublicKey pubkey_arg_conv = *(LDKPublicKey*)pubkey_arg; + FREE((void*)pubkey_arg); + LDKNodeFeatures node_features_arg_conv = *(LDKNodeFeatures*)node_features_arg; + FREE((void*)node_features_arg); + node_features_arg_conv.is_owned = true; + LDKChannelFeatures channel_features_arg_conv = *(LDKChannelFeatures*)channel_features_arg; + FREE((void*)channel_features_arg); + channel_features_arg_conv.is_owned = true; + LDKRouteHop* ret = MALLOC(sizeof(LDKRouteHop), "LDKRouteHop"); + *ret = RouteHop_new(pubkey_arg_conv, node_features_arg_conv, short_channel_id_arg, channel_features_arg_conv, fee_msat_arg, cltv_expiry_delta_arg); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKRoute this_ptr_conv = *(LDKRoute*)this_ptr; FREE((void*)this_ptr); @@ -6582,30 +7011,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1free(JNIEn return NetGraphMsgHandler_free(this_ptr_conv); } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger) { - LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor; - if (chain_monitor_conv.free == LDKChainWatchInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKChainWatchInterface_JCalls_clone(chain_monitor_conv.this_arg); - } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new(JNIEnv * _env, jclass _b, jlong chain_access, jlong logger) { + LDKAccess* chain_access_conv = (LDKAccess*)chain_access; LDKLogger logger_conv = *(LDKLogger*)logger; if (logger_conv.free == LDKLogger_JCalls_free) { // If this_arg is a JCalls struct, then we need to increment the refcnt in it. LDKLogger_JCalls_clone(logger_conv.this_arg); } LDKNetGraphMsgHandler* ret = MALLOC(sizeof(LDKNetGraphMsgHandler), "LDKNetGraphMsgHandler"); - *ret = NetGraphMsgHandler_new(chain_monitor_conv, logger_conv); + *ret = NetGraphMsgHandler_new(chain_access_conv, logger_conv); assert(ret->is_owned); ret->is_owned = false; return (long)ret; } -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1net_1graph(JNIEnv * _env, jclass _b, jlong chain_monitor, jlong logger, jlong network_graph) { - LDKChainWatchInterface chain_monitor_conv = *(LDKChainWatchInterface*)chain_monitor; - if (chain_monitor_conv.free == LDKChainWatchInterface_JCalls_free) { - // If this_arg is a JCalls struct, then we need to increment the refcnt in it. - LDKChainWatchInterface_JCalls_clone(chain_monitor_conv.this_arg); - } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1net_1graph(JNIEnv * _env, jclass _b, jlong chain_access, jlong logger, jlong network_graph) { + LDKAccess* chain_access_conv = (LDKAccess*)chain_access; LDKLogger logger_conv = *(LDKLogger*)logger; if (logger_conv.free == LDKLogger_JCalls_free) { // If this_arg is a JCalls struct, then we need to increment the refcnt in it. @@ -6615,7 +7036,7 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1net FREE((void*)network_graph); network_graph_conv.is_owned = true; LDKNetGraphMsgHandler* ret = MALLOC(sizeof(LDKNetGraphMsgHandler), "LDKNetGraphMsgHandler"); - *ret = NetGraphMsgHandler_from_net_graph(chain_monitor_conv, logger_conv, network_graph_conv); + *ret = NetGraphMsgHandler_from_net_graph(chain_access_conv, logger_conv, network_graph_conv); assert(ret->is_owned); ret->is_owned = false; return (long)ret; @@ -6693,6 +7114,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1h return DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr_conv, val); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1last_1update_1message(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr; + LDKChannelUpdate* ret = MALLOC(sizeof(LDKChannelUpdate), "LDKChannelUpdate"); + *ret = DirectionalChannelInfo_get_last_update_message(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update_1message(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKDirectionalChannelInfo* this_ptr_conv = (LDKDirectionalChannelInfo*)this_ptr; + LDKChannelUpdate val_conv = *(LDKChannelUpdate*)val; + FREE((void*)val); + val_conv.is_owned = true; + return DirectionalChannelInfo_set_last_update_message(this_ptr_conv, val_conv); +} + JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) { LDKDirectionalChannelInfo* obj_conv = (LDKDirectionalChannelInfo*)obj; LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); @@ -6717,6 +7155,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1free(JNIEnv * _en return ChannelInfo_free(this_ptr_conv); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1features(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr; + LDKChannelFeatures* ret = MALLOC(sizeof(LDKChannelFeatures), "LDKChannelFeatures"); + *ret = ChannelInfo_get_features(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr; + LDKChannelFeatures val_conv = *(LDKChannelFeatures*)val; + FREE((void*)val); + val_conv.is_owned = true; + return ChannelInfo_set_features(this_ptr_conv, val_conv); +} + JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_1one(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr; LDKPublicKey* ret = MALLOC(sizeof(LDKPublicKey), "LDKPublicKey"); @@ -6779,6 +7234,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one return ChannelInfo_set_two_to_one(this_ptr_conv, val_conv); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1announcement_1message(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr; + LDKChannelAnnouncement* ret = MALLOC(sizeof(LDKChannelAnnouncement), "LDKChannelAnnouncement"); + *ret = ChannelInfo_get_announcement_message(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1announcement_1message(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKChannelInfo* this_ptr_conv = (LDKChannelInfo*)this_ptr; + LDKChannelAnnouncement val_conv = *(LDKChannelAnnouncement*)val; + FREE((void*)val); + val_conv.is_owned = true; + return ChannelInfo_set_announcement_message(this_ptr_conv, val_conv); +} + JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1write(JNIEnv * _env, jclass _b, jlong obj) { LDKChannelInfo* obj_conv = (LDKChannelInfo*)obj; LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); @@ -6855,6 +7327,23 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free(JNI return NodeAnnouncementInfo_free(this_ptr_conv); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1features(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr; + LDKNodeFeatures* ret = MALLOC(sizeof(LDKNodeFeatures), "LDKNodeFeatures"); + *ret = NodeAnnouncementInfo_get_features(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1features(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr; + LDKNodeFeatures val_conv = *(LDKNodeFeatures*)val; + FREE((void*)val); + val_conv.is_owned = true; + return NodeAnnouncementInfo_set_features(this_ptr_conv, val_conv); +} + JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1last_1update(JNIEnv * _env, jclass _b, jlong this_ptr) { LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr; return NodeAnnouncementInfo_get_last_update(this_ptr_conv); @@ -6900,6 +7389,43 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1add return NodeAnnouncementInfo_set_addresses(this_ptr_conv, val_conv); } +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1announcement_1message(JNIEnv * _env, jclass _b, jlong this_ptr) { + LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr; + LDKNodeAnnouncement* ret = MALLOC(sizeof(LDKNodeAnnouncement), "LDKNodeAnnouncement"); + *ret = NodeAnnouncementInfo_get_announcement_message(this_ptr_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1announcement_1message(JNIEnv * _env, jclass _b, jlong this_ptr, jlong val) { + LDKNodeAnnouncementInfo* this_ptr_conv = (LDKNodeAnnouncementInfo*)this_ptr; + LDKNodeAnnouncement val_conv = *(LDKNodeAnnouncement*)val; + FREE((void*)val); + val_conv.is_owned = true; + return NodeAnnouncementInfo_set_announcement_message(this_ptr_conv, val_conv); +} + +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(JNIEnv * _env, jclass _b, jlong features_arg, jint last_update_arg, jlong rgb_arg, jlong alias_arg, jlong addresses_arg, jlong announcement_message_arg) { + LDKNodeFeatures features_arg_conv = *(LDKNodeFeatures*)features_arg; + FREE((void*)features_arg); + features_arg_conv.is_owned = true; + LDKThreeBytes rgb_arg_conv = *(LDKThreeBytes*)rgb_arg; + FREE((void*)rgb_arg); + LDKThirtyTwoBytes alias_arg_conv = *(LDKThirtyTwoBytes*)alias_arg; + FREE((void*)alias_arg); + LDKCVec_NetAddressZ addresses_arg_conv = *(LDKCVec_NetAddressZ*)addresses_arg; + FREE((void*)addresses_arg); + LDKNodeAnnouncement announcement_message_arg_conv = *(LDKNodeAnnouncement*)announcement_message_arg; + FREE((void*)announcement_message_arg); + announcement_message_arg_conv.is_owned = true; + LDKNodeAnnouncementInfo* ret = MALLOC(sizeof(LDKNodeAnnouncementInfo), "LDKNodeAnnouncementInfo"); + *ret = NodeAnnouncementInfo_new(features_arg_conv, last_update_arg, rgb_arg_conv, alias_arg_conv, addresses_arg_conv, announcement_message_arg_conv); + assert(ret->is_owned); + ret->is_owned = false; + return (long)ret; +} + JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv * _env, jclass _b, jlong obj) { LDKNodeAnnouncementInfo* obj_conv = (LDKNodeAnnouncementInfo*)obj; LDKCVec_u8Z* ret = MALLOC(sizeof(LDKCVec_u8Z), "LDKCVec_u8Z"); diff --git a/src/main/jni/org_ldk_impl_bindings.h b/src/main/jni/org_ldk_impl_bindings.h index 69f66a2b..c159fb7e 100644 --- a/src/main/jni/org_ldk_impl_bindings.h +++ b/src/main/jni/org_ldk_impl_bindings.h @@ -49,58 +49,58 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new /* * Class: org_ldk_impl_bindings - * Method: LDKChainWatchInterface_new - * Signature: (Lorg/ldk/impl/bindings/LDKChainWatchInterface;)J + * Method: LDKAccess_new + * Signature: (Lorg/ldk/impl/bindings/LDKAccess;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChainWatchInterface_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new (JNIEnv *, jclass, jobject); /* * Class: org_ldk_impl_bindings - * Method: LDKBroadcasterInterface_new - * Signature: (Lorg/ldk/impl/bindings/LDKBroadcasterInterface;)J + * Method: LDKChannelKeys_new + * Signature: (Lorg/ldk/impl/bindings/LDKChannelKeys;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new (JNIEnv *, jclass, jobject); /* * Class: org_ldk_impl_bindings - * Method: LDKChainListener_new - * Signature: (Lorg/ldk/impl/bindings/LDKChainListener;)J + * Method: LDKWatch_new + * Signature: (Lorg/ldk/impl/bindings/LDKWatch;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChainListener_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new (JNIEnv *, jclass, jobject); /* * Class: org_ldk_impl_bindings - * Method: LDKFeeEstimator_new - * Signature: (Lorg/ldk/impl/bindings/LDKFeeEstimator;)J + * Method: LDKFilter_new + * Signature: (Lorg/ldk/impl/bindings/LDKFilter;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new (JNIEnv *, jclass, jobject); /* * Class: org_ldk_impl_bindings - * Method: LDKChannelKeys_new - * Signature: (Lorg/ldk/impl/bindings/LDKChannelKeys;)J + * Method: LDKBroadcasterInterface_new + * Signature: (Lorg/ldk/impl/bindings/LDKBroadcasterInterface;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new (JNIEnv *, jclass, jobject); /* * Class: org_ldk_impl_bindings - * Method: LDKKeysInterface_new - * Signature: (Lorg/ldk/impl/bindings/LDKKeysInterface;)J + * Method: LDKFeeEstimator_new + * Signature: (Lorg/ldk/impl/bindings/LDKFeeEstimator;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new (JNIEnv *, jclass, jobject); /* * Class: org_ldk_impl_bindings - * Method: LDKManyChannelMonitor_new - * Signature: (Lorg/ldk/impl/bindings/LDKManyChannelMonitor;)J + * Method: LDKKeysInterface_new + * Signature: (Lorg/ldk/impl/bindings/LDKKeysInterface;)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKManyChannelMonitor_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new (JNIEnv *, jclass, jobject); /* @@ -143,14 +143,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1HTLCOutputInCommitmen JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free (JNIEnv *, jclass, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: C2Tuple_Scriptu64Z_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1free - (JNIEnv *, jclass, jlong); - /* * Class: org_ldk_impl_bindings * Method: C2Tuple_SignatureCVec_SignatureZZ_free @@ -161,10 +153,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Signat /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_Txidu32Z_free + * Method: C2Tuple_TxidCVec_TxOutZZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1TxOutZZ_1free (JNIEnv *, jclass, jlong); /* @@ -177,34 +169,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free /* * Class: org_ldk_impl_bindings - * Method: C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free + * Method: C2Tuple_usizeTransactionZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_Scriptu64ZChainErrorZ_err - * Signature: (Lorg/ldk/impl/bindings/LDKChainError;)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1err - (JNIEnv *, jclass, jobject); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_Scriptu64ZChainErrorZ_free + * Method: C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_C2Tuple_Scriptu64ZChainErrorZ_ok - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1Scriptu64ZChainErrorZ_1ok +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free (JNIEnv *, jclass, jlong); /* @@ -343,6 +319,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PublicKeySecpErrorZ_err + * Signature: (Lorg/ldk/impl/bindings/LDKSecp256k1Error;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PublicKeySecpErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_PublicKeySecpErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1ok + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_RouteLightningErrorZ_err @@ -367,6 +367,30 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SecretKeySecpErrorZ_err + * Signature: (Lorg/ldk/impl/bindings/LDKSecp256k1Error;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SecretKeySecpErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_SecretKeySecpErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1ok + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_SignatureNoneZ_free @@ -407,6 +431,30 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErr JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TxOutAccessErrorZ_err + * Signature: (Lorg/ldk/impl/bindings/LDKAccessError;)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err + (JNIEnv *, jclass, jobject); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TxOutAccessErrorZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_TxOutAccessErrorZ_ok + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CResult_boolLightningErrorZ_err @@ -463,6 +511,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1HTLCOutputInCommitmentSignatureZZ_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CVec_C2Tuple_TxidCVec_TxOutZZZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1TxOutZZZ_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CVec_C2Tuple_usizeTransactionZZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free @@ -591,6 +655,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescripto JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: CVec_TxOutZ_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxOutZ_1free + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: CVec_UpdateAddHTLCZ_free @@ -641,10 +713,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free /* * Class: org_ldk_impl_bindings - * Method: CVec_usizeZ_free + * Method: Transaction_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1usizeZ_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free (JNIEnv *, jclass, jlong); /* @@ -657,18 +729,42 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_Txidu32Z_new - * Signature: (JI)J + * Method: C2Tuple_usizeTransactionZ_new + * Signature: (JJ)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Txidu32Z_1new - (JNIEnv *, jclass, jlong, jint); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: CResult_NoneChannelMonitorUpdateErrZ_ok + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok + (JNIEnv *, jclass); /* * Class: org_ldk_impl_bindings - * Method: C2Tuple_Scriptu64Z_new + * Method: CResult_NoneMonitorUpdateErrorZ_ok + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok + (JNIEnv *, jclass); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_OutPointScriptZ_new + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: C2Tuple_TxidCVec_TxOutZZ_new * Signature: (JJ)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1Scriptu64Z_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1TxOutZZ_1new (JNIEnv *, jclass, jlong, jlong); /* @@ -727,30 +823,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok (JNIEnv *, jclass); -/* - * Class: org_ldk_impl_bindings - * Method: CResult_NoneChannelMonitorUpdateErrZ_ok - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok - (JNIEnv *, jclass); - -/* - * Class: org_ldk_impl_bindings - * Method: CResult_NoneMonitorUpdateErrorZ_ok - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok - (JNIEnv *, jclass); - -/* - * Class: org_ldk_impl_bindings - * Method: C2Tuple_OutPointScriptZ_new - * Signature: (JJ)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new - (JNIEnv *, jclass, jlong, jlong); - /* * Class: org_ldk_impl_bindings * Method: C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new @@ -1249,26 +1321,34 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1default /* * Class: org_ldk_impl_bindings - * Method: ChainWatchInterface_free + * Method: Access_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterface_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Access_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: BroadcasterInterface_free + * Method: Watch_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Watch_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: Filter_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChainListener_free + * Method: BroadcasterInterface_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainListener_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1free (JNIEnv *, jclass, jlong); /* @@ -1281,168 +1361,240 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1free /* * Class: org_ldk_impl_bindings - * Method: ChainWatchedUtil_free + * Method: ChainMonitor_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchedUtil_new - * Signature: ()J + * Method: ChainMonitor_block_connected + * Signature: (J[BJI)V */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1new - (JNIEnv *, jclass); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1block_1connected + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchedUtil_register_tx - * Signature: (J[BJ)Z + * Method: ChainMonitor_block_disconnected + * Signature: (J[BI)V */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1tx - (JNIEnv *, jclass, jlong, jbyteArray, jlong); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1block_1disconnected + (JNIEnv *, jclass, jlong, jbyteArray, jint); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchedUtil_register_outpoint - * Signature: (JJJ)Z + * Method: ChainMonitor_new + * Signature: (JJJJ)J */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1register_1outpoint - (JNIEnv *, jclass, jlong, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1new + (JNIEnv *, jclass, jlong, jlong, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchedUtil_watch_all - * Signature: (J)Z + * Method: ChainMonitor_as_Watch + * Signature: (J)J */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1watch_1all +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1Watch (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchedUtil_does_match_tx - * Signature: (JJ)Z + * Method: ChainMonitor_as_EventsProvider + * Signature: (J)J */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchedUtil_1does_1match_1tx - (JNIEnv *, jclass, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1EventsProvider + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: BlockNotifier_free + * Method: ChannelMonitorUpdate_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: BlockNotifier_new + * Method: ChannelMonitorUpdate_get_update_id * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1new +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: BlockNotifier_register_listener + * Method: ChannelMonitorUpdate_set_update_id * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1register_1listener +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: BlockNotifier_block_connected - * Signature: (JJI)V + * Method: ChannelMonitorUpdate_write + * Signature: (J)J */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected - (JNIEnv *, jclass, jlong, jlong, jint); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: BlockNotifier_block_connected_checked - * Signature: (J[BIJJ)Z + * Method: ChannelMonitorUpdate_read + * Signature: (J)J */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1connected_1checked - (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: BlockNotifier_block_disconnected - * Signature: (J[BI)V + * Method: MonitorUpdateError_free + * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BlockNotifier_1block_1disconnected - (JNIEnv *, jclass, jlong, jbyteArray, jint); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchInterfaceUtil_free + * Method: MonitorEvent_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchInterfaceUtil_as_ChainWatchInterface - * Signature: (J)J + * Method: HTLCUpdate_free + * Signature: (J)V */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1as_1ChainWatchInterface +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchInterfaceUtil_new - * Signature: (Lorg/ldk/impl/bindings/LDKNetwork;)J + * Method: HTLCUpdate_write + * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1new - (JNIEnv *, jclass, jobject); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChainWatchInterfaceUtil_does_match_tx - * Signature: (JJ)Z + * Method: HTLCUpdate_read + * Signature: (J)J */ -JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChainWatchInterfaceUtil_1does_1match_1tx - (JNIEnv *, jclass, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OutPoint_free + * Method: ChannelMonitor_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OutPoint_get_txid - * Signature: (J)[B + * Method: ChannelMonitor_update_monitor + * Signature: (JJJJ)J */ -JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor + (JNIEnv *, jclass, jlong, jlong, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: OutPoint_set_txid - * Signature: (JJ)V + * Method: ChannelMonitor_get_latest_update_id + * Signature: (J)J */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid - (JNIEnv *, jclass, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OutPoint_get_index - * Signature: (J)S + * Method: ChannelMonitor_get_funding_txo + * Signature: (J)J */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: OutPoint_set_index - * Signature: (JS)V + * Method: ChannelMonitor_get_and_clear_pending_monitor_events + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitor_get_and_clear_pending_events + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitor_get_latest_holder_commitment_txn + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitor_block_connected + * Signature: (J[BJIJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint, jlong, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelMonitor_block_disconnected + * Signature: (J[BIJJJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1disconnected + (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutPoint_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutPoint_get_txid + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutPoint_set_txid + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutPoint_get_index + * Signature: (J)S + */ +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: OutPoint_set_index + * Signature: (JS)V */ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index (JNIEnv *, jclass, jlong, jshort); @@ -1617,26 +1769,26 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new /* * Class: org_ldk_impl_bindings - * Method: InMemoryChannelKeys_remote_pubkeys + * Method: InMemoryChannelKeys_counterparty_pubkeys * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1pubkeys +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1pubkeys (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: InMemoryChannelKeys_remote_to_self_delay + * Method: InMemoryChannelKeys_counterparty_selected_contest_delay * Signature: (J)S */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1remote_1to_1self_1delay +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1selected_1contest_1delay (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: InMemoryChannelKeys_local_to_self_delay + * Method: InMemoryChannelKeys_holder_selected_contest_delay * Signature: (J)S */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1local_1to_1self_1delay +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1holder_1selected_1contest_1delay (JNIEnv *, jclass, jlong); /* @@ -1993,11 +2145,19 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsPro /* * Class: org_ldk_impl_bindings - * Method: ChannelManager_as_ChainListener - * Signature: (J)J + * Method: ChannelManager_block_connected + * Signature: (J[BJI)V */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChainListener - (JNIEnv *, jclass, jlong); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1connected + (JNIEnv *, jclass, jlong, jbyteArray, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelManager_block_disconnected + * Signature: (J[B)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconnected + (JNIEnv *, jclass, jlong, jbyteArray); /* * Class: org_ldk_impl_bindings @@ -2049,18 +2209,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1f /* * Class: org_ldk_impl_bindings - * Method: ChannelManagerReadArgs_get_monitor + * Method: ChannelManagerReadArgs_get_chain_monitor * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1monitor +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1get_1chain_1monitor (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChannelManagerReadArgs_set_monitor + * Method: ChannelManagerReadArgs_set_chain_monitor * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1monitor +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1chain_1monitor (JNIEnv *, jclass, jlong, jlong); /* @@ -2119,150 +2279,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1set_1d JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1new (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong); -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitorUpdate_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitorUpdate_get_update_id - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitorUpdate_set_update_id - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1set_1update_1id - (JNIEnv *, jclass, jlong, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitorUpdate_write - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitorUpdate_read - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1read - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: MonitorUpdateError_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: MonitorEvent_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: HTLCUpdate_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: HTLCUpdate_write - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: HTLCUpdate_read - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitor_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ManyChannelMonitor_free - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ManyChannelMonitor_1free - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitor_update_monitor - * Signature: (JJJJ)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor - (JNIEnv *, jclass, jlong, jlong, jlong, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitor_get_latest_update_id - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitor_get_funding_txo - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitor_get_and_clear_pending_monitor_events - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitor_get_and_clear_pending_events - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events - (JNIEnv *, jclass, jlong); - -/* - * Class: org_ldk_impl_bindings - * Method: ChannelMonitor_get_latest_local_commitment_txn - * Signature: (JJ)J - */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1local_1commitment_1txn - (JNIEnv *, jclass, jlong, jlong); - /* * Class: org_ldk_impl_bindings * Method: DecodeError_free @@ -3839,6 +3855,22 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedNodeAnnouncement_get_features + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1features + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedNodeAnnouncement_set_features + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1features + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: UnsignedNodeAnnouncement_get_timestamp @@ -3967,6 +3999,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelAnnouncement_get_features + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1features + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelAnnouncement_set_features + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1features + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: UnsignedChannelAnnouncement_get_chain_hash @@ -4220,128 +4268,432 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1ti * Method: UnsignedChannelUpdate_get_flags * Signature: (J)B */ -JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1flags - (JNIEnv *, jclass, jlong); +JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1flags + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_set_flags + * Signature: (JB)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1flags + (JNIEnv *, jclass, jlong, jbyte); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_get_cltv_expiry_delta + * Signature: (J)S + */ +JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1cltv_1expiry_1delta + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_set_cltv_expiry_delta + * Signature: (JS)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1cltv_1expiry_1delta + (JNIEnv *, jclass, jlong, jshort); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_get_htlc_minimum_msat + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1htlc_1minimum_1msat + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_set_htlc_minimum_msat + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1htlc_1minimum_1msat + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_get_fee_base_msat + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1base_1msat + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_set_fee_base_msat + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1base_1msat + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_get_fee_proportional_millionths + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1proportional_1millionths + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: UnsignedChannelUpdate_set_fee_proportional_millionths + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelUpdate_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelUpdate_get_signature + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelUpdate_set_signature + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelUpdate_get_contents + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1contents + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelUpdate_set_contents + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1contents + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelUpdate_new + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_get_chain_hash + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1chain_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_set_chain_hash + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1chain_1hash + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_get_first_blocknum + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1first_1blocknum + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_set_first_blocknum + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1first_1blocknum + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_get_number_of_blocks + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1number_1of_1blocks + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_set_number_of_blocks + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1set_1number_1of_1blocks + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_new + * Signature: (JII)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new + (JNIEnv *, jclass, jlong, jint, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_get_chain_hash + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1chain_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_set_chain_hash + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1chain_1hash + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_get_first_blocknum + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1first_1blocknum + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_set_first_blocknum + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1first_1blocknum + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_get_number_of_blocks + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1number_1of_1blocks + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_set_number_of_blocks + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1number_1of_1blocks + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_get_full_information + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1full_1information + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_set_full_information + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1full_1information + (JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_set_short_channel_ids + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1short_1channel_1ids + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_new + * Signature: (JIIZJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new + (JNIEnv *, jclass, jlong, jint, jint, jboolean, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryShortChannelIds_free + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryShortChannelIds_get_chain_hash + * Signature: (J)[B + */ +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1get_1chain_1hash + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryShortChannelIds_set_chain_hash + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1chain_1hash + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_set_flags - * Signature: (JB)V + * Method: QueryShortChannelIds_set_short_channel_ids + * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1flags - (JNIEnv *, jclass, jlong, jbyte); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1short_1channel_1ids + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_get_cltv_expiry_delta - * Signature: (J)S + * Method: QueryShortChannelIds_new + * Signature: (JJ)J */ -JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1cltv_1expiry_1delta - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new + (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_set_cltv_expiry_delta - * Signature: (JS)V + * Method: ReplyShortChannelIdsEnd_free + * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1cltv_1expiry_1delta - (JNIEnv *, jclass, jlong, jshort); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_get_htlc_minimum_msat - * Signature: (J)J + * Method: ReplyShortChannelIdsEnd_get_chain_hash + * Signature: (J)[B */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1htlc_1minimum_1msat +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1get_1chain_1hash (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_set_htlc_minimum_msat + * Method: ReplyShortChannelIdsEnd_set_chain_hash * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1htlc_1minimum_1msat +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1set_1chain_1hash (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_get_fee_base_msat - * Signature: (J)I + * Method: ReplyShortChannelIdsEnd_get_full_information + * Signature: (J)Z */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1base_1msat +JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1get_1full_1information (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_set_fee_base_msat - * Signature: (JI)V + * Method: ReplyShortChannelIdsEnd_set_full_information + * Signature: (JZ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1base_1msat - (JNIEnv *, jclass, jlong, jint); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1set_1full_1information + (JNIEnv *, jclass, jlong, jboolean); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_get_fee_proportional_millionths - * Signature: (J)I + * Method: ReplyShortChannelIdsEnd_new + * Signature: (JZ)J */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1fee_1proportional_1millionths - (JNIEnv *, jclass, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1new + (JNIEnv *, jclass, jlong, jboolean); /* * Class: org_ldk_impl_bindings - * Method: UnsignedChannelUpdate_set_fee_proportional_millionths - * Signature: (JI)V + * Method: GossipTimestampFilter_free + * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fee_1proportional_1millionths - (JNIEnv *, jclass, jlong, jint); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free + (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChannelUpdate_free - * Signature: (J)V + * Method: GossipTimestampFilter_get_chain_hash + * Signature: (J)[B */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free +JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1chain_1hash (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChannelUpdate_get_signature - * Signature: (J)J + * Method: GossipTimestampFilter_set_chain_hash + * Signature: (JJ)V */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1chain_1hash + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: GossipTimestampFilter_get_first_timestamp + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1first_1timestamp (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChannelUpdate_set_signature - * Signature: (JJ)V + * Method: GossipTimestampFilter_set_first_timestamp + * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature - (JNIEnv *, jclass, jlong, jlong); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1first_1timestamp + (JNIEnv *, jclass, jlong, jint); /* * Class: org_ldk_impl_bindings - * Method: ChannelUpdate_get_contents - * Signature: (J)J + * Method: GossipTimestampFilter_get_timestamp_range + * Signature: (J)I */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1contents +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1timestamp_1range (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: ChannelUpdate_set_contents - * Signature: (JJ)V + * Method: GossipTimestampFilter_set_timestamp_range + * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1contents - (JNIEnv *, jclass, jlong, jlong); +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1timestamp_1range + (JNIEnv *, jclass, jlong, jint); /* * Class: org_ldk_impl_bindings - * Method: ChannelUpdate_new - * Signature: (JJ)J + * Method: GossipTimestampFilter_new + * Signature: (JII)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new - (JNIEnv *, jclass, jlong, jlong); +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new + (JNIEnv *, jclass, jlong, jint, jint); /* * Class: org_ldk_impl_bindings @@ -4919,6 +5271,86 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1write JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1read (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: QueryShortChannelIds_read + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1read + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryShortChannelIds_write + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyShortChannelIdsEnd_read + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1read + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyShortChannelIdsEnd_write + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_read + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1read + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: QueryChannelRange_write + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_read + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1read + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ReplyChannelRange_write + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1write + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: GossipTimestampFilter_read + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1read + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: GossipTimestampFilter_write + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1write + (JNIEnv *, jclass, jlong); + /* * Class: org_ldk_impl_bindings * Method: MessageHandler_free @@ -5095,6 +5527,38 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1timer_1tick_1occu JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secret (JNIEnv *, jclass, jbyteArray, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: derive_private_key + * Signature: (J[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1private_1key + (JNIEnv *, jclass, jlong, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: derive_public_key + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1public_1key + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: derive_private_revocation_key + * Signature: ([B[B)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1private_1revocation_1key + (JNIEnv *, jclass, jbyteArray, jbyteArray); + +/* + * Class: org_ldk_impl_bindings + * Method: derive_public_revocation_key + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1public_1revocation_1key + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: TxCreationKeys_free @@ -5137,50 +5601,50 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1revocatio /* * Class: org_ldk_impl_bindings - * Method: TxCreationKeys_get_a_htlc_key + * Method: TxCreationKeys_get_broadcaster_htlc_key * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1htlc_1key +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1broadcaster_1htlc_1key (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: TxCreationKeys_set_a_htlc_key + * Method: TxCreationKeys_set_broadcaster_htlc_key * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1htlc_1key +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1broadcaster_1htlc_1key (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: TxCreationKeys_get_b_htlc_key + * Method: TxCreationKeys_get_countersignatory_htlc_key * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1b_1htlc_1key +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1countersignatory_1htlc_1key (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: TxCreationKeys_set_b_htlc_key + * Method: TxCreationKeys_set_countersignatory_htlc_key * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1b_1htlc_1key +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1countersignatory_1htlc_1key (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: TxCreationKeys_get_a_delayed_payment_key + * Method: TxCreationKeys_get_broadcaster_delayed_payment_key * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1a_1delayed_1payment_1key +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1broadcaster_1delayed_1payment_1key (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: TxCreationKeys_set_a_delayed_payment_key + * Method: TxCreationKeys_set_broadcaster_delayed_payment_key * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1a_1delayed_1payment_1key +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1broadcaster_1delayed_1payment_1key (JNIEnv *, jclass, jlong, jlong); /* @@ -5481,122 +5945,122 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transaction /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_free + * Method: HolderCommitmentTransaction_free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1free +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1free (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_get_unsigned_tx + * Method: HolderCommitmentTransaction_get_unsigned_tx * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1unsigned_1tx +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1unsigned_1tx (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_set_unsigned_tx + * Method: HolderCommitmentTransaction_set_unsigned_tx * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1unsigned_1tx +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1unsigned_1tx (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_get_their_sig + * Method: HolderCommitmentTransaction_get_counterparty_sig * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1their_1sig +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1counterparty_1sig (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_set_their_sig + * Method: HolderCommitmentTransaction_set_counterparty_sig * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1their_1sig +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1counterparty_1sig (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_get_feerate_per_kw + * Method: HolderCommitmentTransaction_get_feerate_per_kw * Signature: (J)I */ -JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1feerate_1per_1kw +JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1feerate_1per_1kw (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_set_feerate_per_kw + * Method: HolderCommitmentTransaction_set_feerate_per_kw * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1feerate_1per_1kw +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1feerate_1per_1kw (JNIEnv *, jclass, jlong, jint); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_set_per_htlc + * Method: HolderCommitmentTransaction_set_per_htlc * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1set_1per_1htlc +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1per_1htlc (JNIEnv *, jclass, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_new_missing_local_sig + * Method: HolderCommitmentTransaction_new_missing_holder_sig * Signature: (JJJJJIJ)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1new_1missing_1local_1sig +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1new_1missing_1holder_1sig (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jint, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_trust_key_derivation + * Method: HolderCommitmentTransaction_trust_key_derivation * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1trust_1key_1derivation +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1trust_1key_1derivation (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_txid + * Method: HolderCommitmentTransaction_txid * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1txid +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1txid (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_get_local_sig + * Method: HolderCommitmentTransaction_get_holder_sig * Signature: (J[BJJ)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1local_1sig +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1holder_1sig (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_get_htlc_sigs + * Method: HolderCommitmentTransaction_get_htlc_sigs * Signature: (J[BS)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1get_1htlc_1sigs +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1htlc_1sigs (JNIEnv *, jclass, jlong, jbyteArray, jshort); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_write + * Method: HolderCommitmentTransaction_write * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1write +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1write (JNIEnv *, jclass, jlong); /* * Class: org_ldk_impl_bindings - * Method: LocalCommitmentTransaction_read + * Method: HolderCommitmentTransaction_read * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LocalCommitmentTransaction_1read +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1read (JNIEnv *, jclass, jlong); /* @@ -5647,6 +6111,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1pubkey JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1pubkey (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: RouteHop_get_node_features + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1node_1features + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RouteHop_set_node_features + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1node_1features + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: RouteHop_get_short_channel_id @@ -5663,6 +6143,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1short_1channel JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1short_1channel_1id (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: RouteHop_get_channel_features + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1channel_1features + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: RouteHop_set_channel_features + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1channel_1features + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: RouteHop_get_fee_msat @@ -5695,6 +6191,14 @@ JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1cltv_1expiry_1d JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1cltv_1expiry_1delta (JNIEnv *, jclass, jlong, jint); +/* + * Class: org_ldk_impl_bindings + * Method: RouteHop_new + * Signature: (JJJJJI)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1new + (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jint); + /* * Class: org_ldk_impl_bindings * Method: Route_free @@ -5975,6 +6479,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1htlc_1minimum_1msat (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: DirectionalChannelInfo_get_last_update_message + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1last_1update_1message + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: DirectionalChannelInfo_set_last_update_message + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update_1message + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: DirectionalChannelInfo_write @@ -5999,6 +6519,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1read JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChannelInfo_get_features + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1features + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelInfo_set_features + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1features + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: ChannelInfo_get_node_one @@ -6063,6 +6599,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1two_1to_1on JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1two_1to_1one (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: ChannelInfo_get_announcement_message + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1announcement_1message + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: ChannelInfo_set_announcement_message + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1announcement_1message + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: ChannelInfo_write @@ -6151,6 +6703,22 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free (JNIEnv *, jclass, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: NodeAnnouncementInfo_get_features + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1features + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeAnnouncementInfo_set_features + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1features + (JNIEnv *, jclass, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: NodeAnnouncementInfo_get_last_update @@ -6207,6 +6775,30 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1ali JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1addresses (JNIEnv *, jclass, jlong, jlong); +/* + * Class: org_ldk_impl_bindings + * Method: NodeAnnouncementInfo_get_announcement_message + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1announcement_1message + (JNIEnv *, jclass, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeAnnouncementInfo_set_announcement_message + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1announcement_1message + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_ldk_impl_bindings + * Method: NodeAnnouncementInfo_new + * Signature: (JIJJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new + (JNIEnv *, jclass, jlong, jint, jlong, jlong, jlong, jlong); + /* * Class: org_ldk_impl_bindings * Method: NodeAnnouncementInfo_write