# Bumping RBF Enabled Transaction Fees using BDK-Kotlin

> A quick guide on how to use the BDK-Kotlin 0.8.0 library to bump Replace-By-Fee(RBF) enabled transaction fees.

By Tang Yetong. Published July 22, 2022. 4 min read. Category: blockchain. Tags: BDK-Kotlin, Bitcoin, RBF, Tutorial.
Read it with the interactive demos: https://tangyetong.com/blog/bumping-rbf-transaction-fees-bdk-kotlin

A quick guide on how to use the [`BDK-Kotlin 0.8.0`](https://github.com/bitcoindevkit/bdk-kotlin) library to bump Replace-By-Fee(RBF) enabled transaction fees. 
You can use the [`Padawan Wallet`](https://github.com/thunderbiscuit/padawan-wallet) and [`dev-kit`](https://github.com/thunderbiscuit/devkit-wallet/tree/simple-wallet) open-source projects as reference. 

## TxBuilder

With the `TxBuilder()` you can create the transaciton as per usual. 

```kotlin
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.
