lightning-kmp icon indicating copy to clipboard operation
lightning-kmp copied to clipboard

Add a sendAll method to `FinalWallet`

Open pm47 opened this issue 5 months ago • 0 comments

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)

pm47 avatar Sep 17 '24 09:09 pm47