pub struct UTXO {
pub outpoint: OutPoint,
pub txout: TxOut,
pub secrets: Option<TxOutSecrets>,
}Expand description
Represents an Unspent Transaction Output (UTXO).
Fields§
§outpoint: OutPointBounded outpoint for this object
txout: TxOutTransaction output characteristics
secrets: Option<TxOutSecrets>Already unblinded transaction output secrets
Implementations§
Source§impl UTXO
impl UTXO
Sourcepub fn explicit_asset(&self) -> AssetId
pub fn explicit_asset(&self) -> AssetId
Retrieves the explicit AssetId from the transaction output (txout).
§Panics
This function will panic if the UTXO’s asset is confidential.
Sourcepub fn explicit_amount(&self) -> u64
pub fn explicit_amount(&self) -> u64
Retrieves the explicit amount contained within the transaction output (UTXO).
§Panics
This function will panic if the UTXO’s amount is confidential.
Sourcepub fn unblinded_asset(&self) -> AssetId
pub fn unblinded_asset(&self) -> AssetId
Retrieves the unblinded AssetId of the current UTXO.
§Panics
This function will panic if the UTXO is not blinded. The panic occurs when
self.secrets is None, as it expects the UTXO to be in an unblinded state to retrieve the AssetId.
Sourcepub fn unblinded_amount(&self) -> u64
pub fn unblinded_amount(&self) -> u64
Retrieves the unblinded amount from the UTXO.
§Panics
This function will panic if the UTXO is not confidential.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UTXO
impl RefUnwindSafe for UTXO
impl Send for UTXO
impl Sync for UTXO
impl Unpin for UTXO
impl UnsafeUnpin for UTXO
impl UnwindSafe for UTXO
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,
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>
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>
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