Class BuiltCommitmentTransaction


  • public class BuiltCommitmentTransaction
    extends Object
    A pre-built Bitcoin commitment transaction and its txid.
    • Method Detail

      • get_transaction

        public byte[] get_transaction()
        The commitment transaction
      • set_transaction

        public void set_transaction​(byte[] val)
        The commitment transaction
      • get_txid

        public byte[] get_txid()
        The txid for the commitment transaction. This is provided as a performance optimization, instead of calling transaction.txid() multiple times.
      • set_txid

        public void set_txid​(byte[] val)
        The txid for the commitment transaction. This is provided as a performance optimization, instead of calling transaction.txid() multiple times.
      • of

        public static BuiltCommitmentTransaction of​(byte[] transaction_arg,
                                                    byte[] txid_arg)
        Constructs a new BuiltCommitmentTransaction given each field
      • write

        public byte[] write()
        Serialize the BuiltCommitmentTransaction object into a byte array which can be read by BuiltCommitmentTransaction_read
      • get_sighash_all

        public byte[] get_sighash_all​(byte[] funding_redeemscript,
                                      long channel_value_satoshis)
        Get the SIGHASH_ALL sighash value of the transaction. This can be used to verify a signature.
      • sign_counterparty_commitment

        public byte[] sign_counterparty_commitment​(byte[] funding_key,
                                                   byte[] funding_redeemscript,
                                                   long channel_value_satoshis)
        Signs the counterparty's commitment transaction.
      • sign_holder_commitment

        public byte[] sign_holder_commitment​(byte[] funding_key,
                                             byte[] funding_redeemscript,
                                             long channel_value_satoshis,
                                             EntropySource entropy_source)
        Signs the holder commitment transaction because we are about to broadcast it.