pub struct PuzzleCommitment<N>where
N: Network,{ /* private fields */ }Expand description
A coinbase puzzle commitment to a polynomial.
Implementations§
Source§impl<N> PuzzleCommitment<N>where
N: Network,
impl<N> PuzzleCommitment<N>where
N: Network,
Sourcepub const fn new(
commitment: KZGCommitment<<N as Environment>::PairingCurve>,
) -> PuzzleCommitment<N>
pub const fn new( commitment: KZGCommitment<<N as Environment>::PairingCurve>, ) -> PuzzleCommitment<N>
Initializes a new instance of the puzzle commitment.
Sourcepub fn from_g1_affine(
commitment: <<N as Environment>::PairingCurve as PairingEngine>::G1Affine,
) -> PuzzleCommitment<N>
pub fn from_g1_affine( commitment: <<N as Environment>::PairingCurve as PairingEngine>::G1Affine, ) -> PuzzleCommitment<N>
Initializes a new instance of the puzzle commitment.
Methods from Deref<Target = KZGCommitment<<N as Environment>::PairingCurve>>§
pub fn has_degree_bound(&self) -> bool
pub fn is_in_correct_subgroup_assuming_on_curve(&self) -> bool
Trait Implementations§
Source§impl<N> Clone for PuzzleCommitment<N>
impl<N> Clone for PuzzleCommitment<N>
Source§fn clone(&self) -> PuzzleCommitment<N>
fn clone(&self) -> PuzzleCommitment<N>
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<N> Debug for PuzzleCommitment<N>where
N: Network,
impl<N> Debug for PuzzleCommitment<N>where
N: Network,
Source§impl<N> Default for PuzzleCommitment<N>where
N: Network,
impl<N> Default for PuzzleCommitment<N>where
N: Network,
Source§fn default() -> PuzzleCommitment<N>
fn default() -> PuzzleCommitment<N>
Returns the “default value” for a type. Read more
Source§impl<N> Deref for PuzzleCommitment<N>where
N: Network,
impl<N> Deref for PuzzleCommitment<N>where
N: Network,
Source§type Target = KZGCommitment<<N as Environment>::PairingCurve>
type Target = KZGCommitment<<N as Environment>::PairingCurve>
The resulting type after dereferencing.
Source§impl<'de, N> Deserialize<'de> for PuzzleCommitment<N>where
N: Network,
impl<'de, N> Deserialize<'de> for PuzzleCommitment<N>where
N: Network,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PuzzleCommitment<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<PuzzleCommitment<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserializes the puzzle commitment from a string or buffer.
Source§impl<N> Display for PuzzleCommitment<N>where
N: Network,
impl<N> Display for PuzzleCommitment<N>where
N: Network,
Source§impl<N> From<KZGCommitment<<N as Environment>::PairingCurve>> for PuzzleCommitment<N>where
N: Network,
impl<N> From<KZGCommitment<<N as Environment>::PairingCurve>> for PuzzleCommitment<N>where
N: Network,
Source§fn from(
commitment: KZGCommitment<<N as Environment>::PairingCurve>,
) -> PuzzleCommitment<N>
fn from( commitment: KZGCommitment<<N as Environment>::PairingCurve>, ) -> PuzzleCommitment<N>
Initializes a new instance of the puzzle commitment.
Source§impl<N> From<PuzzleCommitment<N>> for TransmissionID<N>where
N: Network,
impl<N> From<PuzzleCommitment<N>> for TransmissionID<N>where
N: Network,
Source§fn from(puzzle_commitment: PuzzleCommitment<N>) -> TransmissionID<N>
fn from(puzzle_commitment: PuzzleCommitment<N>) -> TransmissionID<N>
Converts the puzzle commitment into a transmission ID.
Source§impl<N> FromBytes for PuzzleCommitment<N>where
N: Network,
impl<N> FromBytes for PuzzleCommitment<N>where
N: Network,
Source§impl<N> FromStr for PuzzleCommitment<N>where
N: Network,
impl<N> FromStr for PuzzleCommitment<N>where
N: Network,
Source§impl<N> Hash for PuzzleCommitment<N>
impl<N> Hash for PuzzleCommitment<N>
Source§impl<N> PartialEq for PuzzleCommitment<N>
impl<N> PartialEq for PuzzleCommitment<N>
Source§impl<N> Serialize for PuzzleCommitment<N>where
N: Network,
impl<N> Serialize for PuzzleCommitment<N>where
N: Network,
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,
Serializes the puzzle commitment to a string or buffer.
Source§impl<N> ToBytes for PuzzleCommitment<N>where
N: Network,
impl<N> ToBytes for PuzzleCommitment<N>where
N: Network,
impl<N> Copy for PuzzleCommitment<N>
impl<N> Eq for PuzzleCommitment<N>
impl<N> StructuralPartialEq for PuzzleCommitment<N>where
N: Network,
Auto Trait Implementations§
impl<N> Freeze for PuzzleCommitment<N>
impl<N> RefUnwindSafe for PuzzleCommitment<N>
impl<N> Send for PuzzleCommitment<N>
impl<N> Sync for PuzzleCommitment<N>
impl<N> Unpin for PuzzleCommitment<N>
impl<N> UnwindSafe for PuzzleCommitment<N>
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<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
fn take_from_value<D>(
value: &mut Value,
field: &str,
) -> Result<T, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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