FeeBumpTransactionBuilder

class FeeBumpTransactionBuilder(innerTransaction: Transaction)

Builder for constructing FeeBumpTransaction instances.

This builder provides a fluent API for creating fee bump transactions that wrap existing transactions with higher fees. Fee bumps are useful when network congestion causes transactions to get stuck in the queue.

Usage with Base Fee (Recommended)

val feeBump = FeeBumpTransactionBuilder(originalTransaction)
.setFeeSource("GFEE...")
.setBaseFee(1000) // Fee per operation
.build()

feeBump.sign(feeSourceKeypair)

Usage with Exact Fee

val feeBump = FeeBumpTransactionBuilder(originalTransaction)
.setFeeSource("GFEE...")
.setFee(10000) // Total fee
.build()

Important Notes

  • You must specify EITHER setBaseFee OR setFee, not both

  • The fee source account must sign the fee bump transaction

  • The inner transaction must already be signed by its source account

  • Fee bumps can only wrap regular transactions, not other fee bumps

See also

Constructors

Link copied to clipboard
constructor(innerTransaction: Transaction)

Functions

Link copied to clipboard

Builds the FeeBumpTransaction.

Link copied to clipboard

Sets the base fee per operation.

Link copied to clipboard

Sets the exact total fee for the transaction.

Link copied to clipboard

Sets the account that will pay for the increased fee.