Trait Commitment

Source
pub trait Commitment<T = Value>: TrivialCommitment<T>
where T: Serialize + Display,
{ // Required method fn expected_data(&self) -> &T; // Provided methods fn verify_content(&self) -> CommitmentResult<()> { ... } fn verify(&self, target: &str) -> CommitmentResult<()> { ... } }
Expand description

A cryptographic commitment with expected data content.

Required Methods§

Source

fn expected_data(&self) -> &T

Gets the expected data.

Provided Methods§

Source

fn verify_content(&self) -> CommitmentResult<()>

Verifies that the expected data is found in the candidate data.

Source

fn verify(&self, target: &str) -> CommitmentResult<()>

Verifies the commitment.

Implementors§