Soak the tamarind in 1 cup water, squeeze out the pulp. Strain and pour into a deep pan. Repeat with ½ cup water two more times.
Add the turmeric powder, salt and the pearl onions and bring to a boil. Cook over medium heat till the pearl onions are cooked and soft.
Meanwhile, roast the coconut along with the red chillies, pearl onions and coriander seeds over low-medium heat till the coconut becomes light brown in color throughout. Keep stirring, as you don't want part of the coconut burnt and part of it not toasted at all.
Let it cool and grind to a very fine paste in a food processor or an Indian style mixie, with a little water to help grind better.
Pour this out to the pan on the stove with the tamarind and pearl onions.
Mix well and let it come to a boil.
Heat the coconut oil for tempering, add the mustard seeds and let it splutter. Add curry leaves and pour it over the curry.
Serve hot with rice.