In a bowl, whisk together the flour, cocoa powder, baking powder and salt. Place the chocolate and butter in a large heatproof bowl and set over but not touching simmering water in a saucepan; stir frequently until melted and smooth, about 5 minutes. Remove the bowl from the saucepan and let the chocolate mixture cool to room temperature, 10 to 15 minutes.
Using a wooden spoon, stir the sugar into the chocolate mixture until combined. Stir in the eggs one at a time, beating until combined after each addition, then beat in the vanilla. Gently fold in the flour mixture just until no traces of flour remain; do not overmix.
Divide the batter evenly among the prepared muffin cups, filling each about three-fourths full. Bake until a toothpick inserted into the center of a cupcake comes out with only a few moist crumbs attached, 22 to 24 minutes. Transfer the pan to a wire rack and let cool for 5 minutes. Then transfer the cupcakes to the rack and let cool completely, about 1 hour.
Frost the cupcakes with the buttercream, garnish with grated chocolate and serve. (The frosted cupcakes can be refrigerated in an airtight container for up to 3 days; bring to room temperature before serving.) Makes 12 cupcakes.
Adapted from Cupcakes, by Shelly Kaldunski (Weldon Owen, 2008).