01 - Preheat the oven to 350°F. Line an 8x8 inch baking pan with parchment paper, leaving an overhang for easy removal.
02 - In a large bowl, whisk together melted butter, granulated sugar, and brown sugar until smooth and glossy.
03 - Whisk in eggs and vanilla extract until fully incorporated.
04 - Sift together flour, cocoa powder, salt, and baking powder. Fold gently into the wet mixture using a spatula until just combined, avoiding overmixing.
05 - Gently fold in chopped walnuts and chocolate chips if using.
06 - Pour batter into the prepared pan and spread evenly.
07 - Bake for 28 to 32 minutes, or until a toothpick inserted into the center comes out with moist crumbs but no wet batter.
08 - Allow to cool completely in the pan on a wire rack before lifting out and cutting into 12 squares.