MetacoSA / QBitNinja

An Open Source and powerful blockchain API
MIT License
68 stars 42 forks source link

BalanceSummary: what does "Immature" means? #56

Open bazooka70 opened 6 years ago

bazooka70 commented 6 years ago

With QBitNinjaClient() we can call the GetBalanceSummary which returns BalanceSummary. one of the fields is Immature. what exactly does this field means? should I use it in the final balance calculation?

Also, should I call balanceSummary.CalculateSpendable(); to get the balance summary before accessing the different fields (Spendable, UnConfirmed, Confirmed, Immature)

NicolasDorier commented 6 years ago

Immature is for coins mined by miners that can't be spent for now.

NicolasDorier commented 6 years ago

CalculateSpendable should be called by the server not by the client, I should have make this private or just removed it.

bazooka70 commented 6 years ago

Thanks @NicolasDorier . So in a standard client app Immature should be ignored? I mean what is the formula to display the current balance (including unconfirmed) and the unconfirmed BTC (could be positive or negative). something like blockcypher.com shows.