Preheat the oven to 200°C/400°F/gas mark 6 and line a large baking tray (or two smaller trays) with greaseproof paper.
Into a food processor add the onion, and pulse a few times, then add 100g of chickpeas, the mint and spinach, and pulse so it comes together. Put the mixture into a large bowl and mix in the salt, pepper, spices, dill seeds, if using, and the remaining unpulsed chickpeas.
Lightly flour the work surface and the pastry, and roll it out to 37 x 28cm. Using an 8cm cutter, stamp out 15 rounds then put a teaspoon of the filling in the middle of each one and bring up the edges to create a triangle shape. Press to seal, creating a samosa-style triangle. Repeat with the remaining pastry.
Place on the baking tray seam-side down. Brush each one with the egg wash and scatter over the black sesame seeds or a sprinkle of flaky sea salt and a few grindings of black pepper, if you like. Bake for 15 minutes, then when the pastry has fully risen, lower the oven temperature to its lowest setting and bake for a further 10–15 minutes, until the layers are dry and crispy.