code: def coinbase_tx(cls, public_key_sec, coin_value, coinbase_bytes=b'', version=1, lock_time=0):
          
          tx_in = cls.TxIn.coinbase_tx_in(script=coinbase_bytes)
          COINBASE_SCRIPT_OUT = "%s OP_CHECKSIG"
          script_text = COINBASE_SCRIPT_OUT % b2h(public_key_sec)
          script_bin = BitcoinScriptTools.compile(script_text)
          tx_out = cls.TxOut(coin_value, script_bin)
          return cls(version, [tx_in], [tx_out], lock_time)
docs: Create the special "first in block" transaction that includes the mining fees.