The sprocket is a D shape, if you dont want the sprocket tighten it into a vice or a set of pliers and use a spanner to unscrew the nyloc nut. Otherwise clamp around the sprocket with material to stop it spinning and hold onto the material and use the spanner, or clamp the shaft in a set of maul? grips and undo. it will come undone

As above post thats linked