Class BumpFeeTxBuilder
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable,org.bitcoindevkit.BumpFeeTxBuilderInterface,org.bitcoindevkit.Disposable
public class BumpFeeTxBuilder implements Disposable, AutoCloseable, BumpFeeTxBuilderInterface
A
BumpFeeTxBuilderis created by callingbuild_fee_bumpon a wallet. After assigning it, you set options on it until finally callingfinishto consume the builder and generate the transaction.
-
-
Constructor Summary
Constructors Constructor Description BumpFeeTxBuilder(Pointer pointer)BumpFeeTxBuilder(NoPointer noPointer)This constructor can be used to instantiate a fake object. BumpFeeTxBuilder(String txid, FeeRate feeRate)
-
Method Summary
Modifier and Type Method Description Unitdestroy()Unitclose()final PointeruniffiClonePointer()BumpFeeTxBuilderallowDust(Boolean allowDust)Set whether the dust limit is checked. BumpFeeTxBuildercurrentHeight(UInt height)Set the current blockchain height. Psbtfinish(Wallet wallet)Finish building the transaction. BumpFeeTxBuildernlocktime(LockTime locktime)Use a specific nLockTime while creating the transaction. BumpFeeTxBuildersetExactSequence(UInt nsequence)Set an exact nSequencevalue.BumpFeeTxBuilderversion(Integer version)Build a transaction with a specific version. -
-
Method Detail
-
uniffiClonePointer
final Pointer uniffiClonePointer()
-
allowDust
BumpFeeTxBuilder allowDust(Boolean allowDust)
Set whether the dust limit is checked.
Note: by avoiding a dust limit check you may end up with a transaction that is non-standard.
-
currentHeight
BumpFeeTxBuilder currentHeight(UInt height)
Set the current blockchain height.
This will be used to:
Set the
nLockTimefor preventing fee sniping. Note: This will be ignored if you manually specify anlocktimeusingTxBuilder::nlocktime.Decide whether coinbase outputs are mature or not. If the coinbase outputs are not mature at
current_height, we ignore them in the coin selection. If you want to create a transaction that spends immature coinbase inputs, manually add them usingTxBuilder::add_utxos. In both cases, if you don’t provide a current height, we use the last sync height.
-
finish
Psbt finish(Wallet wallet)
Finish building the transaction.
Uses the thread-local random number generator (rng).
Returns a new
Psbtper BIP174.WARNING: To avoid change address reuse you must persist the changes resulting from one or more calls to this method before closing the wallet. See
Wallet::reveal_next_address.
-
nlocktime
BumpFeeTxBuilder nlocktime(LockTime locktime)
Use a specific nLockTime while creating the transaction.
This can cause conflicts if the wallet’s descriptors contain an "after" (
OP_CLTV) operator.
-
setExactSequence
BumpFeeTxBuilder setExactSequence(UInt nsequence)
Set an exact
nSequencevalue.This can cause conflicts if the wallet’s descriptors contain an "older" (
OP_CSV) operator and the givennsequenceis lower than the CSV value.
-
version
BumpFeeTxBuilder version(Integer version)
Build a transaction with a specific version.
The version should always be greater than 0 and greater than 1 if the wallet’s descriptors contain an "older" (
OP_CSV) operator.
-
-
-
-