-
Notifications
You must be signed in to change notification settings - Fork 384
feature request: unconfirmed balances #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
in my opinion, latest
the rationale is that I can trust my own unconfirmed transactions |
Just wanted to make a note that this is the algorithm I use for this in gun: https://github.com/LLFourn/gun/blob/ef3466d471bed8223b6af4f3e31d11fd5caf3f75/src/cmd/wallet.rs#L61-L67 The basic idea is that if a incoming UTXO is to an internal address then it's confirmed even if it's not confirmed in on chain because if it were to be dropped the coins would go back to wallet. This is something like what @RCasatta mentions above. |
Maybe we should also add an "immature" balance after I fix #413, as you can't spend immature coinbases anyways... |
I think something like this could work..
I did find few lib users confused by getting one single balance, devs expect their balances to be categorized in this way.. |
Assigning to @wszdexdrf, so he can start contributing to bdk :) |
At the moment
get_balance
returns the full wallet balance regardless of confirmations.It would be nice to return unconfirmed balance as well or allow the caller to pass confirmation number.
The text was updated successfully, but these errors were encountered: