Skip to main content

TcScheme

Trait TcScheme 

Source
pub trait TcScheme: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn kind(&self) -> TcSchemeKind;
    fn create_session(
        &self,
        params: &SessionParams,
    ) -> Result<Box<dyn SessionImpl>, Error>;
}
Expand description

A registered threshold scheme.

Implementations are Send + Sync so a scheme can be looked up from any thread. Each create_session call yields a fresh SessionImpl that owns the per-session mutable state.

Required Methods§

Source

fn name(&self) -> &'static str

Canonical scheme name, e.g. "FROST-ed25519", "GG18-ECDSA-P256".

Source

fn kind(&self) -> TcSchemeKind

What kind of artifact this scheme produces.

Source

fn create_session( &self, params: &SessionParams, ) -> Result<Box<dyn SessionImpl>, Error>

Build a new session for this scheme. The returned SessionImpl owns all per-session state; the framework drives it via SessionImpl::round / SessionImpl::result / SessionImpl::destroy.

Trait Implementations§

Source§

impl Debug for dyn TcScheme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl TcScheme for confium_tc_core::schemes::mock::MockTcSigScheme

Source§

impl TcScheme for confium_tc::schemes::mock::MockTcSigScheme