Trait ClientSideWitness

Source
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§

Source

type Seal: SingleUseSeal

Client-side witness is specific to just one type of single-use seals, provided as an associated type.

Source

type Proof

Proof which is passed from the client-side witness to the public-side witness during single-use seal validation.

Source

type Error: Clone + Error

Error type returned by the Self::convolve_commit operation.

Required Methods§

Source

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.

Source

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.

Implementations on Foreign Types§

Source§

impl ClientSideWitness for Anchor

Source§

type Proof = Proof

Source§

type Seal = TxoSeal

Source§

type Error = AnchorError

Source§

fn convolve_commit( &self, mmb_message: Message, ) -> Result<Proof, <Anchor as ClientSideWitness>::Error>

Source§

fn merge(&mut self, other: Anchor) -> Result<(), impl Error>
where Anchor: Sized,

Implementors§