pub struct BumpFeeTxBuilder { /* private fields */ }Expand description
A BumpFeeTxBuilder is created by calling build_fee_bump on a wallet. After assigning it, you set options on it
until finally calling finish to consume the builder and generate the transaction.
Implementations§
Source§impl BumpFeeTxBuilder
impl BumpFeeTxBuilder
pub fn new(txid: Arc<Txid>, fee_rate: Arc<FeeRate>) -> Self
Sourcepub fn set_exact_sequence(&self, nsequence: u32) -> Arc<Self>
pub fn set_exact_sequence(&self, nsequence: u32) -> Arc<Self>
Set an exact 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.
Sourcepub fn current_height(&self, height: u32) -> Arc<Self>
pub fn current_height(&self, height: u32) -> Arc<Self>
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.
Sourcepub fn nlocktime(&self, locktime: LockTime) -> Arc<Self>
pub fn nlocktime(&self, locktime: LockTime) -> Arc<Self>
Use a specific nLockTime while creating the transaction.
This can cause conflicts if the wallet’s descriptors contain an “after” (OP_CLTV) operator.
Sourcepub fn allow_dust(&self, allow_dust: bool) -> Arc<Self>
pub fn allow_dust(&self, allow_dust: bool) -> Arc<Self>
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.
Sourcepub fn version(&self, version: i32) -> Arc<Self>
pub fn version(&self, version: i32) -> Arc<Self>
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.
Sourcepub fn finish(&self, wallet: &Arc<Wallet>) -> Result<Arc<Psbt>, CreateTxError>
pub fn finish(&self, wallet: &Arc<Wallet>) -> Result<Arc<Psbt>, CreateTxError>
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.
Trait Implementations§
Source§impl Clone for BumpFeeTxBuilder
impl Clone for BumpFeeTxBuilder
Source§fn clone(&self) -> BumpFeeTxBuilder
fn clone(&self) -> BumpFeeTxBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> LiftRef<UT> for BumpFeeTxBuilder
impl<UT> LiftRef<UT> for BumpFeeTxBuilder
type LiftType = Arc<BumpFeeTxBuilder>
Source§impl<UT> LowerError<UT> for BumpFeeTxBuilder
impl<UT> LowerError<UT> for BumpFeeTxBuilder
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for BumpFeeTxBuilder
impl<UT> LowerReturn<UT> for BumpFeeTxBuilder
Source§type ReturnType = <Arc<BumpFeeTxBuilder> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<BumpFeeTxBuilder> as LowerReturn<UniFfiTag>>::ReturnType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl<UT> TypeId<UT> for BumpFeeTxBuilder
impl<UT> TypeId<UT> for BumpFeeTxBuilder
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for BumpFeeTxBuilder
impl RefUnwindSafe for BumpFeeTxBuilder
impl Send for BumpFeeTxBuilder
impl Sync for BumpFeeTxBuilder
impl Unpin for BumpFeeTxBuilder
impl UnwindSafe for BumpFeeTxBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more