In a medium bowl, gently whisk together your flour, cocoa powder, espresso powder (if using), baking powder, cornstarch, and salt. Set this aside.
In a small saucepan over low to medium heat, melt the unsalted butter with your chosen chocolate chips. Stir just until everything is smooth and melted, then take it off the heat. Stir in the vanilla and peppermint extracts and let it cool down a bit.
Using a stand mixer, beat the room-temperature eggs with both the brown sugar and white sugar for about 3-4 minutes. You'll know it's ready when the mixture looks thick and pale.
With a rubber spatula, carefully fold the cooled chocolate-butter mixture into the whipped egg and sugar mix until they are nicely combined.
Gradually add the dry flour mixture to the wet ingredients. Fold them together gently until just combined, being careful not to overmix. The dough will have a lovely shiny look.
Pop your cookie dough into the fridge to chill for at least 10 minutes. This helps the dough firm up. While it's chilling, preheat your oven to 350°F (175°C).
Scoop out even portions of dough (using a 2 Tbsp scoop works great) and place them onto a baking sheet lined with parchment paper. Bake for 10-12 minutes. Don't worry if they look a little soft; they'll firm up perfectly as they cool.
Let the baked cookies cool on the baking sheet for 5 minutes before moving them to a wire rack to cool completely.
Once the cookies are fully cool, melt the white chocolate chips with the coconut oil in a microwave-safe bowl (heat in 30-second bursts, stirring each time, until smooth). Dip one side of each cookie into the melted white chocolate, then sprinkle generously with crushed candy canes and a touch of flaky sea salt if you like.