Both.
Narcissists project confidence without actual success.
Experts project confidence based on proven success.
Narcissists project confidence without actual success.
Experts project confidence based on proven success.
Narcissism/NPD is a result of the mind not being able to accept information that disproves their elevated sense of self worth. Anything that proves them wrong therefore is discarded before it can be processed internally. So when they speak with confidence, its because nothing in their reality can disprove what they are saying, even if what you're saying is true to our shared reality.
It's tough to separate someone who is a narcissist from a confident person unless the person judging them is an knowledgeable in the same field.