pub trait PublishedWitness<Seal>where
Seal: SingleUseSeal,{
type PubId: Copy + Ord + Debug + Display;
type Error: Clone + Error;
// Required methods
fn pub_id(&self) -> Self::PubId;
fn verify_commitment(
&self,
proof: <<Seal as SingleUseSeal>::CliWitness as ClientSideWitness>::Proof,
) -> Result<(), Self::Error>;
}
Expand description
A published part of the seal closing witness SealWitness
.
Published witness may be used by multiple implementations of single-use
seals (SingleUseSeal
), hence it binds the specific seal type as a
generic parameter.
Required Associated Types§
Sourcetype PubId: Copy + Ord + Debug + Display
type PubId: Copy + Ord + Debug + Display
A unique id for the published part of the single-use seal closing witness.
Publication id that may be used for referencing publication of witness data in the medium.
Sourcetype Error: Clone + Error
type Error: Clone + Error
Error type returned by Self::verify_commitment
.
Required Methods§
Sourcefn verify_commitment(
&self,
proof: <<Seal as SingleUseSeal>::CliWitness as ClientSideWitness>::Proof,
) -> Result<(), Self::Error>
fn verify_commitment( &self, proof: <<Seal as SingleUseSeal>::CliWitness as ClientSideWitness>::Proof, ) -> Result<(), Self::Error>
Verify that the public witness commits to the message using a proof
ClientSideWitness::Proof
, which is prepared by the client-side part
of the seal closing witness and include the information about the
message.