If using frozen grated coconut, place the coconut in a bowl and heat in the microwave for 30 secs or so. This gets the natural oil in the coconut to get to room temperature and will not stick together while grinding the coconut.
Grind together the coconut, pearl onions, red chillies and salt in a food processor or Indian style mixie to a smooth paste. (The small jar of the Indian style mixie gives the best results for chutneys)
Transfer to a serving bowl. Pour a little water into the mixie or food processor jar and wash out the chutney in it and pour it to the rest of the chutney. Mix well.
Heat the coconut oil in a small sauce pan. Add the mustard seeds.
Once they splutter, add the curry leaves and pour over the chutney.