Preheat oven to 350 degrees F. Line a standard cupcake pan with muffin liners, set aside.
Melt the chocolate and coffee (if using) over a double boiler until smooth and glossy. Let cool slightly and set aside.
In a large bowl, whisk or sift together the flour, baking powder, baking soda, and salt. Set aside.
In the bowl of a stand-mixer, cream the butter until light, about 3 minutes. Slowly stream in the granulated sugar and beat on high until light and fluffy, about 5 to 8 minutes. Add the eggs, one at a time, mixing well after each addition. Scrape the sides and bottom of the bowl as needed. Stir in the vanilla extract and sour cream. Add the dry ingredients alternately with the buttermilk, beginning and ending with the dry ingredients. Mix just until combined after each addition to avoid over-mixing the batter.
Transfer half of the batter to a separate bowl and fold in the melted chocolate until evenly combined. Then transfer both the chocolate batter and vanilla batter into two separate pastry bags, fitted with plain large circle tips. (Or you can use a large plastic food storage bag with the end snipped off). Pipe out the batter into the prepared cupcake pan, piping out half vanilla and half chocolate batter into each. You want to pipe out the batters about 3/4 of the way up. Bake until golden brown, puffed up and a toothpick inserted in the middle comes out clean, about 18 to 20 minutes.
Remove the cupcakes from the oven and let cool for about 10 minutes before transferring to a wire rack to cool completely.
To make the vanilla buttercream, cream the butter on high until fluffy, about 5 minutes. Add in the powdered sugar, salt and vanilla and mix on low until combined. Then beat on high and slowly stream in enough heavy cream until the desired consistency is reached. It should be fluffy and spreadable. Beat on high for about 3 minutes. Transfer to a bowl and set aside.
To make the chocolate buttercream, using the same bowl as the vanilla buttercream, beat the butter until fluffy, about 5 minutes. Add the cocoa powder, powdered sugar, vanilla, and espresso and mix on low until evenly combined. Stream in enough heavy cream until desired consistency is reached. It should be fluffy and spreadable. Beat on high for about 3 minutes.
To frost the cupcakes, transfer the vanilla and chocolate buttercream to two separate piping bags (or plastic food storage bags). Then pipe them both, at the same time, into one large pastry bag fitted with a plain circle tip. Then pipe out the swirled frosting on top of each cupcake. Top with white and black sprinkles and enjoy! Eat at room temperature or store in the fridge for up to 3 days. Leave out the cupcakes at room temperature before eating.