Class HTLCOutputInCommitment


  • public class HTLCOutputInCommitment
    extends Object
    Information about an HTLC as it appears in a commitment transaction
    • Method Detail

      • get_offered

        public boolean get_offered()
        Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction). Note that this is not the same as whether it is ountbound *from us*. To determine that you need to compare this value to whether the commitment transaction in question is that of the counterparty or our own.
      • set_offered

        public void set_offered​(boolean val)
        Whether the HTLC was \"offered\" (ie outbound in relation to this commitment transaction). Note that this is not the same as whether it is ountbound *from us*. To determine that you need to compare this value to whether the commitment transaction in question is that of the counterparty or our own.
      • get_amount_msat

        public long get_amount_msat()
        The value, in msat, of the HTLC. The value as it appears in the commitment transaction is this divided by 1000.
      • set_amount_msat

        public void set_amount_msat​(long val)
        The value, in msat, of the HTLC. The value as it appears in the commitment transaction is this divided by 1000.
      • get_cltv_expiry

        public int get_cltv_expiry()
        The CLTV lock-time at which this HTLC expires.
      • set_cltv_expiry

        public void set_cltv_expiry​(int val)
        The CLTV lock-time at which this HTLC expires.
      • get_payment_hash

        public byte[] get_payment_hash()
        The hash of the preimage which unlocks this HTLC.
      • set_payment_hash

        public void set_payment_hash​(byte[] val)
        The hash of the preimage which unlocks this HTLC.
      • get_transaction_output_index

        public Option_u32Z get_transaction_output_index()
        The position within the commitment transactions' outputs. This may be None if the value is below the dust limit (in which case no output appears in the commitment transaction and the value is spent to additional transaction fees).
      • set_transaction_output_index

        public void set_transaction_output_index​(Option_u32Z val)
        The position within the commitment transactions' outputs. This may be None if the value is below the dust limit (in which case no output appears in the commitment transaction and the value is spent to additional transaction fees).
      • of

        public static HTLCOutputInCommitment of​(boolean offered_arg,
                                                long amount_msat_arg,
                                                int cltv_expiry_arg,
                                                byte[] payment_hash_arg,
                                                Option_u32Z transaction_output_index_arg)
        Constructs a new HTLCOutputInCommitment given each field
      • write

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