#[non_exhaustive]pub enum Proof {
OpretFirst,
TapretFirst(TapretProof),
}
Expand description
Type and type-specific proof information of a deterministic bitcoin commitment.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OpretFirst
Opret commitment (no extra-transaction proof is required).
TapretFirst(TapretProof)
Tapret commitment and a proof of it.
Implementations§
source§impl Proof
impl Proof
sourcepub fn verify(&self, msg: &Commitment, tx: &Tx) -> Result<bool, TapretError>
pub fn verify(&self, msg: &Commitment, tx: &Tx) -> Result<bool, TapretError>
Verifies validity of the proof.
Trait Implementations§
source§impl CommitStrategy for Proof
impl CommitStrategy for Proof
source§impl<'de> Deserialize<'de> for Proof
impl<'de> Deserialize<'de> for Proof
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 PartialEq for Proof
impl PartialEq for Proof
source§impl StrictDecode for Proof
impl StrictDecode for Proof
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 Proof
impl StrictDumb for Proof
fn strict_dumb() -> Self
source§impl StrictEncode for Proof
impl StrictEncode for Proof
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
source§impl StrictSum for Proof
impl StrictSum for Proof
const ALL_VARIANTS: &'static [(u8, &'static str)] = _
fn variant_name(&self) -> &'static str
fn strict_check_variants()
fn variant_name_by_tag(tag: u8) -> Option<FieldName>
fn variant_ord(&self) -> u8
source§impl StrictType for Proof
impl StrictType for Proof
const STRICT_LIB_NAME: &'static str = LIB_NAME_BPCORE
fn strict_name() -> Option<TypeName>
source§impl StrictUnion for Proof
impl StrictUnion for Proof
fn strict_type_info() -> TypeInfo<Self>
impl Eq for Proof
impl StructuralEq for Proof
impl StructuralPartialEq for Proof
Auto Trait Implementations§
impl RefUnwindSafe for Proof
impl Send for Proof
impl Sync for Proof
impl Unpin for Proof
impl UnwindSafe for Proof
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> CommitEncode for T
impl<T> CommitEncode for T
source§fn commit_encode(&self, e: &mut impl Write)
fn commit_encode(&self, e: &mut impl Write)
Encodes the data for the commitment by writing them directly into a
io::Write
writer instance§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.