In a medium bowl, sift flour, baking powder and salt, set aside. In a small heavy saucepan, melt butter over low heat, add cocoa powder, blend well with a fork or small wisk until smooth. Remove pan from heat, stir in sugar until combined. Transfer to a large mixing bowl, add vanilla extract, then eggs one at a time, stirring well after each addition. Add flour mixture and nuts if desired, mix well. Cover the dough with plastic wrap, refrigerate until chilled (at least 2 hours). Preheat oven to 400-degrees. Roll dough into 3/4-inch balls and roll in powdered sugar. Place the sugar-coated balls onto a greased cookie sheet, 2 inches apart. Bake for 8 minutes at 400-degrees, let cool a minute then remove from pan. Store in an airtight container to maintain the shoft and chewy texture of these cookies. If you'd like a crisper cookie, cook a minute longer.
My notes: When I make this, it doesn't make 40 cookies. I always double the recipe. You can easily make this right in the saucepan or bowl you melted the butter in. You also need way more than 1/2 cup powdered sugar. AJT