BumpFeeTxBuilder

class BumpFeeTxBuilder

The BumpFeeTxBuilder is used to bump the fee on a transaction that has been broadcast and has its RBF flag set to true.

Constructors

Link copied to clipboard
fun BumpFeeTxBuilder()

Functions

Link copied to clipboard
fun allowShrinking(address: String): BumpFeeTxBuilder

Explicitly tells the wallet that it is allowed to reduce the amount of the output matching this script_pubkey in order to bump the transaction fee. Without specifying this the wallet will attempt to find a change output to shrink instead. Note that the output may shrink to below the dust limit and therefore be removed. If it is preserved then it is currently not guaranteed to be in the same position as it was originally. Returns an error if script_pubkey can’t be found among the recipients of the transaction we are bumping.

Link copied to clipboard
fun enableRbf(): BumpFeeTxBuilder

Enable signaling RBF. This will use the default nsequence value of 0xFFFFFFFD.

Link copied to clipboard
fun enableRbfWithSequence(nsequence: UInt): BumpFeeTxBuilder

Enable signaling RBF with a specific nSequence value. This can cause conflicts if the wallet's descriptors contain an "older" (OP_CSV) operator and the given nsequence is lower than the CSV value. If the nsequence is higher than 0xFFFFFFFD an error will be thrown, since it would not be a valid nSequence to signal RBF.

Link copied to clipboard
fun finish(wallet: Wallet): PartiallySignedBitcoinTransaction

Finish building the transaction. Returns the BIP174 PSBT.