+ public static native long LDKCVec_NetAddressZ_new(long[] elems);
+ public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(byte[] a, byte[] b);
+ public static native byte[] LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
+ public static native byte[] LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
+ public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
+ public static native byte[] LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
+ public static native long LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
+ public static native long LDKCVec_ChannelMonitorZ_new(long[] elems);
+ 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);
+ // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR 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 *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
+ public static native long Watch_update_channel(long this_arg, long funding_txo, long update);
+ // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
+ public static native long[] Watch_release_pending_monitor_events(long this_arg);
+ public interface LDKBroadcasterInterface {
+ void broadcast_transaction(byte[] tx);
+ }
+ public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
+ // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
+ public static native void BroadcasterInterface_broadcast_transaction(long this_arg, byte[] tx);
+ public interface LDKKeysInterface {
+ byte[] get_node_secret();
+ byte[] get_destination_script();
+ byte[] get_shutdown_pubkey();
+ long get_channel_signer(boolean inbound, long channel_value_satoshis);
+ byte[] get_secure_random_bytes();
+ long read_chan_signer(byte[] reader);
+ long sign_invoice(byte[] invoice_preimage);
+ }
+ public static native long LDKKeysInterface_new(LDKKeysInterface impl);
+ // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
+ public static native byte[] KeysInterface_get_node_secret(long this_arg);
+ // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
+ public static native byte[] KeysInterface_get_destination_script(long this_arg);
+ // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
+ public static native byte[] KeysInterface_get_shutdown_pubkey(long this_arg);
+ // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
+ public static native long KeysInterface_get_channel_signer(long this_arg, boolean inbound, long channel_value_satoshis);
+ // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
+ public static native byte[] KeysInterface_get_secure_random_bytes(long this_arg);
+ // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
+ public static native long KeysInterface_read_chan_signer(long this_arg, byte[] reader);
+ // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
+ public static native long KeysInterface_sign_invoice(long this_arg, byte[] invoice_preimage);
+ public interface LDKFeeEstimator {
+ int get_est_sat_per_1000_weight(ConfirmationTarget confirmation_target);
+ }
+ public static native long LDKFeeEstimator_new(LDKFeeEstimator impl);
+ // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
+ public static native int FeeEstimator_get_est_sat_per_1000_weight(long this_arg, ConfirmationTarget confirmation_target);
+ public interface LDKLogger {
+ void log(String record);
+ }
+ public static native long LDKLogger_new(LDKLogger impl);
+ 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);
+ public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
+ public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
+ public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
+ public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
+ public static native long LDKCResult_InvoiceNoneZ_get_ok(long arg);
+ public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
+ public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
+ public static native long LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
+ public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
+ public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(long a, byte[] b, long c);
+ public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
+ public static native byte[] LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
+ public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
+ public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
+ public static native long LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
+ public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
+ public static native long LDKCVec_PrivateRouteZ_new(long[] elems);
+ public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
+ public static native long LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
+ public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
+ public static native long LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
+ public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
+ public static native long LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
+ public static native long LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
+ public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
+ public static native String LDKCResult_StringErrorZ_get_ok(long arg);
+ public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
+ public static native long LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
+ 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 long LDKC2Tuple_u32ScriptZ_new(int a, byte[] b);
+ public static native int LDKC2Tuple_u32ScriptZ_get_a(long ptr);
+ public static native byte[] LDKC2Tuple_u32ScriptZ_get_b(long ptr);
+ public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(long[] elems);
+ public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(byte[] a, long[] b);
+ public static native byte[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
+ public static native long[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
+ public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(long[] elems);
+ public static class LDKEvent {
+ private LDKEvent() {}
+ public final static class FundingGenerationReady extends LDKEvent {
+ public byte[] temporary_channel_id;
+ public long channel_value_satoshis;
+ public byte[] output_script;
+ public long user_channel_id;
+ FundingGenerationReady(byte[] temporary_channel_id, long channel_value_satoshis, byte[] output_script, long user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
+ }
+ public final static class PaymentReceived extends LDKEvent {
+ public byte[] payment_hash;
+ public byte[] payment_preimage;
+ public byte[] payment_secret;
+ public long amt;
+ public long user_payment_id;
+ PaymentReceived(byte[] payment_hash, byte[] payment_preimage, byte[] payment_secret, long amt, long user_payment_id) { this.payment_hash = payment_hash; this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.amt = amt; this.user_payment_id = user_payment_id; }
+ }
+ public final static class PaymentSent extends LDKEvent {
+ public byte[] payment_preimage;
+ PaymentSent(byte[] payment_preimage) { this.payment_preimage = payment_preimage; }
+ }
+ public final static class PaymentFailed extends LDKEvent {
+ public byte[] payment_hash;
+ public boolean rejected_by_dest;
+ PaymentFailed(byte[] payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
+ }
+ public final static class PendingHTLCsForwardable extends LDKEvent {
+ public long time_forwardable;
+ PendingHTLCsForwardable(long time_forwardable) { this.time_forwardable = time_forwardable; }
+ }
+ public final static class SpendableOutputs extends LDKEvent {
+ public long[] outputs;
+ SpendableOutputs(long[] outputs) { this.outputs = outputs; }
+ }
+ static native void init();
+ }
+ static { LDKEvent.init(); }
+ public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
+ public static native long LDKCVec_EventZ_new(long[] elems);
+ 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 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 long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(long[] elems);
+ public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
+ public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
+ public static native long LDKCResult_boolLightningErrorZ_get_err(long arg);
+ public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
+ 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 long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(long[] elems);
+ 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);
+ public static native long LDKCResult_NoneLightningErrorZ_get_err(long arg);
+ 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);
+ public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
+ public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
+ public static native long LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
+ public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
+ public static native long LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
+ public static native long LDKCVec_u64Z_new(long[] elems);
+ public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
+ public static native long LDKCResult_NetAddressu8Z_get_ok(long arg);
+ public static native byte LDKCResult_NetAddressu8Z_get_err(long arg);
+ 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 boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
+ public static native long LDKCVec_UpdateAddHTLCZ_new(long[] elems);
+ public static native long LDKCVec_UpdateFulfillHTLCZ_new(long[] elems);
+ public static native long LDKCVec_UpdateFailHTLCZ_new(long[] elems);
+ public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(long[] elems);
+ public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_InitDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_InitDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_PingDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_PingDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_PongDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_PongDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
+ public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
+ public static native long LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
+ 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 class LDKSignOrCreationError {
+ private LDKSignOrCreationError() {}
+ public final static class SignError extends LDKSignOrCreationError {
+ SignError() { }
+ }
+ public final static class CreationError extends LDKSignOrCreationError {
+ public org.ldk.enums.CreationError creation_error;
+ CreationError(org.ldk.enums.CreationError creation_error) { this.creation_error = creation_error; }
+ }
+ static native void init();
+ }
+ static { LDKSignOrCreationError.init(); }
+ public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
+ public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
+ public static native long LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
+ public static native long LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
+ public interface LDKMessageSendEventsProvider {
+ long[] get_and_clear_pending_msg_events();
+ }
+ public static native long LDKMessageSendEventsProvider_new(LDKMessageSendEventsProvider impl);
+ // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
+ public static native long[] MessageSendEventsProvider_get_and_clear_pending_msg_events(long this_arg);
+ public interface LDKEventHandler {
+ void handle_event(long event);
+ }
+ public static native long LDKEventHandler_new(LDKEventHandler impl);
+ // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
+ public static native void EventHandler_handle_event(long this_arg, long event);
+ public interface LDKEventsProvider {
+ void process_pending_events(long handler);
+ }
+ public static native long LDKEventsProvider_new(LDKEventsProvider impl);
+ // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
+ public static native void EventsProvider_process_pending_events(long this_arg, long handler);
+ public interface LDKAccess {
+ long get_utxo(byte[] genesis_hash, long short_channel_id);
+ }
+ public static native long LDKAccess_new(LDKAccess impl);
+ // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR 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 LDKListen {
+ void block_connected(byte[] block, int height);
+ void block_disconnected(byte[] header, int height);
+ }
+ public static native long LDKListen_new(LDKListen impl);
+ // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
+ public static native void Listen_block_connected(long this_arg, byte[] block, int height);
+ // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
+ public static native void Listen_block_disconnected(long this_arg, byte[] header, int height);
+ public interface LDKConfirm {
+ void transactions_confirmed(byte[] header, long[] txdata, int height);
+ void transaction_unconfirmed(byte[] txid);
+ void best_block_updated(byte[] header, int height);
+ byte[][] get_relevant_txids();
+ }
+ public static native long LDKConfirm_new(LDKConfirm impl);
+ // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
+ public static native void Confirm_transactions_confirmed(long this_arg, byte[] header, long[] txdata, int height);
+ // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
+ public static native void Confirm_transaction_unconfirmed(long this_arg, byte[] txid);
+ // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
+ public static native void Confirm_best_block_updated(long this_arg, byte[] header, int height);
+ // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
+ public static native byte[][] Confirm_get_relevant_txids(long this_arg);
+ public interface LDKFilter {
+ void register_tx(byte[] txid, byte[] script_pubkey);
+ long register_output(long output);
+ }
+ public static native long LDKFilter_new(LDKFilter impl);
+ // void Filter_register_tx LDKFilter *NONNULL_PTR 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);
+ // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
+ public static native long Filter_register_output(long this_arg, long output);
+ public interface LDKPersist {
+ long persist_new_channel(long id, long data);
+ long update_persisted_channel(long id, long update, long data);
+ }
+ public static native long LDKPersist_new(LDKPersist impl);
+ // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR 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 *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
+ public static native long Persist_update_persisted_channel(long this_arg, long id, long update, long data);