lightning-kmp
lightning-kmp copied to clipboard
Add a sendAll method to `FinalWallet`
Make it possible to spend all confirmed funds sitting in the final wallet.
The process is split in two steps, allowing a validation step in the UI that shows mining fees.
Usage:
val finalWallet: FinalWallet = ...
val (unsignedTx, fee) = finalWallet.buildSendAllTransaction(address, feerate)!!
val signedTx = finalWallet.signTransaction(unsignedTx)!!
electrum.broadcastTransaction(signedTx)