Place the apricots in a medium bowl. Add boiling water to cover and set aside to soak for 1 hour.
Whisk together the flour and baking powder in a medium bowl. Whisk together 2 of the eggs, 1 cup of the sugar, and the lemon zest and orange zest in a large bowl, whisking until the sugar is dissolved and the mixture is creamy and foamy. Sift the flour mixture into the egg mixture, stirring together with a wooden spoon until combined and a dough forms. Wrap the dough in plastic wrap and refrigerate for 1 hour.
Drain the apricots in a colander, stirring to eliminate the surface water, and then blot dry on paper towels. Transfer them to a chopping board or bowl and finely chop. Mix the apricots, walnuts if using, and the remaining 1/2 cup sugar in a medium bowl, stirring until well combined.
Preheat the oven to 350°F. Spray two baking sheets with nonstick cooking spray. Roll out the dough on a lightly floured board to 1/4-inch thickness. Cut out 3-inch circles (use a biscuit cutter). Place a generous spoonful of filling in the center of each circle, then fold up three sides so the cookie looks like a 3-cornered hat, pinching the dough edges together but leaving the center open as shown in the photo. Gather the dough scraps and reroll; cut and fill in the same way. Arrange the cookies on the prepared baking sheets.
Mix the remaining 2 eggs with 6 Tbs. cool water, whisking until combined. Lightly brush the cookies with the egg wash, which will give them a nice color. Bake until the pastry is golden brown—20 to 25 minutes. Transfer the cookies from the baking sheets to wire racks to cool.