Place all the ingredients, except the onion, salt and oil, into a glass bowl, mix well, cover with water and leave to soak overnight.
Once the ingredients are soaked, heat the oil in a pan on medium-low heat. Add the onion and salt and fry for 8-10 minutes, or until the onion softens. Set aside and allow to cool enough to handle.
Drain the soaking liquid from the spices and set aside.
Place the soaked ingredients and the fried onions into a blender and blend to a thick paste, using a little of the soaking liquid if required.
Transfer to a sealable jar and refrigerate for further use.
notes
This makes enough masala for about two dishes. This recipe can be scaled to make more. Just increase all the quantities by the same factor. It would be hard to scale it down, though.
It will keep well in the refrigerator for about three weeks if kept in an airtight jar.
You can also successfully freeze this. Freeze it in portions of around 200g, which is the usual recipe size.