Prep. Preheat the oven to 350 degrees F. Line 2 baking sheets with a piece of parchment paper or a silicone mat. Set aside.
Mix sugars and butter. In a large mixing bowl add the melted butter and both sugars, using a wooden spoon stir until they are well combined.
Add remaining wet ingredients. Add the egg, vanilla extract, and sourdough discard to the mixing bowl. Using a wooden spoon, stir to fully combine.
Add baking powder, soda, and salt. Once all of the wet ingredients have been mixed, add the baking powder, baking soda, and salt. Stir to combine.
Add flour. Slowly add in the flour by adding a few heaping spoonfuls to the bowl at a time. Stir to combine and repeat this process until all of the flour has been added and incorporated.
Fold in chocolate chips. Add the chocolate chips and walnuts (if using) to the bowl and fold them in until they’re mixed in.
Shape. Using a cookie scoop, scoop out the cookie dough into 1 ½”-2” balls. Place them on the prepared baking sheet.
Bake. Bake the cookies at 350 degrees F for 12-15 minutes or until the edges of the cookies start to become brown.
Cool. Remove them from the oven and place them on a cooling rack. Allow them to cool for 5-10 minutes before serving. This recipe makes 24 cookies