In a large bowl combine the flour, salt, baking powder, and cocoa power together and whisk.
In a stand mixer, on medium-high speed, beat the butter and sugar until smooth and light.
Add eggs one at a time waiting 1 minute between each egg.
Add the vanilla and melted chocolate.
Reduce the speed to low and alternate adding ⅓ of the flour mixture and then a ½ cup of the buttermilk. Wait to make sure all of the flour mixture and buttermilk are incorporated before adding the other.
Once the last flour mixture addition has been just incorporated turn off the blender.
Using the cookie scoop add one scoop to each cupcake sleeve. Place on the center rack of the oven and bake for 15-20 min or until a toothpick inserted into the middle comes out clean.
Set on a rack to cook completely.
Making the buttercream
In a stand mixer with a paddle attachment, beat the butter on medium high speed until smooth.
Reduce the speed to low and add the powdered sugar, espresso, and vanilla. Once all of the powdered sugar has been incorporated increase the speed to medium high until completed mixed.
Place in prepared bag with tip to use on cooled cupcakes.