Spread the pistachio cream into a thick sheet on parchment (or spoon it into dollops) and freeze for at least 1 hour, or overnight. If you made a sheet, cut it into small squares once frozen.
Line a cutting board or plate with parchment for the dough balls.
Whisk the flour, cornstarch, baking powder, baking soda and salt in a small bowl.
In a large bowl, whisk the cooled melted butter with both sugars. Add the egg and vanilla and whisk until smooth and thick.
Add the dry ingredients and whisk until mostly combined, with a few streaks of flour left.
Fold in the chopped chocolate and pistachios with a spatula just until combined.
Scoop the dough with a 4-tablespoon scoop onto the lined board and chill about 1 hour, until firm.
Heat the oven to 350°F (175°C) and line a baking sheet with parchment.
Flatten each dough ball, place 3 to 4 frozen squares (or one frozen dollop) of pistachio cream in the centre, and wrap the dough around it to seal.
Space the balls about 2 inches apart. Press extra chocolate, pistachios and frozen pistachio cream on top.
Bake 11 to 12 minutes, until the edges are set and the centres still soft. Sprinkle with flaky salt right away. Cool on the sheet 5 minutes, then enjoy warm for gooey centres (the filling firms as it cools).