Trait commit_verify::commit_encode::ConsensusCommit
source · pub trait ConsensusCommit: Sized + CommitEncode {
type Commitment: CommitVerify<Vec<u8>, PrehashedProtocol>;
fn consensus_commit(&self) -> Self::Commitment { ... }
fn consensus_verify(&self, commitment: &Self::Commitment) -> bool { ... }
}
Expand description
High-level API used in client-side validation for producing a single
commitment to the data, which includes running all necessary procedures like
concealment with CommitConceal
, merklization, strict encoding,
wrapped into CommitEncode
, followed by the actual commitment to its
output.
Required Associated Types§
sourcetype Commitment: CommitVerify<Vec<u8>, PrehashedProtocol>
type Commitment: CommitVerify<Vec<u8>, PrehashedProtocol>
Type of the resulting commitment
Provided Methods§
sourcefn consensus_commit(&self) -> Self::Commitment
fn consensus_commit(&self) -> Self::Commitment
Performs commitment to client-side-validated data
sourcefn consensus_verify(&self, commitment: &Self::Commitment) -> bool
fn consensus_verify(&self, commitment: &Self::Commitment) -> bool
Verifies commitment to client-side-validated data