mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-14 10:23:08 +00:00
fix: indexer crate
This commit is contained in:
parent
6f8a7295c2
commit
324eec24df
31
Cargo.lock
generated
31
Cargo.lock
generated
@ -2864,6 +2864,37 @@ version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ee796ad498c8d9a1d68e477df8f754ed784ef875de1414ebdaf169f70a6a784"
|
||||
|
||||
[[package]]
|
||||
name = "indexer"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
"base58",
|
||||
"base64",
|
||||
"bedrock_client",
|
||||
"borsh",
|
||||
"bytemuck",
|
||||
"clap",
|
||||
"common",
|
||||
"env_logger",
|
||||
"futures",
|
||||
"hex",
|
||||
"indicatif",
|
||||
"itertools 0.14.0",
|
||||
"key_protocol",
|
||||
"log",
|
||||
"nssa",
|
||||
"nssa_core",
|
||||
"rand 0.8.5",
|
||||
"risc0-zkvm",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"tokio",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "1.9.3"
|
||||
|
||||
@ -20,7 +20,8 @@ members = [
|
||||
"examples/program_deployment",
|
||||
"examples/program_deployment/methods",
|
||||
"examples/program_deployment/methods/guest",
|
||||
"bedrock_client",
|
||||
"bedrock_client",
|
||||
"indexer",
|
||||
]
|
||||
|
||||
[workspace.dependencies]
|
||||
@ -35,6 +36,8 @@ sequencer_rpc = { path = "sequencer_rpc" }
|
||||
sequencer_runner = { path = "sequencer_runner" }
|
||||
wallet = { path = "wallet" }
|
||||
test_program_methods = { path = "test_program_methods" }
|
||||
bedrock_client = { path = "bedrock_client" }
|
||||
indexer = { path = "indexer" }
|
||||
|
||||
tokio = { version = "1.28.2", features = [
|
||||
"net",
|
||||
|
||||
32
indexer/Cargo.toml
Normal file
32
indexer/Cargo.toml
Normal file
@ -0,0 +1,32 @@
|
||||
[package]
|
||||
name = "indexer"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
nssa_core.workspace = true
|
||||
nssa.workspace = true
|
||||
common.workspace = true
|
||||
bedrock_client.workspace = true
|
||||
key_protocol.workspace = true
|
||||
|
||||
anyhow.workspace = true
|
||||
serde_json.workspace = true
|
||||
env_logger.workspace = true
|
||||
log.workspace = true
|
||||
serde.workspace = true
|
||||
tokio.workspace = true
|
||||
clap.workspace = true
|
||||
base64.workspace = true
|
||||
bytemuck.workspace = true
|
||||
borsh.workspace = true
|
||||
base58.workspace = true
|
||||
hex.workspace = true
|
||||
rand.workspace = true
|
||||
itertools.workspace = true
|
||||
sha2.workspace = true
|
||||
futures.workspace = true
|
||||
async-stream = "0.3.6"
|
||||
indicatif = { version = "0.18.3", features = ["improved_unicode"] }
|
||||
risc0-zkvm.workspace = true
|
||||
url.workspace = true
|
||||
14
indexer/src/lib.rs
Normal file
14
indexer/src/lib.rs
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user