Class UpdateFulfillHTLC


  • public class UpdateFulfillHTLC
    extends Object
    An [`update_fulfill_htlc`] message to be sent to or received from a peer. [`update_fulfill_htlc`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#removing-an-htlc-update_fulfill_htlc-update_fail_htlc-and-update_fail_malformed_htlc
    • Method Detail

      • get_channel_id

        public byte[] get_channel_id()
        The channel ID
      • set_channel_id

        public void set_channel_id​(byte[] val)
        The channel ID
      • get_htlc_id

        public long get_htlc_id()
        The HTLC ID
      • set_htlc_id

        public void set_htlc_id​(long val)
        The HTLC ID
      • get_payment_preimage

        public byte[] get_payment_preimage()
        The pre-image of the payment hash, allowing HTLC redemption
      • set_payment_preimage

        public void set_payment_preimage​(byte[] val)
        The pre-image of the payment hash, allowing HTLC redemption
      • of

        public static UpdateFulfillHTLC of​(byte[] channel_id_arg,
                                           long htlc_id_arg,
                                           byte[] payment_preimage_arg)
        Constructs a new UpdateFulfillHTLC given each field
      • eq

        public boolean eq​(UpdateFulfillHTLC b)
        Checks if two UpdateFulfillHTLCs contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
      • write

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