Struct rgbstd::containers::VoutSeal
source · pub struct VoutSeal {
pub method: CloseMethod,
pub vout: Vout,
pub blinding: u64,
}Expand description
Seal definition which re-uses witness transaction id of some other seal, which is not known at the moment of seal construction. Thus, the definition has only information about output number.
Fields§
§method: CloseMethodCommitment to the specific seal close method [CloseMethod] which must
be used to close this seal.
vout: VoutTx output number, which should be always known.
blinding: u64Blinding factor providing confidentiality of the seal definition. Prevents rainbow table bruteforce attack based on the existing blockchain txid set.
Implementations§
source§impl VoutSeal
impl VoutSeal
sourcepub fn new(method: CloseMethod, vout: impl Into<Vout>) -> Self
pub fn new(method: CloseMethod, vout: impl Into<Vout>) -> Self
Creates new seal definition for the provided output number and seal
closing method. Uses thread_rng to initialize blinding factor.
sourcepub fn new_opret(vout: impl Into<Vout>) -> Self
pub fn new_opret(vout: impl Into<Vout>) -> Self
Creates new opret-seal seal definition for the provided output number
and seal closing method. Uses thread_rng to initialize blinding
factor.
sourcepub fn new_tapret(vout: impl Into<Vout>) -> Self
pub fn new_tapret(vout: impl Into<Vout>) -> Self
Creates new tapret-seal seal definition for the provided output number
and seal closing method. Uses thread_rng to initialize blinding
factor.
sourcepub fn with_opret(vout: impl Into<Vout>, blinding: u64) -> Self
pub fn with_opret(vout: impl Into<Vout>, blinding: u64) -> Self
Reconstructs previously defined opret seal given an output number and a previously generated blinding factor.
sourcepub fn with_tapret(vout: impl Into<Vout>, blinding: u64) -> Self
pub fn with_tapret(vout: impl Into<Vout>, blinding: u64) -> Self
Reconstructs previously defined tapret seal given an output number and a previously generated blinding factor.
Trait Implementations§
source§impl<'de> Deserialize<'de> for VoutSeal
impl<'de> Deserialize<'de> for VoutSeal
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl Ord for VoutSeal
impl Ord for VoutSeal
source§impl PartialEq<VoutSeal> for VoutSeal
impl PartialEq<VoutSeal> for VoutSeal
source§impl PartialOrd<VoutSeal> for VoutSeal
impl PartialOrd<VoutSeal> for VoutSeal
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl StrictDecode for VoutSeal
impl StrictDecode for VoutSeal
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
source§impl StrictDumb for VoutSeal
impl StrictDumb for VoutSeal
fn strict_dumb() -> Self
source§impl StrictEncode for VoutSeal
impl StrictEncode for VoutSeal
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
source§impl StrictStruct for VoutSeal
impl StrictStruct for VoutSeal
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for VoutSeal
impl StrictType for VoutSeal
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_STD
fn strict_name() -> Option<TypeName>
impl Copy for VoutSeal
impl Eq for VoutSeal
impl StrictProduct for VoutSeal
impl StructuralEq for VoutSeal
impl StructuralPartialEq for VoutSeal
Auto Trait Implementations§
impl RefUnwindSafe for VoutSeal
impl Send for VoutSeal
impl Sync for VoutSeal
impl Unpin for VoutSeal
impl UnwindSafe for VoutSeal
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.