pub trait AuthoritySelectionDataSource {
// Required methods
fn get_ariadne_parameters<'life0, 'async_trait>(
&'life0 self,
epoch_number: McEpochNumber,
d_parameter: PolicyId,
permissioned_candidates: PolicyId,
) -> Pin<Box<dyn Future<Output = Result<AriadneParameters, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_candidates<'life0, 'async_trait>(
&'life0 self,
epoch: McEpochNumber,
committee_candidate_address: MainchainAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<CandidateRegistrations>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_epoch_nonce<'life0, 'async_trait>(
&'life0 self,
epoch: McEpochNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<EpochNonce>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn data_epoch<'life0, 'async_trait>(
&'life0 self,
for_epoch: McEpochNumber,
) -> Pin<Box<dyn Future<Output = Result<McEpochNumber, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Queries about the Authority Candidates
Required Methods§
Sourcefn get_ariadne_parameters<'life0, 'async_trait>(
&'life0 self,
epoch_number: McEpochNumber,
d_parameter: PolicyId,
permissioned_candidates: PolicyId,
) -> Pin<Box<dyn Future<Output = Result<AriadneParameters, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ariadne_parameters<'life0, 'async_trait>(
&'life0 self,
epoch_number: McEpochNumber,
d_parameter: PolicyId,
permissioned_candidates: PolicyId,
) -> Pin<Box<dyn Future<Output = Result<AriadneParameters, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns D-parameter and list of permissioned candidates that is effective for the given epoch.
The data from the latest block of data_epoch(epoch)
will be used if available, otherwise returns data at the latest block of the chain.
Sourcefn get_candidates<'life0, 'async_trait>(
&'life0 self,
epoch: McEpochNumber,
committee_candidate_address: MainchainAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<CandidateRegistrations>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_candidates<'life0, 'async_trait>(
&'life0 self,
epoch: McEpochNumber,
committee_candidate_address: MainchainAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<CandidateRegistrations>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the list of registrations that is effective for the given epoch.
The data from the latest block of data_epoch(epoch)
will be used if available, otherwise returns data at the latest block of the chain.
Each item is a list of one candidate registrations.
Sourcefn get_epoch_nonce<'life0, 'async_trait>(
&'life0 self,
epoch: McEpochNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<EpochNonce>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_epoch_nonce<'life0, 'async_trait>(
&'life0 self,
epoch: McEpochNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<EpochNonce>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns Cardano Epoch Nonce. None, if the nonce for given epoch is not known yet.
Sourcefn data_epoch<'life0, 'async_trait>(
&'life0 self,
for_epoch: McEpochNumber,
) -> Pin<Box<dyn Future<Output = Result<McEpochNumber, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn data_epoch<'life0, 'async_trait>(
&'life0 self,
for_epoch: McEpochNumber,
) -> Pin<Box<dyn Future<Output = Result<McEpochNumber, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
§Arguments
for_epoch
: main chain epoch number during which candidate data is meant to be used
returns: Result<McEpochNumber, Box<dyn std::error::Error + Send + Sync>> - data source methods called with for_epoch
will query only for data which was stored on main chain in the returned epoch or earlier