pub trait ChainBlocks: MaybeSend + MaybeSync {
// Required methods
fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BlockStamp, VerifierError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn timestamp<'life0, 'life1, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
number: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<u64, VerifierError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Read access to chain blocks, keyed by eip155:<chain> identifier.
Admission uses it to judge how fresh a signature’s stated block is. An
unrouted chain or failed call is a retryable VerifierError, never a
verdict on the signature.
Required Methods§
Sourcefn head<'life0, 'life1, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BlockStamp, VerifierError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BlockStamp, VerifierError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The chain’s head block.
Sourcefn timestamp<'life0, 'life1, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
number: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<u64, VerifierError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn timestamp<'life0, 'life1, 'async_trait>(
&'life0 self,
chain_id: &'life1 str,
number: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<u64, VerifierError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The timestamp of block number, which the caller has seen at or below the head.
Implementors§
impl ChainBlocks for MultiSmartContractSignatureVerifier
impl ChainBlocks for RpcSmartContractWalletVerifier
One provider serves one chain, so the chain id is already resolved.