Preheat the oven to 190 degrees C. Butter a 23cm square tin, line with waxed paper and then butter the paper.
Boil the chestnuts in a saucepan of water until just tender. Remove from the heat and peel off the skins. Puree the chestnuts in a food processor. Add the grated chocolate, butter, sugar and vanilla and mix.
Pour the mixture into the tin and baked until golden brown, about 15 minutes. Turn out, remove the wax paper and slice into bars.