CommitmentTrait

Trait CommitmentTrait 

Source
pub trait CommitmentTrait<E: Engine>:
    Clone
    + Copy
    + Debug
    + Default
    + PartialEq
    + Eq
    + Send
    + Sync
    + TranscriptReprTrait<E::GE>
    + Serialize
    + for<'de> Deserialize<'de>
    + Abomonation
    + AbsorbInROTrait<E>
    + Add<Self, Output = Self>
    + ScalarMul<E::Scalar> {
    type CompressedCommitment: Clone + Debug + PartialEq + Eq + Send + Sync + TranscriptReprTrait<E::GE> + Serialize + for<'de> Deserialize<'de>;

    // Required methods
    fn compress(&self) -> Self::CompressedCommitment;
    fn to_coordinates(&self) -> (E::Base, E::Base, bool);
    fn decompress(c: &Self::CompressedCommitment) -> Result<Self, NovaError>;
}
Expand description

This trait defines the behavior of the commitment

Required Associated Types§

Source

type CompressedCommitment: Clone + Debug + PartialEq + Eq + Send + Sync + TranscriptReprTrait<E::GE> + Serialize + for<'de> Deserialize<'de>

Holds the type of the compressed commitment

Required Methods§

Source

fn compress(&self) -> Self::CompressedCommitment

Compresses self into a compressed commitment

Source

fn to_coordinates(&self) -> (E::Base, E::Base, bool)

Returns the coordinate representation of the commitment

Source

fn decompress(c: &Self::CompressedCommitment) -> Result<Self, NovaError>

Decompresses a compressed commitment into a commitment

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§