Package org.ldk.structs
Class Event
- java.lang.Object
-
- org.ldk.structs.Event
-
- Direct Known Subclasses:
Event.ChannelClosed
,Event.FundingGenerationReady
,Event.PaymentForwarded
,Event.PaymentPathFailed
,Event.PaymentReceived
,Event.PaymentSent
,Event.PendingHTLCsForwardable
,Event.SpendableOutputs
public class Event extends Object
An Event which you should probably take some action in response to. Note that while Writeable and Readable are implemented for Event, you probably shouldn't use them directly as they don't round-trip exactly (for example FundingGenerationReady is never written as it makes no sense to respond to it after reconnecting to peers).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Event.ChannelClosed
static class
Event.FundingGenerationReady
static class
Event.PaymentForwarded
static class
Event.PaymentPathFailed
static class
Event.PaymentReceived
static class
Event.PaymentSent
static class
Event.PendingHTLCsForwardable
static class
Event.SpendableOutputs
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Event
channel_closed(byte[] channel_id, ClosureReason reason)
Utility method to constructs a new ChannelClosed-variant EventEvent
clone()
Creates a copy of the Eventprotected void
finalize()
static Event
funding_generation_ready(byte[] temporary_channel_id, long channel_value_satoshis, byte[] output_script, long user_channel_id)
Utility method to constructs a new FundingGenerationReady-variant Eventstatic Event
payment_forwarded(Option_u64Z fee_earned_msat, boolean claim_from_onchain_tx)
Utility method to constructs a new PaymentForwarded-variant Eventstatic Event
payment_path_failed(byte[] payment_hash, boolean rejected_by_dest, Option_NetworkUpdateZ network_update, boolean all_paths_failed, RouteHop[] path)
Utility method to constructs a new PaymentPathFailed-variant Eventstatic Event
payment_received(byte[] payment_hash, long amt, PaymentPurpose purpose)
Utility method to constructs a new PaymentReceived-variant Eventstatic Event
payment_sent(byte[] payment_preimage)
Utility method to constructs a new PaymentSent-variant Eventstatic Event
pending_htlcs_forwardable(long time_forwardable)
Utility method to constructs a new PendingHTLCsForwardable-variant Eventstatic Event
spendable_outputs(SpendableOutputDescriptor[] outputs)
Utility method to constructs a new SpendableOutputs-variant Eventbyte[]
write()
Serialize the Event object into a byte array which can be read by Event_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
funding_generation_ready
public static Event funding_generation_ready(byte[] temporary_channel_id, long channel_value_satoshis, byte[] output_script, long user_channel_id)
Utility method to constructs a new FundingGenerationReady-variant Event
-
payment_received
public static Event payment_received(byte[] payment_hash, long amt, PaymentPurpose purpose)
Utility method to constructs a new PaymentReceived-variant Event
-
payment_sent
public static Event payment_sent(byte[] payment_preimage)
Utility method to constructs a new PaymentSent-variant Event
-
payment_path_failed
public static Event payment_path_failed(byte[] payment_hash, boolean rejected_by_dest, Option_NetworkUpdateZ network_update, boolean all_paths_failed, RouteHop[] path)
Utility method to constructs a new PaymentPathFailed-variant Event
-
pending_htlcs_forwardable
public static Event pending_htlcs_forwardable(long time_forwardable)
Utility method to constructs a new PendingHTLCsForwardable-variant Event
-
spendable_outputs
public static Event spendable_outputs(SpendableOutputDescriptor[] outputs)
Utility method to constructs a new SpendableOutputs-variant Event
-
payment_forwarded
public static Event payment_forwarded(Option_u64Z fee_earned_msat, boolean claim_from_onchain_tx)
Utility method to constructs a new PaymentForwarded-variant Event
-
channel_closed
public static Event channel_closed(byte[] channel_id, ClosureReason reason)
Utility method to constructs a new ChannelClosed-variant Event
-
write
public byte[] write()
Serialize the Event object into a byte array which can be read by Event_read
-
-