A quick guide on how to use the BDK-Kotlin 0.7.0 library to send transactions with the Replace-By-Fee(RBF) feature enabled.
You can use the Padawan Wallet and dev-kit open-source projects as reference.
TxBuilder
With the TxBuilder() you can create the transaciton as per usual.
var txBuilder = recipientList.fold(TxBuilder()) { builder, recipient -> builder.addRecipient(recipient.address, recipient.amount) } txBuilder = txBuilder.enableRbf() txBuilder = txBuilder.feeRate(satPerVbyte = feeRate) return txBuilder.finish(wallet)
As you can see we are just adding the recipient address and amount normally, while adding a .enableRBF() method.
Creating the new transaction to replace that one will be covered in a different blog post since that is a whole separate issue with tons of UI etc.
