A strategic shift has led to multibillion-dollar contracts for Cipher Mining.