pub struct Bundle<A: Authorization> {
pub vin: Vec<TxIn<A>>,
pub vout: Vec<TxOut>,
pub authorization: A,
}
Fields§
§vin: Vec<TxIn<A>>
§vout: Vec<TxOut>
Implementations§
pub fn apply_signatures<F>( self, calculate_sighash: F, signing_set: &TransparentSigningSet, ) -> Result<Bundle<Authorized>, Error>
Source§impl<A: Authorization> Bundle<A>
impl<A: Authorization> Bundle<A>
Sourcepub fn is_coinbase(&self) -> bool
pub fn is_coinbase(&self) -> bool
Returns true
if this bundle matches the definition of a coinbase transaction.
Note that this is defined purely in terms of the transparent transaction part. The consensus rules enforce additional rules on the shielded parts (namely, that they don’t have any inputs) of transactions with a transparent part that matches this definition.
Sourcepub fn value_balance<E, F>(&self, get_prevout_value: F) -> Result<Amount, E>
pub fn value_balance<E, F>(&self, get_prevout_value: F) -> Result<Amount, E>
The amount of value added to or removed from the transparent pool by the action of this bundle. A positive value represents that the containing transaction has funds being transferred out of the transparent pool into shielded pools or to fees; a negative value means that the containing transaction has funds being transferred into the transparent pool from the shielded pools.
Trait Implementations§
impl<A: Authorization> StructuralPartialEq for Bundle<A>
Auto Trait Implementations§
impl<A> Freeze for Bundle<A>where
A: Freeze,
impl<A> RefUnwindSafe for Bundle<A>
impl<A> Send for Bundle<A>
impl<A> Sync for Bundle<A>
impl<A> Unpin for Bundle<A>
impl<A> UnwindSafe for Bundle<A>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more