Struct Client
pub struct Client { /* private fields */ }Expand description
§Mock Proving Implementation
A non-cryptographic mock implementation of the Proving trait for testing
purposes. This proving client doesn’t actually generate valid proofs but
instead creates placeholders that have the correct structure.
The mock proving client is useful for developing, debugging and testing other components of the system without the overhead of real proof generation.
Note: The mock proving should NEVER be used in production environments where cryptographic validity of proofs is essential for security.
Implementations§
§impl Client
impl Client
pub const fn global_laws() -> Client
pub const fn global_laws() -> Client
Creates a new mock prover that just runs the global laws.
pub fn with_local_laws<L>(self) -> Clientwhere
L: LocalLaws,
pub fn with_local_laws<L>(self) -> Clientwhere
L: LocalLaws,
Adds verification of the provided local laws to the mock prover.
Trait Implementations§
§impl Proving for Client
impl Proving for Client
§fn prove(
&self,
sdl_id: HashDigest,
verifiables: &[VerifiableWithDiffs],
context: &VerificationContext,
local_laws_input: &dyn Serialize,
) -> Result<SDLProof, Box<dyn Error + Sync + Send>>
fn prove( &self, sdl_id: HashDigest, verifiables: &[VerifiableWithDiffs], context: &VerificationContext, local_laws_input: &dyn Serialize, ) -> Result<SDLProof, Box<dyn Error + Sync + Send>>
§fn local_laws_vkey(&self) -> Option<HashDigest>
fn local_laws_vkey(&self) -> Option<HashDigest>
Return the verification key of the enforced local laws, if configured. Read more
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request