kona_derive_alloy::beacon_client

Trait BeaconClient

Source
pub trait BeaconClient {
    type Error: Display + ToString;

    // Required methods
    fn config_spec<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<APIConfigResponse, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn beacon_genesis<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<APIGenesisResponse, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn beacon_blob_side_cars<'life0, 'life1, 'async_trait>(
        &'life0 self,
        slot: u64,
        hashes: &'life1 [IndexedBlobHash],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<BlobData>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The BeaconClient is a thin wrapper around the Beacon API.

Required Associated Types§

Source

type Error: Display + ToString

The error type for BeaconClient implementations.

Required Methods§

Source

fn config_spec<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<APIConfigResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the config spec.

Source

fn beacon_genesis<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<APIGenesisResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the beacon genesis.

Source

fn beacon_blob_side_cars<'life0, 'life1, 'async_trait>( &'life0 self, slot: u64, hashes: &'life1 [IndexedBlobHash], ) -> Pin<Box<dyn Future<Output = Result<Vec<BlobData>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetches blob sidecars that were confirmed in the specified L1 block with the given indexed hashes. Order of the returned sidecars is guaranteed to be that of the hashes. Blob data is not checked for validity.

Implementors§