The quantum inverse scattering method with anyonic grading