Trait PublishedWitness

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

Source

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.

Source

type Error: Clone + Error

Error type returned by Self::verify_commitment.

Required Methods§

Source

fn pub_id(&self) -> Self::PubId

Get the unique id of this witness publication.

Source

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.

Implementations on Foreign Types§

Source§

impl PublishedWitness<TxoSeal> for Tx

Implementors§