It's actually somewhat of a difficult question, because digital currencies in the past were purchased outright with regular currency, not mined in the way that BTC are.
Any gain from sale of BTC that was purchased, not mined, is going to be a capital gain.
Any gain from sale of BTC that were mined, is going to be essentially uncharted territory. I think you can make the argument that since it is 'earned', in the sense that people purchase equipment, configure it to run certain software, pay for electricity, etc. In this case, it would simply be treated as business income. You could then deduct your expenses and arrive at net taxable income. Some expenses would have to be depreciated over time, such as computers which would last longer than one tax year.
It is possible, however, that the IRS might take the position that since bitcoins are 'awarded' in a somewhat random fashion, that they might be considered 'gambling winnings'. If this is the case, you wouldn't be able to deduct any of your expenses used to generate them.
Really it would be great if the IRS would issue a statement on this to give clear guidance, but bitcoins specifically are probably not even on their radar.
I doubt you could count bitcoin mining as gambling. The returns are just too consistent. Perhaps you could treat it like a commodity like a mineral mined from the ground.
I've been book keeping on the assumption that mined bitcoins are like inventory being created at a factory. That is it incurs expenses, but has no taxable value until it is converted into local legal tender. Of course I'll change if I receive different advice on how to go.
That's certainly an ambitious argument, personally I don't think the IRS will go for it, but you can give it a shot. I can see them claiming that if bitcoins are used as a currency, when you receive them, it's the same as receiving currency.
They definitely are not going to go for the idea they are mined as a mineral, unless bitcoin users are willing to spend big bucks lobbying them into those tax breaks, like the actual mining companies have.
I have a feeling we will find out soon whether it even matters, as bitcoin values either seem headed towards the stratosphere or back down to being worth pennies.