feat: integrate mt in mock_sign (#23)

* feat: integrate mt in mock_sign

* fix: handle compile error

* fix: use PodClass::Main in MainPod origin
This commit is contained in:
Eduard S. 2025-02-05 11:24:35 +01:00 committed by GitHub
parent 4d16647d10
commit 085d5fff2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 51 additions and 81 deletions

View file

@ -1,6 +1,7 @@
//! The middleware includes the type definitions and the traits used to connect the frontend and
//! the backend.
use anyhow::Result;
use dyn_clone::DynClone;
use hex::{FromHex, FromHexError};
use itertools::Itertools;
@ -220,7 +221,7 @@ pub trait SignedPod: fmt::Debug + DynClone {
dyn_clone::clone_trait_object!(SignedPod);
pub trait PodSigner {
fn sign(&mut self, params: &Params, kvs: &HashMap<Hash, Value>) -> Box<dyn SignedPod>;
fn sign(&mut self, params: &Params, kvs: &HashMap<Hash, Value>) -> Result<Box<dyn SignedPod>>;
}
#[derive(Clone, Copy, Debug, FromRepr, PartialEq, Eq)]
@ -313,5 +314,5 @@ pub struct MainPodInputs<'a> {
}
pub trait PodProver {
fn prove(&mut self, params: &Params, inputs: MainPodInputs) -> Box<dyn MainPod>;
fn prove(&mut self, params: &Params, inputs: MainPodInputs) -> Result<Box<dyn MainPod>>;
}