Class UpdateAddHTLC


  • public class UpdateAddHTLC
    extends Object
    An [`update_add_htlc`] message to be sent to or received from a peer. [`update_add_htlc`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#adding-an-htlc-update_add_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_amount_msat

        public long get_amount_msat()
        The HTLC value in milli-satoshi
      • set_amount_msat

        public void set_amount_msat​(long val)
        The HTLC value in milli-satoshi
      • get_payment_hash

        public byte[] get_payment_hash()
        The payment hash, the pre-image of which controls HTLC redemption
      • set_payment_hash

        public void set_payment_hash​(byte[] val)
        The payment hash, the pre-image of which controls HTLC redemption
      • get_cltv_expiry

        public int get_cltv_expiry()
        The expiry height of the HTLC
      • set_cltv_expiry

        public void set_cltv_expiry​(int val)
        The expiry height of the HTLC
      • eq

        public boolean eq​(UpdateAddHTLC b)
        Checks if two UpdateAddHTLCs 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 UpdateAddHTLC object into a byte array which can be read by UpdateAddHTLC_read