chronicle::runtimeTrait Runtime
Source pub trait Runtime:
Send
+ Sync
+ 'static {
Show 24 methods
// Required methods
fn public_key(&self) -> &PublicKey;
fn account_id(&self) -> &AccountId;
fn balance<'life0, 'life1, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<u128>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn block_notification_stream(
&self,
) -> BoxStream<'static, (BlockHash, BlockNumber)>;
fn finality_notification_stream(
&self,
) -> BoxStream<'static, (BlockHash, BlockNumber)>;
fn is_registered<'life0, 'async_trait>(
&'life0 self,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn network<'life0, 'async_trait>(
&'life0 self,
network: NetworkId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Option<ChainName>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn network_gas_price<'life0, 'async_trait>(
&'life0 self,
network: NetworkId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<u128>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn member_peer_id<'life0, 'life1, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Option<PeerId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn heartbeat_timeout<'life0, 'async_trait>(
&'life0 self,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<BlockNumber>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_heartbeat_submitted<'life0, 'life1, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn shards<'life0, 'life1, 'async_trait>(
&'life0 self,
account: &'life1 AccountId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<ShardId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn shard_members<'life0, 'async_trait>(
&'life0 self,
shard_id: ShardId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<(AccountId, MemberStatus)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shard_threshold<'life0, 'async_trait>(
&'life0 self,
shard_id: ShardId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<u16>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shard_status<'life0, 'async_trait>(
&'life0 self,
shard_id: ShardId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<ShardStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shard_commitment<'life0, 'async_trait>(
&'life0 self,
shard_id: ShardId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Option<Commitment>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shard_tasks<'life0, 'async_trait>(
&'life0 self,
shard_id: ShardId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Vec<TaskId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn task<'life0, 'async_trait>(
&'life0 self,
task_id: TaskId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Option<Task>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn batch_message<'life0, 'async_trait>(
&'life0 self,
batch_id: BatchId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Option<GatewayMessage>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn gateway<'life0, 'async_trait>(
&'life0 self,
network: NetworkId,
block: BlockHash,
) -> Pin<Box<dyn Future<Output = Result<Option<Address32>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_heartbeat<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_commitment<'life0, 'async_trait>(
&'life0 self,
shard_id: ShardId,
commitment: Commitment,
proof_of_knowledge: ProofOfKnowledge,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_online<'life0, 'async_trait>(
&'life0 self,
shard_id: ShardId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_task_result<'life0, 'async_trait>(
&'life0 self,
task_id: TaskId,
result: TaskResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}