- 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 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 class LDKMonitorEvent {
- private LDKMonitorEvent() {}
- public final static class HTLCEvent extends LDKMonitorEvent {
- HTLCEvent() { }
- }
- public final static class CommitmentTxBroadcasted extends LDKMonitorEvent {
- CommitmentTxBroadcasted() { }
- }
- static native void init();
- }
- static { LDKMonitorEvent.init(); }
- public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
- public static native long LDKCVec_MonitorEventZ_new(long[] elems);
- public static class LDKSpendableOutputDescriptor {
- private LDKSpendableOutputDescriptor() {}
- public final static class StaticOutput extends LDKSpendableOutputDescriptor {
- public long outpoint;
- public long output;
- StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
- }
- public final static class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
- DelayedPaymentOutput() { }
- }
- public final static class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
- StaticPaymentOutput() { }
- }
- static native void init();
- }
- static { LDKSpendableOutputDescriptor.init(); }
- public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
- public static native long LDKCVec_SpendableOutputDescriptorZ_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 FundingBroadcastSafe extends LDKEvent {
- public long funding_txo;
- public long user_channel_id;
- FundingBroadcastSafe(long funding_txo, long user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
- }
- public final static class PaymentReceived extends LDKEvent {
- public byte[] payment_hash;
- public byte[] payment_secret;
- public long amt;
- PaymentReceived(byte[] payment_hash, byte[] payment_secret, long amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
- }
- 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 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_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 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 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);
- public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
- public static native long LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
- public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
- public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
- public static native byte[] LDKCResult_SignatureNoneZ_get_ok(long arg);
- public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
- public interface LDKSign {
- byte[] get_per_commitment_point(long idx);
- byte[] release_commitment_secret(long idx);
- byte[] channel_keys_id();
- long sign_counterparty_commitment(long commitment_tx);
- long sign_holder_commitment_and_htlcs(long commitment_tx);
- long sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
- long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
- long sign_closing_transaction(byte[] closing_tx);
- long sign_channel_announcement(long msg);
- void ready_channel(long channel_parameters);
- byte[] write();
- }
- public static native long LDKSign_new(LDKSign impl, long pubkeys);
- // LDKPublicKey Sign_get_per_commitment_point LDKSign *NONNULL_PTR this_arg, uint64_t idx
- public static native byte[] Sign_get_per_commitment_point(long this_arg, long idx);
- // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign *NONNULL_PTR this_arg, uint64_t idx
- public static native byte[] Sign_release_commitment_secret(long this_arg, long idx);
- // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign *NONNULL_PTR this_arg
- public static native byte[] Sign_channel_keys_id(long this_arg);
- // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
- public static native long Sign_sign_counterparty_commitment(long this_arg, long commitment_tx);
- // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
- public static native long Sign_sign_holder_commitment_and_htlcs(long this_arg, long commitment_tx);
- // LDKCResult_SignatureNoneZ Sign_sign_justice_transaction LDKSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
- public static native long Sign_sign_justice_transaction(long this_arg, byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
- // LDKCResult_SignatureNoneZ Sign_sign_counterparty_htlc_transaction LDKSign *NONNULL_PTR this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
- public static native long Sign_sign_counterparty_htlc_transaction(long this_arg, byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
- // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
- public static native long Sign_sign_closing_transaction(long this_arg, byte[] closing_tx);
- // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
- public static native long Sign_sign_channel_announcement(long this_arg, long msg);
- // void Sign_ready_channel LDKSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
- public static native void Sign_ready_channel(long this_arg, long channel_parameters);
- // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
- public static native byte[] Sign_write(long this_arg);
- // LDKChannelPublicKeys Sign_get_pubkeys LDKSign *NONNULL_PTR this_arg
- public static native long Sign_get_pubkeys(long this_arg);
- public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
- public static native byte[] LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
- public static native long LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
- 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_TxOutAccessErrorZ_result_ok(long arg);
- public static native long LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
- public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
- public static class LDKAPIError {
- private LDKAPIError() {}
- public final static class APIMisuseError extends LDKAPIError {
- public byte[] err;
- APIMisuseError(byte[] err) { this.err = err; }
- }
- public final static class FeeRateTooHigh extends LDKAPIError {
- public byte[] err;
- public int feerate;
- FeeRateTooHigh(byte[] err, int feerate) { this.err = err; this.feerate = feerate; }
- }
- public final static class RouteError extends LDKAPIError {
- public String err;
- RouteError(String err) { this.err = err; }
- }
- public final static class ChannelUnavailable extends LDKAPIError {
- public byte[] err;
- ChannelUnavailable(byte[] err) { this.err = err; }
- }
- public final static class MonitorUpdateFailed extends LDKAPIError {
- MonitorUpdateFailed() { }
- }
- static native void init();
- }
- static { LDKAPIError.init(); }
- public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
- 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_CResult_NoneAPIErrorZZ_new(long[] elems);
- public static native long LDKCVec_APIErrorZ_new(long[] elems);
- public static native long LDKCVec_ChannelDetailsZ_new(long[] elems);
- public static class LDKPaymentSendFailure {
- private LDKPaymentSendFailure() {}
- public final static class ParameterError extends LDKPaymentSendFailure {
- ParameterError() { }
- }
- public final static class PathParameterError extends LDKPaymentSendFailure {
- PathParameterError() { }
- }
- public final static class AllFailedRetrySafe extends LDKPaymentSendFailure {
- AllFailedRetrySafe() { }
- }
- public final static class PartialFailure extends LDKPaymentSendFailure {
- PartialFailure() { }
- }
- static native void init();
- }
- static { LDKPaymentSendFailure.init(); }
- public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
- public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
- public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
- public static native long LDKCResult_NonePaymentSendFailureZ_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 static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
- public static native long LDKCResult_SignDecodeErrorZ_get_ok(long arg);
- public static native long LDKCResult_SignDecodeErrorZ_get_err(long arg);
- 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);
- }
- 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);
- public interface LDKFeeEstimator {
- int get_est_sat_per_1000_weight(LDKConfirmationTarget 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, LDKConfirmationTarget 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_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
- public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
- public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
- public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
- public static native byte[][] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
- public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
- public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
- public static native long LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
- public static native long LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
- public static native long LDKCVec_TxOutZ_new(long[] elems);
- public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
- public static native byte[] LDKCResult_TransactionNoneZ_get_ok(long arg);
- public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
- public static native long LDKCVec_RouteHopZ_new(long[] elems);
- 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_new(long[] elems);
- public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
- public static native long LDKCResult_RouteLightningErrorZ_get_ok(long arg);
- public static native long LDKCResult_RouteLightningErrorZ_get_err(long arg);