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

        public byte[] sign​(byte[] funding_key,
                           byte[] funding_redeemscript,
                           long channel_value_satoshis)
        Sign a transaction, either because we are counter-signing the counterparty's transaction or because we are about to broadcast a holder transaction.