Boundary layer method for unsteady transonic flow