Struct revault_tx::transactions::CpfpTransaction
source · [−]pub struct CpfpTransaction(_);
Expand description
The transaction spending the Unvault and Spend transactions’ CPFP output in order to bump their fees.
Implementations
sourceimpl CpfpTransaction
impl CpfpTransaction
sourcepub fn from_txins(
to_be_cpfped: Vec<CpfpTxIn>,
tbc_weight: u64,
tbc_fees: Amount,
added_feerate: u64,
available_utxos: Vec<CpfpTxIn>
) -> Result<CpfpTransaction, TransactionCreationError>
pub fn from_txins(
to_be_cpfped: Vec<CpfpTxIn>,
tbc_weight: u64,
tbc_fees: Amount,
added_feerate: u64,
available_utxos: Vec<CpfpTxIn>
) -> Result<CpfpTransaction, TransactionCreationError>
Create a CPFP tx to bump a set of transactions by a specified feerate. The current implementation will return a CPFP tx that either pays to a 0-value OP_RETURN output or to a change output paying to the same script. It will select UTxOs to consume using a largest first CS and will error if not enough UTxOs are provided to cover the expected feerate. NOTE: we assume all available UTxOs to be CPFP txouts from other Unvault transactions.
pub fn psbt(&self) -> &Psbt
pub fn into_psbt(self) -> Psbt
pub fn tx(&self) -> &Transaction
pub fn fees(&self) -> Amount
Trait Implementations
sourceimpl Clone for CpfpTransaction
impl Clone for CpfpTransaction
sourcefn clone(&self) -> CpfpTransaction
fn clone(&self) -> CpfpTransaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CpfpTransaction
impl Debug for CpfpTransaction
sourceimpl Display for CpfpTransaction
impl Display for CpfpTransaction
sourceimpl PartialEq<CpfpTransaction> for CpfpTransaction
impl PartialEq<CpfpTransaction> for CpfpTransaction
sourcefn eq(&self, other: &CpfpTransaction) -> bool
fn eq(&self, other: &CpfpTransaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CpfpTransaction) -> bool
fn ne(&self, other: &CpfpTransaction) -> bool
This method tests for !=
.
impl StructuralPartialEq for CpfpTransaction
Auto Trait Implementations
impl RefUnwindSafe for CpfpTransaction
impl Send for CpfpTransaction
impl Sync for CpfpTransaction
impl Unpin for CpfpTransaction
impl UnwindSafe for CpfpTransaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more