X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fimpl%2Fbindings.java;h=f9d99ca5a4b6d028a978c89d817588f31caf74ce;hb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;hp=744af9f7d80bfa5051a6b3af7a1a2070e2c89f12;hpb=a9b82019e7ffa7d32d44943133bb64e1197bd2f1;p=ldk-java diff --git a/src/main/java/org/ldk/impl/bindings.java b/src/main/java/org/ldk/impl/bindings.java index 744af9f7..f9d99ca5 100644 --- a/src/main/java/org/ldk/impl/bindings.java +++ b/src/main/java/org/ldk/impl/bindings.java @@ -36,7 +36,6 @@ public class bindings { static { LDKLevel.values(); /* Force enum statics to run */ } static { LDKNetwork.values(); /* Force enum statics to run */ } static { LDKSecp256k1Error.values(); /* Force enum statics to run */ } - public static native VecOrSliceDef LDKCVec_u8Z_arr_info(long vec_ptr); public static native long LDKCVec_u8Z_new(byte[] elems); public static native long LDKC2Tuple_u64u64Z_new(long a, long b); public static native long LDKC2Tuple_u64u64Z_get_a(long ptr); @@ -67,7 +66,6 @@ public class bindings { } static { LDKSpendableOutputDescriptor.init(); } public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr); - public static native VecOrSliceDef LDKCVec_SpendableOutputDescriptorZ_arr_info(long vec_ptr); public static native long LDKCVec_SpendableOutputDescriptorZ_new(long[] elems); public static class LDKErrorAction { private LDKErrorAction() {} @@ -76,6 +74,7 @@ public class bindings { DisconnectPeer(long msg) { this.msg = msg; } } public final static class IgnoreError extends LDKErrorAction { + IgnoreError() { } } public final static class SendErrorMessage extends LDKErrorAction { public long msg; @@ -198,7 +197,6 @@ public class bindings { } static { LDKMessageSendEvent.init(); } public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr); - public static native VecOrSliceDef LDKCVec_MessageSendEventZ_arr_info(long vec_ptr); public static native long LDKCVec_MessageSendEventZ_new(long[] elems); public static class LDKEvent { private LDKEvent() {} @@ -241,17 +239,14 @@ public class bindings { } static { LDKEvent.init(); } public static native LDKEvent LDKEvent_ref_from_ptr(long ptr); - public static native VecOrSliceDef LDKCVec_EventZ_arr_info(long vec_ptr); public static native long LDKCVec_EventZ_new(long[] elems); public static native long LDKC2Tuple_usizeTransactionZ_new(long a, byte[] b); public static native long LDKC2Tuple_usizeTransactionZ_get_a(long ptr); public static native byte[] LDKC2Tuple_usizeTransactionZ_get_b(long ptr); - public static native VecOrSliceDef LDKCVec_C2Tuple_usizeTransactionZZ_arr_info(long vec_ptr); public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(long[] elems); public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg); public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg); public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg); - public static native long[] LDKCVec_MonitorEventZ_arr_info(long vec_ptr); public static native long LDKCVec_MonitorEventZ_new(long[] elems); public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg); public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg); @@ -262,18 +257,14 @@ public class bindings { public static native long LDKC2Tuple_OutPointScriptZ_new(long a, byte[] b); public static native long LDKC2Tuple_OutPointScriptZ_get_a(long ptr); public static native byte[] LDKC2Tuple_OutPointScriptZ_get_b(long ptr); - public static native VecOrSliceDef LDKCVec_TransactionZ_arr_info(long vec_ptr); public static native long LDKC2Tuple_u32TxOutZ_new(int a, long b); public static native int LDKC2Tuple_u32TxOutZ_get_a(long ptr); public static native long LDKC2Tuple_u32TxOutZ_get_b(long ptr); - public static native VecOrSliceDef LDKCVec_C2Tuple_u32TxOutZZ_arr_info(long vec_ptr); public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(long[] elems); public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b); public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr); public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr); - public static native VecOrSliceDef LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_arr_info(long vec_ptr); public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(long[] elems); - public static native VecOrSliceDef LDKCVec_SignatureZ_arr_info(long vec_ptr); public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b); public static native byte[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr); public static native byte[][] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr); @@ -301,7 +292,6 @@ public class bindings { byte[] write(); } public static native long LDKChannelKeys_new(LDKChannelKeys impl, long pubkeys); - public static native LDKChannelKeys LDKChannelKeys_get_obj_from_jcalls(long val); // LDKPublicKey ChannelKeys_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx public static native byte[] ChannelKeys_get_per_commitment_point(long this_arg, long idx); // LDKThirtyTwoBytes ChannelKeys_release_commitment_secret LDKChannelKeys* this_arg, uint64_t idx @@ -366,6 +356,7 @@ public class bindings { ChannelUnavailable(byte[] err) { this.err = err; } } public final static class MonitorUpdateFailed extends LDKAPIError { + MonitorUpdateFailed() { } } static native void init(); } @@ -374,7 +365,6 @@ public class bindings { public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg); public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg); public static native long LDKCResult_NoneAPIErrorZ_get_err(long arg); - public static native long[] LDKCVec_ChannelDetailsZ_arr_info(long vec_ptr); public static native long LDKCVec_ChannelDetailsZ_new(long[] elems); public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg); public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg); @@ -407,9 +397,7 @@ public class bindings { } static { LDKNetAddress.init(); } public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr); - public static native VecOrSliceDef LDKCVec_NetAddressZ_arr_info(long vec_ptr); public static native long LDKCVec_NetAddressZ_new(long[] elems); - public static native long[] LDKCVec_ChannelMonitorZ_arr_info(long vec_ptr); public static native long LDKCVec_ChannelMonitorZ_new(long[] elems); public interface LDKWatch { long watch_channel(long funding_txo, long monitor); @@ -417,7 +405,6 @@ public class bindings { long[] release_pending_monitor_events(); } public static native long LDKWatch_new(LDKWatch impl); - public static native LDKWatch LDKWatch_get_obj_from_jcalls(long val); // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor public static native long Watch_watch_channel(long this_arg, long funding_txo, long monitor); // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update @@ -428,7 +415,6 @@ public class bindings { void broadcast_transaction(byte[] tx); } public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl); - public static native LDKBroadcasterInterface LDKBroadcasterInterface_get_obj_from_jcalls(long val); // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, struct LDKTransaction tx public static native void BroadcasterInterface_broadcast_transaction(long this_arg, byte[] tx); public interface LDKKeysInterface { @@ -440,7 +426,6 @@ public class bindings { long read_chan_signer(byte[] reader); } public static native long LDKKeysInterface_new(LDKKeysInterface impl); - public static native LDKKeysInterface LDKKeysInterface_get_obj_from_jcalls(long val); // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface* this_arg public static native byte[] KeysInterface_get_node_secret(long this_arg); // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface* this_arg @@ -457,14 +442,12 @@ public class bindings { int get_est_sat_per_1000_weight(LDKConfirmationTarget confirmation_target); } public static native long LDKFeeEstimator_new(LDKFeeEstimator impl); - public static native LDKFeeEstimator LDKFeeEstimator_get_obj_from_jcalls(long val); // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator* this_arg, enum LDKConfirmationTarget confirmation_target public static native int FeeEstimator_get_est_sat_per_1000_weight(long this_arg, LDKConfirmationTarget confirmation_target); public interface LDKLogger { void log(String record); } public static native long LDKLogger_new(LDKLogger impl); - public static native LDKLogger LDKLogger_get_obj_from_jcalls(long val); public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b); public static native byte[] LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr); public static native long LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr); @@ -477,15 +460,10 @@ public class bindings { public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg); public static native long LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg); public static native long LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg); - public static native VecOrSliceDef LDKCVec_u64Z_arr_info(long vec_ptr); public static native long LDKCVec_u64Z_new(long[] elems); - public static native long[] LDKCVec_UpdateAddHTLCZ_arr_info(long vec_ptr); public static native long LDKCVec_UpdateAddHTLCZ_new(long[] elems); - public static native long[] LDKCVec_UpdateFulfillHTLCZ_arr_info(long vec_ptr); public static native long LDKCVec_UpdateFulfillHTLCZ_new(long[] elems); - public static native long[] LDKCVec_UpdateFailHTLCZ_arr_info(long vec_ptr); public static native long LDKCVec_UpdateFailHTLCZ_new(long[] elems); - public static native long[] LDKCVec_UpdateFailMalformedHTLCZ_arr_info(long vec_ptr); public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(long[] elems); public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg); public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg); @@ -494,9 +472,7 @@ public class bindings { public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr); public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr); public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr); - public static native VecOrSliceDef LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_arr_info(long vec_ptr); public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(long[] elems); - public static native long[] LDKCVec_NodeAnnouncementZ_arr_info(long vec_ptr); public static native long LDKCVec_NodeAnnouncementZ_new(long[] elems); public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg); public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg); @@ -540,7 +516,6 @@ public class bindings { public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg); public static native long LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg); public static native long LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg); - public static native VecOrSliceDef LDKCVec_PublicKeyZ_arr_info(long vec_ptr); public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg); public static native byte[] LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg); public static native long LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg); @@ -562,13 +537,10 @@ public class bindings { public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg); public static native long LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg); public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg); - public static native long[] LDKCVec_RouteHopZ_arr_info(long vec_ptr); public static native long LDKCVec_RouteHopZ_new(long[] elems); - public static native VecOrSliceDef LDKCVec_CVec_RouteHopZZ_arr_info(long vec_ptr); public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg); public static native long LDKCResult_RouteDecodeErrorZ_get_ok(long arg); public static native long LDKCResult_RouteDecodeErrorZ_get_err(long arg); - public static native long[] LDKCVec_RouteHintZ_arr_info(long vec_ptr); public static native long LDKCVec_RouteHintZ_new(long[] elems); public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg); public static native long LDKCResult_RouteLightningErrorZ_get_ok(long arg); @@ -589,21 +561,18 @@ public class bindings { long[] get_and_clear_pending_msg_events(); } public static native long LDKMessageSendEventsProvider_new(LDKMessageSendEventsProvider impl); - public static native LDKMessageSendEventsProvider LDKMessageSendEventsProvider_get_obj_from_jcalls(long val); // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* this_arg public static native long[] MessageSendEventsProvider_get_and_clear_pending_msg_events(long this_arg); public interface LDKEventsProvider { long[] get_and_clear_pending_events(); } public static native long LDKEventsProvider_new(LDKEventsProvider impl); - public static native LDKEventsProvider LDKEventsProvider_get_obj_from_jcalls(long val); // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider* this_arg public static native long[] EventsProvider_get_and_clear_pending_events(long this_arg); public interface LDKAccess { long get_utxo(byte[] genesis_hash, long short_channel_id); } public static native long LDKAccess_new(LDKAccess impl); - public static native LDKAccess LDKAccess_get_obj_from_jcalls(long val); // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id public static native long Access_get_utxo(long this_arg, byte[] genesis_hash, long short_channel_id); public interface LDKFilter { @@ -611,7 +580,6 @@ public class bindings { void register_output(long outpoint, byte[] script_pubkey); } public static native long LDKFilter_new(LDKFilter impl); - public static native LDKFilter LDKFilter_get_obj_from_jcalls(long val); // void Filter_register_tx LDKFilter* this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey public static native void Filter_register_tx(long this_arg, byte[] txid, byte[] script_pubkey); // void Filter_register_output LDKFilter* this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey @@ -621,7 +589,6 @@ public class bindings { long update_persisted_channel(long id, long update, long data); } public static native long LDKPersist_new(LDKPersist impl); - public static native LDKPersist LDKPersist_get_obj_from_jcalls(long val); // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data public static native long Persist_persist_new_channel(long this_arg, long id, long data); // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data @@ -648,7 +615,6 @@ public class bindings { void handle_error(byte[] their_node_id, long msg); } public static native long LDKChannelMessageHandler_new(LDKChannelMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider); - public static native LDKChannelMessageHandler LDKChannelMessageHandler_get_obj_from_jcalls(long val); // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg public static native void ChannelMessageHandler_handle_open_channel(long this_arg, byte[] their_node_id, long their_features, long msg); // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg @@ -701,7 +667,6 @@ public class bindings { long handle_query_short_channel_ids(byte[] their_node_id, long msg); } public static native long LDKRoutingMessageHandler_new(LDKRoutingMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider); - public static native LDKRoutingMessageHandler LDKRoutingMessageHandler_get_obj_from_jcalls(long val); // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler* this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg public static native long RoutingMessageHandler_handle_node_announcement(long this_arg, long msg); // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler* this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg @@ -731,7 +696,6 @@ public class bindings { long hash(); } public static native long LDKSocketDescriptor_new(LDKSocketDescriptor impl); - public static native LDKSocketDescriptor LDKSocketDescriptor_get_obj_from_jcalls(long val); // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor* this_arg, struct LDKu8slice data, bool resume_read public static native long SocketDescriptor_send_data(long this_arg, byte[] data, boolean resume_read); // void SocketDescriptor_disconnect_socket LDKSocketDescriptor* this_arg @@ -742,8 +706,6 @@ public class bindings { public static native void Transaction_free(byte[] _res); // void TxOut_free(struct LDKTxOut _res); public static native void TxOut_free(long _res); - // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig); - public static native long TxOut_clone(long orig); // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res); public static native void CVec_SpendableOutputDescriptorZ_free(long[] _res); // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);