pub struct TapretCommitment {
pub mpc: Commitment,
pub nonce: u8,
}
Expand description
Information about tapret commitment.
Fields§
§mpc: Commitment
LNPBP-4 multi-protocol commitment.
nonce: u8
Nonce is used to put the commitment into the correct side of the tree.
Implementations§
Source§impl TapretCommitment
impl TapretCommitment
Sourcepub fn with(mpc: Commitment, nonce: u8) -> Self
pub fn with(mpc: Commitment, nonce: u8) -> Self
Constructs information about tapret commitment.
Trait Implementations§
Source§impl Clone for TapretCommitment
impl Clone for TapretCommitment
Source§fn clone(&self) -> TapretCommitment
fn clone(&self) -> TapretCommitment
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 CommitVerify<TapretCommitment, TapretFirst> for TapScript
impl CommitVerify<TapretCommitment, TapretFirst> for TapScript
Source§fn commit(commitment: &TapretCommitment) -> Self
fn commit(commitment: &TapretCommitment) -> Self
Tapret script consists of 29 OP_NOP
pushes, followed by
OP_RETURN
, OP_PUSHBYTES_33
and serialized commitment data (MPC
commitment + nonce as a single slice).
Source§impl Debug for TapretCommitment
impl Debug for TapretCommitment
Source§impl<'de> Deserialize<'de> for TapretCommitment
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for TapretCommitment
Available on crate feature
serde
only.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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TapretCommitment
impl Display for TapretCommitment
Source§impl FromStr for TapretCommitment
impl FromStr for TapretCommitment
Source§impl Hash for TapretCommitment
impl Hash for TapretCommitment
Source§impl Ord for TapretCommitment
impl Ord for TapretCommitment
Source§fn cmp(&self, other: &TapretCommitment) -> Ordering
fn cmp(&self, other: &TapretCommitment) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TapretCommitment
impl PartialEq for TapretCommitment
Source§impl PartialOrd for TapretCommitment
impl PartialOrd for TapretCommitment
Source§impl Serialize for TapretCommitment
Available on crate feature serde
only.
impl Serialize for TapretCommitment
Available on crate feature
serde
only.Source§impl StrictDecode for TapretCommitment
impl StrictDecode for TapretCommitment
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for TapretCommitment
impl StrictDeserialize for TapretCommitment
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX>, ) -> Result<Self, DeserializeError>
fn strict_deserialize<const MAX: usize>( read: impl Read, ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path>, ) -> Result<Self, DeserializeError>
Source§impl StrictDumb for TapretCommitment
impl StrictDumb for TapretCommitment
fn strict_dumb() -> Self
Source§impl StrictEncode for TapretCommitment
impl StrictEncode for TapretCommitment
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictSerialize for TapretCommitment
impl StrictSerialize for TapretCommitment
fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize<const MAX: usize>( &self, write: impl Write, ) -> Result<(), Error>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>
Source§impl StrictStruct for TapretCommitment
impl StrictStruct for TapretCommitment
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for TapretCommitment
impl StrictType for TapretCommitment
const STRICT_LIB_NAME: &'static str = LIB_NAME_BPCORE
fn strict_name() -> Option<TypeName>
impl Eq for TapretCommitment
impl StrictProduct for TapretCommitment
impl StructuralPartialEq for TapretCommitment
Auto Trait Implementations§
impl Freeze for TapretCommitment
impl RefUnwindSafe for TapretCommitment
impl Send for TapretCommitment
impl Sync for TapretCommitment
impl Unpin for TapretCommitment
impl UnwindSafe for TapretCommitment
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
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
Compare self to
key
and return true
if they are equal.