Take the chopped onion, ginger, green chilies in chutney jar or grinder jar. add 3 tbsp curd/yogurt. Grind everything to a smooth paste without adding any water. keep this ground paste aside.
Heat 2 tbsp ghee in a pan. Add the cashews and saute them till they become golden and keep them aside on a plate.
In the same pan, add the whole spices - 1 tejpatta, 2 cloves, ½ inch cinnamon, 2 green cardamoms, 2 strands of javitri, ½ tsp kala jeera. Saute till the spices become aromatic.
Then add the ground onion paste and saute it till it starts turning light brown. The paste will start clumping together and reduce a lot.
stir well so that the spice powder or masala mixes evenly with the rest of the mixture. keep the flame low as you don't want the spices to get burnt.
add ¾ cup grated khoya or crumbled khoya.