Put the cumin seeds, chilies, and curry leaves in a spice grinder, season with salt, and process until coarsely ground. Alternatively, use a mortar and pestle.
Soak the lentils in a bowl of water for about 10 minutes.
Drain and put into a clean bowl, then add the flours, coconut, and melted butter. Mix well, adding enough water to make a dough.
Divide the dough into 12-15 equal portions and roll into balls, then shape the balls into triangles or rounds about 6 cm / 2 1/2 inches in diameter and about 5 mm / 1/4 inch thick.
Heat the oil for deep-frying in a kadhai or deep, heavy-based pan to 180'C / 350’F, or until a cube of bread browns in 30 seconds.
Working in batches, deep-fry the triangles for 3-4 minutes, or until golden brown on all sides. Remove with a slotted spoon and drain on kitchen paper (paper towels). Allow to cool.
These can be stored in an airtight container for 10 days.