Trait polkadot_primitives::v0::ParachainHost [−][src]
pub trait ParachainHost<Block: BlockT>: Core<Block> {
Show 18 methods
fn validators(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<Vec<ValidatorId>, ApiError> { ... }
fn validators_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Vec<ValidatorId>, ApiError> { ... }
fn duty_roster(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<DutyRoster, ApiError> { ... }
fn duty_roster_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<DutyRoster, ApiError> { ... }
fn active_parachains(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<Vec<(Id, Option<(CollatorId, Retriable)>)>, ApiError> { ... }
fn active_parachains_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Vec<(Id, Option<(CollatorId, Retriable)>)>, ApiError> { ... }
fn global_validation_data(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<GlobalValidationData, ApiError> { ... }
fn global_validation_data_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<GlobalValidationData, ApiError> { ... }
fn local_validation_data(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Option<LocalValidationData>, ApiError> { ... }
fn local_validation_data_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Option<LocalValidationData>, ApiError> { ... }
fn parachain_code(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Option<ValidationCode>, ApiError> { ... }
fn parachain_code_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Option<ValidationCode>, ApiError> { ... }
fn get_heads(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extrinsics: Vec<<Block as BlockT>::Extrinsic>
) -> Result<Option<Vec<AbridgedCandidateReceipt>>, ApiError> { ... }
fn get_heads_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsics: Vec<<Block as BlockT>::Extrinsic>
) -> Result<Option<Vec<AbridgedCandidateReceipt>>, ApiError> { ... }
fn signing_context(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SigningContext, ApiError> { ... }
fn signing_context_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SigningContext, ApiError> { ... }
fn downward_messages(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Vec<DownwardMessage>, ApiError> { ... }
fn downward_messages_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Vec<DownwardMessage>, ApiError> { ... }
}
Expand description
The API for querying the state of parachains on-chain.
Provided methods
fn validators(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<Vec<ValidatorId>, ApiError>
fn validators(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<Vec<ValidatorId>, ApiError>
Get the current validators.
fn validators_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Vec<ValidatorId>, ApiError>
fn validators_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Vec<ValidatorId>, ApiError>
Get the current validators.
fn duty_roster(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<DutyRoster, ApiError>
fn duty_roster(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<DutyRoster, ApiError>
Get the current duty roster.
fn duty_roster_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<DutyRoster, ApiError>
fn duty_roster_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<DutyRoster, ApiError>
Get the current duty roster.
Get the currently active parachains.
fn active_parachains_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Vec<(Id, Option<(CollatorId, Retriable)>)>, ApiError>
fn active_parachains_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<Vec<(Id, Option<(CollatorId, Retriable)>)>, ApiError>
Get the currently active parachains.
fn global_validation_data(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<GlobalValidationData, ApiError>
fn global_validation_data(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<GlobalValidationData, ApiError>
Get the global validation schedule that all parachains should be validated under.
fn global_validation_data_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<GlobalValidationData, ApiError>
fn global_validation_data_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<GlobalValidationData, ApiError>
Get the global validation schedule that all parachains should be validated under.
fn local_validation_data(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Option<LocalValidationData>, ApiError>
fn local_validation_data(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Option<LocalValidationData>, ApiError>
Get the local validation data for a particular parachain.
fn local_validation_data_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Option<LocalValidationData>, ApiError>
fn local_validation_data_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Option<LocalValidationData>, ApiError>
Get the local validation data for a particular parachain.
fn parachain_code(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Option<ValidationCode>, ApiError>
fn parachain_code(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Option<ValidationCode>, ApiError>
Get the given parachain’s head code blob.
fn parachain_code_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Option<ValidationCode>, ApiError>
fn parachain_code_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Option<ValidationCode>, ApiError>
Get the given parachain’s head code blob.
Extract the abridged head that was set in the extrinsics.
fn get_heads_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsics: Vec<<Block as BlockT>::Extrinsic>
) -> Result<Option<Vec<AbridgedCandidateReceipt>>, ApiError>
fn get_heads_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsics: Vec<<Block as BlockT>::Extrinsic>
) -> Result<Option<Vec<AbridgedCandidateReceipt>>, ApiError>
Extract the abridged head that was set in the extrinsics.
fn signing_context(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SigningContext, ApiError>
fn signing_context(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SigningContext, ApiError>
Get a SigningContext
with current SessionIndex
and parent hash.
fn signing_context_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SigningContext, ApiError>
fn signing_context_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SigningContext, ApiError>
Get a SigningContext
with current SessionIndex
and parent hash.
fn downward_messages(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Vec<DownwardMessage>, ApiError>
fn downward_messages(
&self,
__runtime_api_at_param__: &BlockId<Block>,
id: Id
) -> Result<Vec<DownwardMessage>, ApiError>
Get the DownwardMessage
’s for the given parachain.
fn downward_messages_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Vec<DownwardMessage>, ApiError>
fn downward_messages_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
id: Id
) -> Result<Vec<DownwardMessage>, ApiError>
Get the DownwardMessage
’s for the given parachain.