-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Hi, i mostly having a problem when i want to send "max amount from address"
Inputs from coinselect are always undefined because the fee is calculated on top of the target amount, and then I don't have enough satoshi in inputs to send "max target amount + fee"
To give an example, we have 100,000 satoshi on address, and we want to send all, so in target value we set 100,000 sat. and feerate 100 sat.
Fee is then calculated to be 24,000 sat, and by coinselect algorithm, i need 124,000 sat on the address to send 100,000.
What we need is that coinselect return output value of 76,000 and fee of 24,000. So when Transaction is built, 100% of satoshi is used, leaving an address with 0 balance.
Is this possible to do using coin select, or we need some kind of workaround for this
Thank you.