Maybe we should mark which coins are confirmed but not yet spendable in the balance?
See https://github.com/bitcoindevkit/bdk/pull/640#discussion_r912108494
The idea is that if I have 10BTC in my wallet which are confirmed, but I'll be able to spend it only in a few months, then maybe get_balance should reflect that, and count the coins as locked or something.
This would mean passing a policy to get_balance so that it knows with which descriptor policy we would like to spend our coins.
Since this is a pretty advanced feature, maybe we should consider adding another API (get_balance_with_policy or something), so that normal users can just use get_balance and be fine.
The only scenario I can think of where this will be applicable is when coins are "locked".. And if they are we can we should be able to see that in the transaction list itself?? In that case we can add one more extra special category of "locked coins". And to keep things simple it can be simply None for most of the general cases, only will have value when locked coins are identified.. And I feel this should be possible to achieve without getting policy into get_balance().. Our wallet should be able to figure from its db if any such coins exists..
Having another API for this would be confusing imo.. But having this would be really cool..