Back to Blog
blockchain
July 9, 2022
3 min read

Enabling transactions to use Replace-By-Fee using BDK-Kotlin

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.

TY
Tang Yetong
Data Analyst at Fivetran with expertise in data engineering, mobile development, and blockchain technology.

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.

Tags

BDK-Kotlin
Bitcoin
RBF
Transactions
TY

Tang Yetong

Data Analyst at Fivetran with expertise in data engineering, mobile development, and blockchain technology.

Related Articles

How to contribute to Padawan Wallet
Featured
August 30, 2022
5 mins

How to contribute to Padawan Wallet

blockchain

A quick summary of what the Padawan Wallet is, why it exists and how you can contribute to it!

Bitcoin
Open Source
BDK-Kotlin
+1
Read Article
Summer of Bitcoin 2022
Featured
August 17, 2022
8 mins

Summer of Bitcoin 2022

blockchain

This is the last week of the Summer of Bitcoin (SoB) 2022 internship and what a journey it has been.

SoB
Internship
Bitcoin
+1
Read Article
Bumping RBF Enabled Transaction Fees using BDK-Kotlin
July 22, 2022
4 mins

Bumping RBF Enabled Transaction Fees using BDK-Kotlin

blockchain

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

BDK-Kotlin
Bitcoin
RBF
+1
Read Article