mithril_signer::services

Trait CertifierService

source
pub trait CertifierService: Sync + Send {
    // Required methods
    fn get_beacon_to_sign<'life0, 'async_trait>(
        &'life0 self,
        time_point: TimePoint,
    ) -> Pin<Box<dyn Future<Output = StdResult<Option<BeaconToSign>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn compute_publish_single_signature<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        beacon_to_sign: &'life1 BeaconToSign,
        protocol_message: &'life2 ProtocolMessage,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Certifier Service

This service is responsible for providing the beacons that need to be signed by the signer.

Required Methods§

source

fn get_beacon_to_sign<'life0, 'async_trait>( &'life0 self, time_point: TimePoint, ) -> Pin<Box<dyn Future<Output = StdResult<Option<BeaconToSign>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the beacon to sign.

If all available signed entity have already been signed, None is returned.

source

fn compute_publish_single_signature<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, beacon_to_sign: &'life1 BeaconToSign, protocol_message: &'life2 ProtocolMessage, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Compute and publish a single signature for a given protocol message.

Implementors§