Trait mithril_signer::Runner
source · pub trait Runner: Send + Sync {
// Required methods
fn get_epoch_settings<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<Option<EpochSettings>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_pending_certificate<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<Option<CertificatePending>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_current_time_point<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<TimePoint>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_signer_to_aggregator<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: Epoch,
protocol_parameters: &'life1 ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_stake_distribution<'life0, 'async_trait>(
&'life0 self,
epoch: Epoch
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn can_i_sign<'life0, 'life1, 'async_trait>(
&'life0 self,
pending_certificate: &'life1 CertificatePending
) -> Pin<Box<dyn Future<Output = StdResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn associate_signers_with_stake<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: Epoch,
signers: &'life1 [Signer]
) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignerWithStake>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn compute_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
signed_entity_type: &'life1 SignedEntityType,
next_signers: &'life2 [SignerWithStake]
) -> Pin<Box<dyn Future<Output = StdResult<ProtocolMessage>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn compute_single_signature<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
epoch: Epoch,
message: &'life1 ProtocolMessage,
signers: &'life2 [SignerWithStake]
) -> Pin<Box<dyn Future<Output = StdResult<Option<SingleSignatures>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn send_single_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_entity_type: &'life1 SignedEntityType,
maybe_signature: Option<SingleSignatures>
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_era_checker<'life0, 'async_trait>(
&'life0 self,
epoch: Epoch
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
This trait is mainly intended for mocking.
Required Methods§
sourcefn get_epoch_settings<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<Option<EpochSettings>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_epoch_settings<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<Option<EpochSettings>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the current epoch settings if any.
sourcefn get_pending_certificate<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<Option<CertificatePending>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pending_certificate<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<Option<CertificatePending>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the current pending certificate if any.
sourcefn get_current_time_point<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<TimePoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_current_time_point<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = StdResult<TimePoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the current time point from the Cardano node.
sourcefn register_signer_to_aggregator<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: Epoch,
protocol_parameters: &'life1 ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_signer_to_aggregator<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: Epoch,
protocol_parameters: &'life1 ProtocolParameters
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register the signer verification key to the aggregator.
sourcefn update_stake_distribution<'life0, 'async_trait>(
&'life0 self,
epoch: Epoch
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_stake_distribution<'life0, 'async_trait>(
&'life0 self,
epoch: Epoch
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the stake distribution and store it.
sourcefn can_i_sign<'life0, 'life1, 'async_trait>(
&'life0 self,
pending_certificate: &'life1 CertificatePending
) -> Pin<Box<dyn Future<Output = StdResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn can_i_sign<'life0, 'life1, 'async_trait>(
&'life0 self,
pending_certificate: &'life1 CertificatePending
) -> Pin<Box<dyn Future<Output = StdResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if all prerequisites for signing are met.
sourcefn associate_signers_with_stake<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: Epoch,
signers: &'life1 [Signer]
) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignerWithStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn associate_signers_with_stake<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: Epoch,
signers: &'life1 [Signer]
) -> Pin<Box<dyn Future<Output = StdResult<Vec<SignerWithStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
From a list of signers, associate them with the stake read on the Cardano node.
sourcefn compute_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
signed_entity_type: &'life1 SignedEntityType,
next_signers: &'life2 [SignerWithStake]
) -> Pin<Box<dyn Future<Output = StdResult<ProtocolMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn compute_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
signed_entity_type: &'life1 SignedEntityType,
next_signers: &'life2 [SignerWithStake]
) -> Pin<Box<dyn Future<Output = StdResult<ProtocolMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create the message to be signed with the single signature.
sourcefn compute_single_signature<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
epoch: Epoch,
message: &'life1 ProtocolMessage,
signers: &'life2 [SignerWithStake]
) -> Pin<Box<dyn Future<Output = StdResult<Option<SingleSignatures>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn compute_single_signature<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
epoch: Epoch,
message: &'life1 ProtocolMessage,
signers: &'life2 [SignerWithStake]
) -> Pin<Box<dyn Future<Output = StdResult<Option<SingleSignatures>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create the single signature.
sourcefn send_single_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_entity_type: &'life1 SignedEntityType,
maybe_signature: Option<SingleSignatures>
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_single_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_entity_type: &'life1 SignedEntityType,
maybe_signature: Option<SingleSignatures>
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send the single signature to the aggregator in order to be aggregated.