Line a 9x9-inch baking pan with parchment paper.
Add the coconut milk to a large sauce pan and bring to a boil, whisking to prevent burning.
Reduce the heat to a simmer and add the sugar. Whisk until the sugar dissolves.
All the coconut milk to simmer for 30-45 minutes, or until it has reduced by half. Whisk occasionally to prevent burning. It will thicken and become a little yellowish in color.
Add the chocolate chips to the pan and stir until their fully melted and the mixture is smooth.
Remove from the heat and stir in the vanilla extract and walnuts, if using.
Pour the fudge into the prepared baking pan. Refrigerate for 2 hours, or until the fudge is firm.
Slice and serve! Store in the refrigerator until serving.