Struct elements::TxOutSecrets
source · pub struct TxOutSecrets {
pub asset: AssetId,
pub asset_bf: AssetBlindingFactor,
pub value: u64,
pub value_bf: ValueBlindingFactor,
}
Expand description
Information about Transaction Input Asset
Fields§
§asset: AssetId
Asset
asset_bf: AssetBlindingFactor
Asset Blinding Factor
value: u64
Value
value_bf: ValueBlindingFactor
Value Blinding factor
Implementations§
source§impl TxOutSecrets
impl TxOutSecrets
sourcepub fn new(
asset: AssetId,
asset_bf: AssetBlindingFactor,
value: u64,
value_bf: ValueBlindingFactor
) -> Self
pub fn new( asset: AssetId, asset_bf: AssetBlindingFactor, value: u64, value_bf: ValueBlindingFactor ) -> Self
Create a new TxOutSecrets
sourcepub fn surjection_inputs<C: Signing>(
&self,
secp: &Secp256k1<C>
) -> (Generator, Tag, Tweak)
pub fn surjection_inputs<C: Signing>( &self, secp: &Secp256k1<C> ) -> (Generator, Tag, Tweak)
Gets the surjection inputs from TxOutSecrets
Returns a tuple (assetid, blind_factor, generator) if the blinds are
consistent with asset commitment
Otherwise, returns an error
sourcepub fn value_blind_inputs(
&self
) -> (u64, AssetBlindingFactor, ValueBlindingFactor)
pub fn value_blind_inputs( &self ) -> (u64, AssetBlindingFactor, ValueBlindingFactor)
Gets the required fields for last value blinding factor calculation from TxOutSecrets
Trait Implementations§
source§impl Clone for TxOutSecrets
impl Clone for TxOutSecrets
source§fn clone(&self) -> TxOutSecrets
fn clone(&self) -> TxOutSecrets
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TxOutSecrets
impl Debug for TxOutSecrets
source§impl From<TxOutSecrets> for SurjectionInput
impl From<TxOutSecrets> for SurjectionInput
source§fn from(v: TxOutSecrets) -> Self
fn from(v: TxOutSecrets) -> Self
Converts to this type from the input type.
source§impl Hash for TxOutSecrets
impl Hash for TxOutSecrets
source§impl PartialEq for TxOutSecrets
impl PartialEq for TxOutSecrets
source§fn eq(&self, other: &TxOutSecrets) -> bool
fn eq(&self, other: &TxOutSecrets) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TxOutSecrets
impl Eq for TxOutSecrets
impl StructuralPartialEq for TxOutSecrets
Auto Trait Implementations§
impl RefUnwindSafe for TxOutSecrets
impl Send for TxOutSecrets
impl Sync for TxOutSecrets
impl Unpin for TxOutSecrets
impl UnwindSafe for TxOutSecrets
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