Class BumpFeeTxBuilder
-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
,org.bitcoindevkit.BumpFeeTxBuilderInterface
,org.bitcoindevkit.Disposable
public class BumpFeeTxBuilder implements Disposable, AutoCloseable, BumpFeeTxBuilderInterface
A
BumpFeeTxBuilder
is created by callingbuild_fee_bump
on a wallet. After assigning it, you set options on it until finally callingfinish
to 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 Unit
destroy()
Unit
close()
final Pointer
uniffiClonePointer()
BumpFeeTxBuilder
allowDust(Boolean allowDust)
Set whether the dust limit is checked. BumpFeeTxBuilder
currentHeight(UInt height)
Set the current blockchain height. Psbt
finish(Wallet wallet)
Finish building the transaction. BumpFeeTxBuilder
nlocktime(LockTime locktime)
Use a specific nLockTime while creating the transaction. BumpFeeTxBuilder
setExactSequence(UInt nsequence)
Set an exact nSequence
value.BumpFeeTxBuilder
version(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
nLockTime
for preventing fee sniping. Note: This will be ignored if you manually specify anlocktime
usingTxBuilder::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
Psbt
per 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
nSequence
value.This can cause conflicts if the wallet’s descriptors contain an "older" (
OP_CSV
) operator and the givennsequence
is 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.
-
-