Option for Electrum and Esplora APIs to include floating `TxOut`s in updates for fee calculation
Describe the enhancement
BDK does not store the transaction fee in a separate field. It needs to be calculated from the difference between prev outputs and outputs created.
For transactions that are received from an external wallet, we would not have prev txout data by default. It'll be handy to have an option to get prev txouts for these transactions and have them inserted as floating txouts in the TxGraph.
Use case
Some wallets would want to be able to calculate fees for all transactions that it includes.
Additional context
In esplora it should not be an option it just should be done. The information is already fetched it just isn't inserted. With electrum I guess you have to make it an option.
That's a good point @LLFourn. Should be straightforward for Esplora then.
I can take a look at this.
possibly related #1419
@LagginTimes will also implement this for Electrum.
The electrum portion of this ticket has been addressed in #1403.