pub trait OffchainWorkerApi<Block>: Core<Block>where
    Block: Block,{
    // Provided methods
    fn offchain_worker_before_version_2(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        number: <<Block as Block>::Header as Header>::Number
    ) -> Result<(), ApiError> { ... }
    fn offchain_worker_before_version_2_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        number: <<Block as Block>::Header as Header>::Number
    ) -> Result<(), ApiError> { ... }
    fn offchain_worker(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        header: &<Block as Block>::Header
    ) -> Result<(), ApiError> { ... }
    fn offchain_worker_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext,
        header: &<Block as Block>::Header
    ) -> Result<(), ApiError> { ... }
}
Expand description

The offchain worker api.

Provided Methods§

source

fn offchain_worker_before_version_2( &self, __runtime_api_at_param__: &BlockId<Block>, number: <<Block as Block>::Header as Header>::Number ) -> Result<(), ApiError>

👎Deprecated

Starts the off-chain task for given block number.

source

fn offchain_worker_before_version_2_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, number: <<Block as Block>::Header as Header>::Number ) -> Result<(), ApiError>

👎Deprecated

Starts the off-chain task for given block number.

source

fn offchain_worker( &self, __runtime_api_at_param__: &BlockId<Block>, header: &<Block as Block>::Header ) -> Result<(), ApiError>

Starts the off-chain task for given block header.

source

fn offchain_worker_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext, header: &<Block as Block>::Header ) -> Result<(), ApiError>

Starts the off-chain task for given block header.

Trait Implementations§

source§

impl<Block> RuntimeApiInfo for dyn OffchainWorkerApi<Block>where Block: Block,

source§

const ID: [u8; 8] = [247u8, 139u8, 39u8, 139u8, 229u8, 63u8, 69u8, 76u8]

The identifier of the runtime api.
source§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§