Class Event

    • 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,
                                                     byte[] counterparty_node_id,
                                                     long channel_value_satoshis,
                                                     byte[] output_script,
                                                     UInt128 user_channel_id)
        Utility method to constructs a new FundingGenerationReady-variant Event
      • payment_claimed

        public static Event payment_claimed​(byte[] receiver_node_id,
                                            byte[] payment_hash,
                                            long amount_msat,
                                            PaymentPurpose purpose,
                                            ClaimedHTLC[] htlcs,
                                            Option_u64Z sender_intended_total_msat)
        Utility method to constructs a new PaymentClaimed-variant Event
      • payment_sent

        public static Event payment_sent​(Option_ThirtyTwoBytesZ payment_id,
                                         byte[] payment_preimage,
                                         byte[] payment_hash,
                                         Option_u64Z fee_paid_msat)
        Utility method to constructs a new PaymentSent-variant Event
      • payment_failed

        public static Event payment_failed​(byte[] payment_id,
                                           byte[] payment_hash,
                                           Option_PaymentFailureReasonZ reason)
        Utility method to constructs a new PaymentFailed-variant Event
      • payment_path_successful

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

        public static Event payment_path_failed​(Option_ThirtyTwoBytesZ payment_id,
                                                byte[] payment_hash,
                                                boolean payment_failed_permanently,
                                                PathFailure failure,
                                                Path path,
                                                Option_u64Z short_channel_id)
        Utility method to constructs a new PaymentPathFailed-variant Event
      • probe_successful

        public static Event probe_successful​(byte[] payment_id,
                                             byte[] payment_hash,
                                             Path path)
        Utility method to constructs a new ProbeSuccessful-variant Event
      • probe_failed

        public static Event probe_failed​(byte[] payment_id,
                                         byte[] payment_hash,
                                         Path path,
                                         Option_u64Z short_channel_id)
        Utility method to constructs a new ProbeFailed-variant Event
      • pending_htlcs_forwardable

        public static Event pending_htlcs_forwardable​(long time_forwardable)
        Utility method to constructs a new PendingHTLCsForwardable-variant Event
      • htlcintercepted

        public static Event htlcintercepted​(byte[] intercept_id,
                                            long requested_next_hop_scid,
                                            byte[] payment_hash,
                                            long inbound_amount_msat,
                                            long expected_outbound_amount_msat)
        Utility method to constructs a new HTLCIntercepted-variant Event
      • channel_pending

        public static Event channel_pending​(byte[] channel_id,
                                            UInt128 user_channel_id,
                                            Option_ThirtyTwoBytesZ former_temporary_channel_id,
                                            byte[] counterparty_node_id,
                                            OutPoint funding_txo)
        Utility method to constructs a new ChannelPending-variant Event
      • channel_ready

        public static Event channel_ready​(byte[] channel_id,
                                          UInt128 user_channel_id,
                                          byte[] counterparty_node_id,
                                          ChannelTypeFeatures channel_type)
        Utility method to constructs a new ChannelReady-variant Event
      • channel_closed

        public static Event channel_closed​(byte[] channel_id,
                                           UInt128 user_channel_id,
                                           ClosureReason reason,
                                           byte[] counterparty_node_id,
                                           Option_u64Z channel_capacity_sats)
        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
      • open_channel_request

        public static Event open_channel_request​(byte[] temporary_channel_id,
                                                 byte[] counterparty_node_id,
                                                 long funding_satoshis,
                                                 long push_msat,
                                                 ChannelTypeFeatures channel_type)
        Utility method to constructs a new OpenChannelRequest-variant Event
      • htlchandling_failed

        public static Event htlchandling_failed​(byte[] prev_channel_id,
                                                HTLCDestination failed_next_destination)
        Utility method to constructs a new HTLCHandlingFailed-variant Event
      • bump_transaction

        public static Event bump_transaction​(BumpTransactionEvent a)
        Utility method to constructs a new BumpTransaction-variant Event
      • eq

        public boolean eq​(Event b)
        Checks if two Events contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
      • write

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