{"id":38738702,"url":"https://github.com/semiotic-ai/firehose-rs","last_synced_at":"2026-01-17T11:35:09.076Z","repository":{"id":332289859,"uuid":"895292460","full_name":"semiotic-ai/firehose-rs","owner":"semiotic-ai","description":"StreamingFast Firehose client components compiled to Rust","archived":false,"fork":false,"pushed_at":"2025-12-02T16:31:19.000Z","size":103,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-13T10:30:06.977Z","etag":null,"topics":["grpc","protobuf","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/firehose-rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semiotic-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-27T23:42:13.000Z","updated_at":"2025-12-02T16:31:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/semiotic-ai/firehose-rs","commit_stats":null,"previous_names":["semiotic-ai/firehose-rs"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/semiotic-ai/firehose-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiotic-ai%2Ffirehose-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiotic-ai%2Ffirehose-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiotic-ai%2Ffirehose-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiotic-ai%2Ffirehose-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semiotic-ai","download_url":"https://codeload.github.com/semiotic-ai/firehose-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semiotic-ai%2Ffirehose-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28507764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T10:25:30.148Z","status":"ssl_error","status_checked_at":"2026-01-17T10:25:29.718Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grpc","protobuf","rust"],"created_at":"2026-01-17T11:35:08.490Z","updated_at":"2026-01-17T11:35:09.061Z","avatar_url":"https://github.com/semiotic-ai.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# firehose-rs\n\n[![Crates.io](https://img.shields.io/crates/v/firehose-rs.svg)](https://crates.io/crates/firehose-rs)\n[![Documentation](https://docs.rs/firehose-rs/badge.svg)](https://docs.rs/firehose-rs)\n[![License](https://img.shields.io/crates/l/firehose-rs.svg)](LICENSE)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/semiotic-ai/firehose-rs/tests.yml?branch=main)](https://github.com/semiotic-ai/firehose-rs/actions)\n[![REUSE status](https://api.reuse.software/badge/github.com/semiotic-ai/firehose-rs)](https://api.reuse.software/info/github.com/semiotic-ai/firehose-rs)\n\nA Rust client library for [StreamingFast's Firehose protocol](https://firehose.streamingfast.io/), providing gRPC bindings for streaming and fetching blockchain data.\n\n## Features\n\n- **gRPC client bindings** for Firehose v2 API\n- **Streaming support** via `StreamClient` for continuous block sequences\n- **Fetch support** via `FetchClient` for individual block retrieval\n- **Serde integration** for JSON serialization of all message types\n- **Flexible block requests** by number, hash, or cursor\n\n## Installation\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\nfirehose-rs = \"0.3\"\n```\n\n### Build Requirements\n\n**Protoc compiler must be installed** - the build script compiles protocol buffer definitions to generate gRPC code. Install via:\n\n```bash\n# macOS\nbrew install protobuf\n\n# Ubuntu/Debian\napt install protobuf-compiler\n\n# Or download from https://github.com/protocolbuffers/protobuf/releases\n```\n\n## Quick Start\n\n### Streaming Blocks\n\n```rust\nuse firehose_rs::{StreamClient, Request};\nuse tonic::transport::Channel;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Connect to a Firehose endpoint\n    let channel = Channel::from_static(\"https://your-firehose-endpoint:443\")\n        .connect()\n        .await?;\n\n    let mut client = StreamClient::new(channel);\n\n    // Create a streaming request starting from block 1000\n    let request = Request {\n        start_block_num: 1000,\n        stop_block_num: 2000,\n        final_blocks_only: true,\n        ..Default::default()\n    };\n\n    // Stream blocks\n    let mut stream = client.blocks(request).await?.into_inner();\n\n    while let Some(response) = stream.message().await? {\n        println!(\"Received block at cursor: {}\", response.cursor);\n    }\n\n    Ok(())\n}\n```\n\n### Fetching a Single Block\n\n```rust\nuse firehose_rs::{FetchClient, SingleBlockRequest};\nuse tonic::transport::Channel;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let channel = Channel::from_static(\"https://your-firehose-endpoint:443\")\n        .connect()\n        .await?;\n\n    let mut client = FetchClient::new(channel);\n\n    // Fetch block by number\n    let request = SingleBlockRequest::new_by_block_number(12345);\n    let response = client.block(request).await?;\n\n    println!(\"Fetched block: {:?}\", response.into_inner().block);\n\n    Ok(())\n}\n```\n\n### Fetching by Hash and Number\n\n```rust\nuse firehose_rs::SingleBlockRequest;\n\n// Fetch a specific block by its hash and number\nlet request = SingleBlockRequest::new_by_block_hash_and_number(\n    \"0xabc123...\".to_string(),\n    12345,\n);\n```\n\n## API Overview\n\n### Clients\n\n| Client | Description |\n|--------|-------------|\n| `StreamClient` | Streaming RPC for continuous block sequences |\n| `FetchClient` | Unary RPC for individual block retrieval |\n\n### Request Types\n\n| Type | Description |\n|------|-------------|\n| `Request` | Streaming request with start/stop block configuration |\n| `SingleBlockRequest` | Single block request by number, hash, or cursor |\n\n### Response Types\n\n| Type | Description |\n|------|-------------|\n| `Response` | Streaming response with block data and cursor |\n| `SingleBlockResponse` | Single block fetch response |\n\n### Traits\n\n| Trait | Description |\n|-------|-------------|\n| `HasNumberOrSlot` | Unified access to block number or slot |\n| `FromResponse` | Convert protobuf responses to domain types |\n\n## Protocol Reference\n\nThis library implements the [Firehose v2 protocol](https://github.com/streamingfast/proto/blob/develop/sf/firehose/v2/firehose.proto) by StreamingFast.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'feat: add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Development\n\n```bash\n# Run tests\ncargo test --all-features\n\n# Run lints\ncargo clippy --all-targets --all-features -- -D warnings\n\n# Check formatting\ncargo fmt --all -- --check\n```\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\nThe protocol buffer definitions in `protos/` are from [StreamingFast](https://github.com/streamingfast/proto) and are also licensed under Apache 2.0.\n\n## Acknowledgments\n\n- [StreamingFast](https://www.streamingfast.io/) for creating the Firehose protocol\n- [Tonic](https://github.com/hyperium/tonic) for the excellent gRPC framework\n- [Prost](https://github.com/tokio-rs/prost) for protocol buffer support\n\n## Resources\n\n- [Firehose Documentation](https://firehose.streamingfast.io/)\n- [API Reference](https://docs.rs/firehose-rs)\n- [GitHub Repository](https://github.com/semiotic-ai/firehose-rs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemiotic-ai%2Ffirehose-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemiotic-ai%2Ffirehose-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemiotic-ai%2Ffirehose-rs/lists"}