Start by preparing an 8-inch square baking pan. Line the bottom and sides with parchment paper, allowing the edges to extend over the sides.
In a medium saucepan over medium heat, combine the semi-sweet chocolate chips and sweetened condensed milk. Stir continuously until the chocolate chips melt completely.
Once melted, take the saucepan off the heat. Sift in the unsweetened cocoa powder, then add the peppermint extract and salt. Stir thoroughly until well blended.
Carefully fold in the crushed peppermint candies and, if desired, the chopped walnuts or pecans.
Pour the fudge mixture into the prepared baking pan. Spread it out into an even layer, smoothing the top.
Transfer the pan to the refrigerator and allow the fudge to chill for at least 2 hours, or until it becomes firm.
After the fudge has set, lift it out of the pan using the parchment paper overhang. Place it on a cutting board and cut it into squares.
Lightly dust the top of the fudge squares with cocoa powder or powdered sugar for decoration.
Notes
For an extra flourish, consider garnishing with additional crushed peppermint candies on top or a delicate drizzle of melted chocolate.