Peel the aubergines in alternating stripes, then cut them into 2cm-cubes and transfer to a large bowl. Sprinkle with 1 tablespoon (14g) of the salt and toss well with your hands to distribute the salt evenly. Tip them into a colander and place it on top of the used bowl to catch any juices. Set aside. To roast the aubergines in the oven, see Notes. If you're cooking rice tahdig-style, you can start it now.
Heat 2 tablespoons of the olive oil in a large casserole over medium-low heat. Peel and finely chop the onion and sauté it in the oil until it turns translucent (8-10 minutes). Meanwhile, add the walnuts to a food processor (I like doing it in two batches in a small food processor) and blend until they turn into a coarse paste. They're ground fine enough when some of them start breaking down into a walnut butter along the sides of the food processor.
