Finely dice your onion and add it to a pan with some ghee on low heat for 6-8 minutes. You want them caramelised and translucent. Season with a little salt.
Make a gap amongst the onion and make sure there's enough fat in the pan. Into that gap, add the mustard seeds first, then, 30 seconds or so later, the onion seeds and cumin seeds.
Allow a minute or so to cook through and then stir everything together. Add the turmeric and coriander.
Allow another minute to cook, then make another gap in the contents of the pan and add the ginger and garlic paste. Stir everything together.
After a final minute of cooking, add the lentils and (optionally) chickpeas. Stir everything together and submerge in hot water.
Once the sauce is simmering, allow it to cook for at least 30 minutes, but ideally several hours, allowing the lentils to break down and thicken the sauce, giving a creamy consistency. Keep an eye on the mix and top up the water if necessary.
Season with salt to taste, then add a good wedge of butter and stir in. You can optionally add a tablespoon or so of yogurt at this stage as well.