Both. Elements of Bitcoin, like PoW, are so fundamental that an alien race would probably have invented it too. However the ideosyncracies of exactly how Bitcoin works, like the details of the scripting system, are so specific if you don't call them "inventions", then nothing is an invention.