Class Event

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Event.ChannelClosed
      Used to indicate that a channel with the given `channel_id` is in the process of closure.
      static class  Event.DiscardFunding
      Used to indicate to the user that they can abandon the funding transaction and recycle the inputs for another purpose.
      static class  Event.FundingGenerationReady
      Used to indicate that the client should generate a funding transaction with the given parameters and then call [`ChannelManager::funding_transaction_generated`].
      static class  Event.PaymentFailed
      Indicates an outbound payment failed.
      static class  Event.PaymentForwarded
      This event is generated when a payment has been successfully forwarded through us and a forwarding fee earned.
      static class  Event.PaymentPathFailed
      Indicates an outbound HTLC we sent failed.
      static class  Event.PaymentPathSuccessful
      Indicates that a path for an outbound payment was successful.
      static class  Event.PaymentReceived
      Indicates we've received money! Just gotta dig out that payment preimage and feed it to [`ChannelManager::claim_funds`] to get it....
      static class  Event.PaymentSent
      Indicates an outbound payment we made succeeded (i.e.
      static class  Event.PendingHTLCsForwardable
      Used to indicate that [`ChannelManager::process_pending_htlc_forwards`] should be called at a time in the future.
      static class  Event.SpendableOutputs
      Used to indicate that an output which you should know how to spend was confirmed on chain and is now spendable.
    • Method Detail

      • clone

        public Event clone()
        Creates a copy of the Event
        Overrides:
        clone in class Object
      • 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_id,
                                         byte[] payment_preimage,
                                         byte[] payment_hash,
                                         Option_u64Z fee_paid_msat)
        Utility method to constructs a new PaymentSent-variant Event
      • payment_path_failed

        public static Event payment_path_failed​(byte[] payment_id,
                                                byte[] payment_hash,
                                                boolean rejected_by_dest,
                                                Option_NetworkUpdateZ network_update,
                                                boolean all_paths_failed,
                                                RouteHop[] path,
                                                Option_u64Z short_channel_id,
                                                RouteParameters retry)
        Utility method to constructs a new PaymentPathFailed-variant Event
      • payment_failed

        public static Event payment_failed​(byte[] payment_id,
                                           byte[] payment_hash)
        Utility method to constructs a new PaymentFailed-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,
                                           long user_channel_id,
                                           ClosureReason reason)
        Utility method to constructs a new ChannelClosed-variant Event
      • discard_funding

        public static Event discard_funding​(byte[] channel_id,
                                            byte[] transaction)
        Utility method to constructs a new DiscardFunding-variant Event
      • payment_path_successful

        public static Event payment_path_successful​(byte[] payment_id,
                                                    byte[] payment_hash,
                                                    RouteHop[] path)
        Utility method to constructs a new PaymentPathSuccessful-variant Event
      • write

        public byte[] write()
        Serialize the Event object into a byte array which can be read by Event_read