mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-14 18:33:10 +00:00
14 lines
373 B
Rust
14 lines
373 B
Rust
|
|
use bedrock_client::BedrockClient;
|
||
|
|
use futures::Stream;
|
||
|
|
use url::Url;
|
||
|
|
|
||
|
|
pub struct IndexerCore {
|
||
|
|
pub bedrock_client: BedrockClient,
|
||
|
|
pub bedrock_url: Url,
|
||
|
|
}
|
||
|
|
|
||
|
|
impl IndexerCore {
|
||
|
|
pub async fn subscribe_block_stream(&self) -> Result<impl Stream<Item = BlockInfo>, bedrock_client::Error> {
|
||
|
|
self.bedrock_client.0.get_lib_stream(self.bedrock_url).await
|
||
|
|
}
|
||
|
|
}
|