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: CloseMethod
Commitment to the specific seal close method CloseMethod
which must
be used to close this seal.
vout: Vout
Tx output number, which should be always known.
blinding: u64
Blinding 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 PartialOrd for VoutSeal
impl PartialOrd for VoutSeal
Source§impl StrictDecode for VoutSeal
impl StrictDecode for VoutSeal
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> 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>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
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 StructuralPartialEq for VoutSeal
Auto Trait Implementations§
impl Freeze for VoutSeal
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.