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: AssetIdAsset
asset_bf: AssetBlindingFactorAsset Blinding Factor
value: u64Value
value_bf: ValueBlindingFactorValue 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 duplicate 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
impl Copy for TxOutSecrets
impl Eq for TxOutSecrets
impl StructuralPartialEq for TxOutSecrets
Auto Trait Implementations§
impl Freeze for TxOutSecrets
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