Class CommitmentTransaction


  • public class CommitmentTransaction
    extends Object
    This class tracks the per-transaction information needed to build a commitment transaction and will actually build it and sign. It is used for holder transactions that we sign only when needed and for transactions we sign for the counterparty. This class can be used inside a signer implementation to generate a signature given the relevant secret key.
    • Method Detail

      • write

        public byte[] write()
        Serialize the CommitmentTransaction object into a byte array which can be read by CommitmentTransaction_read
      • commitment_number

        public long commitment_number()
        The backwards-counting commitment number
      • to_broadcaster_value_sat

        public long to_broadcaster_value_sat()
        The value to be sent to the broadcaster
      • to_countersignatory_value_sat

        public long to_countersignatory_value_sat()
        The value to be sent to the counterparty
      • feerate_per_kw

        public int feerate_per_kw()
        The feerate paid per 1000-weight-unit in this commitment transaction.
      • trust

        public TrustedCommitmentTransaction trust()
        Trust our pre-built transaction and derived transaction creation public keys. Applies a wrapper which allows access to these fields. This should only be used if you fully trust the builder of this object. It should not be used by an external signer - instead use the verify function.