pub trait ClientSideWitness: Eq {
type Seal: SingleUseSeal;
type Proof;
type Error: Clone + Error;
// Required methods
fn convolve_commit(
&self,
msg: <Self::Seal as SingleUseSeal>::Message,
) -> Result<Self::Proof, Self::Error>;
fn merge(&mut self, other: Self) -> Result<(), impl Error>
where Self: Sized;
}
Expand description
A client-side part of the seal closing witness SealWitness
.
A client-side witness is always specific to a particular SingleUseSeal
protocol, hence it specifies single-use seal implementation as an associated
type Self::Seal
.
Required Associated Types§
Sourcetype Seal: SingleUseSeal
type Seal: SingleUseSeal
Client-side witness is specific to just one type of single-use seals, provided as an associated type.
Sourcetype Proof
type Proof
Proof which is passed from the client-side witness to the public-side witness during single-use seal validation.
Sourcetype Error: Clone + Error
type Error: Clone + Error
Error type returned by the Self::convolve_commit
operation.
Required Methods§
Sourcefn convolve_commit(
&self,
msg: <Self::Seal as SingleUseSeal>::Message,
) -> Result<Self::Proof, Self::Error>
fn convolve_commit( &self, msg: <Self::Seal as SingleUseSeal>::Message, ) -> Result<Self::Proof, Self::Error>
Procedure that convolves the message with the client-side data kept in
the client-side part of the seal closing witness. This produces
Self::Proof
, which is lately verified by
SealWitness::verify_seal_closing
and
SealWitness::verify_seals_closing
against the published part of the
witness.
Sourcefn merge(&mut self, other: Self) -> Result<(), impl Error>where
Self: Sized,
fn merge(&mut self, other: Self) -> Result<(), impl Error>where
Self: Sized,
Merge two compatible client-side witnesses together, or error in case of their incompatibility.
Client-side witnesses may be split into different client-specific versions, for instance, by concealing some of the data which should be private and not known to the other users. This procedure allows combining information from multiple sources back.
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.