Start by dry roasting peanuts till it changes colour, add in sesame seeds and coconut and roast for few more mins. Take this in a blender and make it into a fine puree.
Now in the same oil, add in all whole spices, curry leaves and saute for a min.
Add in the peeled shallots and cook for couple of mins.
Add in all spice powders and mix well.
Add in the ground masala, water, tamarind, salt and jaggery. Bring this to a boil, cover and simmer for 20 mins, till oil separates.