code: def public_key_sec(self):
          
          if self.is_coinbase():
              return None
          opcodes = ScriptTools.opcode_list(self.script)
          if len(opcodes) == 2 and opcodes[0].startswith("[30"):
              # the second opcode is probably the public key as sec
              sec = h2b(opcodes[1][1:-1])
              return sec
          return None
docs: Return the public key as sec, or None in case of failure.