pub enum ProofMetadata {
None,
MerkleInclusion {
tree_depth: u8,
},
HashPreimage {
output_size: u16,
},
HashPreimageNist {
output_size: u16,
},
Circuit {
num_witnesses: u32,
num_public: u32,
},
Credential {
attribute_sizes: Vec<u16>,
reveal_mask: Vec<bool>,
},
Identity {
dsa_level: u8,
},
}Expand description
Metadata specific to different proof types
This enum stores proof-specific parameters that are required for verification. The metadata is serialized alongside the proof to make proofs self-describing.
All proofs must include appropriate metadata for their proof type.
Variants§
None
No metadata (default variant, but proofs should use specific metadata types)
MerkleInclusion
Merkle tree inclusion proof metadata
HashPreimage
Hash preimage proof metadata (Poseidon-128)
HashPreimageNist
NIST hash preimage proof metadata (cSHAKE256)
Circuit
Circuit computation proof metadata
Credential
Credential proof metadata for selective disclosure
Fields
Identity
Identity Token ownership proof metadata
Trait Implementations§
Source§impl Clone for ProofMetadata
impl Clone for ProofMetadata
Source§fn clone(&self) -> ProofMetadata
fn clone(&self) -> ProofMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProofMetadata
impl Debug for ProofMetadata
Source§impl Default for ProofMetadata
impl Default for ProofMetadata
Source§fn default() -> ProofMetadata
fn default() -> ProofMetadata
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProofMetadata
impl<'de> Deserialize<'de> for ProofMetadata
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProofMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProofMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProofMetadata
impl PartialEq for ProofMetadata
Source§fn eq(&self, other: &ProofMetadata) -> bool
fn eq(&self, other: &ProofMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProofMetadata
impl Serialize for ProofMetadata
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ProofMetadata
impl StructuralPartialEq for ProofMetadata
Auto Trait Implementations§
impl Freeze for ProofMetadata
impl RefUnwindSafe for ProofMetadata
impl Send for ProofMetadata
impl Sync for ProofMetadata
impl Unpin for ProofMetadata
impl UnsafeUnpin for ProofMetadata
impl UnwindSafe for ProofMetadata
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more