Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
📝 About The Project
Fuel Streams is a Rust library designed for working with streams of Fuel blockchain data. It provides an efficient and user-friendly interface for developers to interact with real-time and historical blockchain data, offering support for Fuel-specific data types and leveraging NATS for scalable streaming.
🚀 Features
- Real-time streaming of Fuel blockchain data
- Historical streaming of Fuel blockchain data
- Support for Fuel-specific data types
- Efficient data handling using NATS
- Easy-to-use API for subscribing to and processing blockchain events
- Customizable filters for targeted data retrieval
- Seamless integration with other Fuel ecosystem tools
🛠️ Installing
First, add these dependencies to your project:
📊 Usage
Here are some examples to get you started with Fuel Streams:
Basic Connection and Subscription
use *;
use StreamExt;
async
Subject Types and Filtering
Each data type has its own subject builder for filtering. Here's an example using transaction filtering:
use *;
use StreamExt;
async
Available subject builders include:
BlocksSubject::new()TransactionsSubject::new()InputsSubject::new()OutputsSubject::new()LogsSubject::new()UtxosSubject::new()
Each subject builder provides specific filtering methods relevant to its data type. For example, TransactionsSubject allows filtering by transaction type using the with_tx_type() method.
Multiple Subscriptions
The Fuel Streams library allows you to subscribe to multiple types of data simultaneously. You can create instances of different subjects, such as BlocksSubject and TransactionsSubject, and pass them as a vector to the subscribe method:
use *;
use StreamExt;
async
DeliverPolicy Options
The DeliverPolicy enum provides control over message Deliver in your subscriptions:
New: Delivers only new messages that arrive after subscriptionFromHeight(u64): Delivers messages starting from a specific block height
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
For more information on contributing, please see the CONTRIBUTING.md file in the root of the repository.
📜 License
This project is licensed under the Apache-2.0 license. See LICENSE for more information.