# shredlink-proto
Protocol buffer definitions for Shredlink gRPC services - a fast path to receive Solana blockchain shreds and transactions.
## Features
- gRPC service definitions for subscribing to Solana entries and transactions
- Filter-based transaction subscription with account-level filtering
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
shredlink-proto = "0.1"
tonic = "0.10"
tokio = { version = "1.0", features = ["full"] }
```
### Client Example
```rust
use shredlink_proto::shredlink::{
shredlink_service_client::ShredlinkServiceClient,
SubscribeEntriesRequest
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = ShredlinkServiceClient::connect("http://127.0.0.1:50051").await?;
let request = SubscribeEntriesRequest {};
let mut stream = client.subscribe_entries(request).await?.into_inner();
while let Some(entry) = stream.message().await? {
println!("Received entry for slot: {}", entry.slot);
}
Ok(())
}
## Services
- **SubscribeEntries**: Stream Solana entries by slot
- **SubscribeTransactions**: Stream filtered transactions with account-based filtering
## License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
## Links
- Repository: https://github.com/romanbobelyuk/shredlink
- Documentation: https://shredlink.xyz