+ public static class LDKPaymentPurpose {
+ private LDKPaymentPurpose() {}
+ public final static class InvoicePayment extends LDKPaymentPurpose {
+ public byte[] payment_preimage;
+ public byte[] payment_secret;
+ InvoicePayment(byte[] payment_preimage, byte[] payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; }
+ }
+ public final static class SpontaneousPayment extends LDKPaymentPurpose {
+ public byte[] spontaneous_payment;
+ SpontaneousPayment(byte[] spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
+ }
+ static native void init();
+ }
+ static { LDKPaymentPurpose.init(); }
+ public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
+ 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 long amt;
+ public long purpose;
+ PaymentReceived(byte[] payment_hash, long amt, long purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
+ }
+ public final static class PaymentSent extends LDKEvent {
+ public byte[] payment_id;
+ public byte[] payment_preimage;
+ public byte[] payment_hash;
+ public long fee_paid_msat;
+ PaymentSent(byte[] payment_id, byte[] payment_preimage, byte[] payment_hash, long fee_paid_msat) { this.payment_id = payment_id; this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; this.fee_paid_msat = fee_paid_msat; }
+ }
+ public final static class PaymentPathFailed extends LDKEvent {
+ public byte[] payment_id;
+ public byte[] payment_hash;
+ public boolean rejected_by_dest;
+ public long network_update;
+ public boolean all_paths_failed;
+ public long[] path;
+ public long short_channel_id;
+ public long retry;
+ PaymentPathFailed(byte[] payment_id, byte[] payment_hash, boolean rejected_by_dest, long network_update, boolean all_paths_failed, long[] path, long short_channel_id, long retry) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; this.short_channel_id = short_channel_id; this.retry = retry; }
+ }
+ public final static class PaymentFailed extends LDKEvent {
+ public byte[] payment_id;
+ public byte[] payment_hash;
+ PaymentFailed(byte[] payment_id, byte[] payment_hash) { this.payment_id = payment_id; this.payment_hash = payment_hash; }
+ }
+ 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; }
+ }
+ public final static class PaymentForwarded extends LDKEvent {
+ public long fee_earned_msat;
+ public boolean claim_from_onchain_tx;
+ PaymentForwarded(long fee_earned_msat, boolean claim_from_onchain_tx) { this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; }
+ }
+ public final static class ChannelClosed extends LDKEvent {
+ public byte[] channel_id;
+ public long user_channel_id;
+ public long reason;
+ ChannelClosed(byte[] channel_id, long user_channel_id, long reason) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; }
+ }
+ public final static class DiscardFunding extends LDKEvent {
+ public byte[] channel_id;
+ public byte[] transaction;
+ DiscardFunding(byte[] channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; }
+ }
+ public final static class PaymentPathSuccessful extends LDKEvent {
+ public byte[] payment_id;
+ public byte[] payment_hash;
+ public long[] path;
+ PaymentPathSuccessful(byte[] payment_id, byte[] payment_hash, long[] path) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.path = path; }
+ }
+ static native void init();
+ }
+ static { LDKEvent.init(); }
+ public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
+ public static class LDKCOption_EventZ {
+ private LDKCOption_EventZ() {}
+ public final static class Some extends LDKCOption_EventZ {
+ public long some;
+ Some(long some) { this.some = some; }
+ }
+ public final static class None extends LDKCOption_EventZ {
+ None() { }
+ }
+ static native void init();
+ }
+ static { LDKCOption_EventZ.init(); }
+ public static native LDKCOption_EventZ LDKCOption_EventZ_ref_from_ptr(long ptr);
+ public static native long LDKCResult_COption_EventZDecodeErrorZ_get_ok(long arg);
+ public static native long LDKCResult_COption_EventZDecodeErrorZ_get_err(long arg);