Preheat oven to 160 degree C. Line a baking tray with baking paper and set aside.
Cream together the butter, caster sugar, brown sugar and vanilla extract until light and fluffy. Beat in the egg.
Sift the flour with the baking powder, xantham gum and salt into the creamed mixture followed by the chocolate and walnuts. Cover and chill in the fridge for 1 hour.
Roll mixture into small balls about the size of a walnut. Place balls on a baking tray spaced about 4cm apart and bake for about 12 minutes. Cool on a wire rack before storing in an airtight container.