Class HTLCDescriptor


  • public class HTLCDescriptor
    extends Object
    A descriptor used to sign for a commitment transaction's HTLC output.
    • Method Detail

      • get_channel_derivation_parameters

        public ChannelDerivationParameters get_channel_derivation_parameters()
        The parameters required to derive the signer for the HTLC input.
      • set_channel_derivation_parameters

        public void set_channel_derivation_parameters​(ChannelDerivationParameters val)
        The parameters required to derive the signer for the HTLC input.
      • get_per_commitment_number

        public long get_per_commitment_number()
        The number of the commitment transaction in which the HTLC output lives.
      • set_per_commitment_number

        public void set_per_commitment_number​(long val)
        The number of the commitment transaction in which the HTLC output lives.
      • get_per_commitment_point

        public byte[] get_per_commitment_point()
        The key tweak corresponding to the number of the commitment transaction in which the HTLC output lives. This tweak is applied to all the basepoints for both parties in the channel to arrive at unique keys per commitment. See for more info.
      • set_per_commitment_point

        public void set_per_commitment_point​(byte[] val)
        The key tweak corresponding to the number of the commitment transaction in which the HTLC output lives. This tweak is applied to all the basepoints for both parties in the channel to arrive at unique keys per commitment. See for more info.
      • get_htlc

        public HTLCOutputInCommitment get_htlc()
        The details of the HTLC as it appears in the commitment transaction.
      • set_htlc

        public void set_htlc​(HTLCOutputInCommitment val)
        The details of the HTLC as it appears in the commitment transaction.
      • get_preimage

        public Option_ThirtyTwoBytesZ get_preimage()
        The preimage, if `Some`, to claim the HTLC output with. If `None`, the timeout path must be taken.
      • set_preimage

        public void set_preimage​(Option_ThirtyTwoBytesZ val)
        The preimage, if `Some`, to claim the HTLC output with. If `None`, the timeout path must be taken.
      • get_counterparty_sig

        public byte[] get_counterparty_sig()
        The counterparty's signature required to spend the HTLC output.
      • set_counterparty_sig

        public void set_counterparty_sig​(byte[] val)
        The counterparty's signature required to spend the HTLC output.
      • eq

        public boolean eq​(HTLCDescriptor b)
        Checks if two HTLCDescriptors 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 HTLCDescriptor object into a byte array which can be read by HTLCDescriptor_read
      • outpoint

        public OutPoint outpoint()
        Returns the outpoint of the HTLC output in the commitment transaction. This is the outpoint being spent by the HTLC input in the HTLC transaction.
      • previous_utxo

        public TxOut previous_utxo()
        Returns the UTXO to be spent by the HTLC input, which can be obtained via [`Self::unsigned_tx_input`].
      • unsigned_tx_input

        public TxIn unsigned_tx_input()
        Returns the unsigned transaction input spending the HTLC output in the commitment transaction.
      • tx_output

        public TxOut tx_output()
        Returns the delayed output created as a result of spending the HTLC output in the commitment transaction.
      • witness_script

        public byte[] witness_script()
        Returns the witness script of the HTLC output in the commitment transaction.
      • tx_input_witness

        public byte[] tx_input_witness​(byte[] signature,
                                       byte[] witness_script)
        Returns the fully signed witness required to spend the HTLC output in the commitment transaction.