-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blocks - Implement subjects on core #91
Labels
Comments
pedronauck
changed the title
Implement Subject and Filters for blocks in the SDK
Blocks - Implement subjects on core
Aug 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Implement the
Subject::Blocks
variant and correspondingFilter
methods in the SDK to allow users to subscribe to and filter block data streams. This will enable specific querying and filtering of block information. The implementation should translate filters into the correct NATS subject pattern:blocks.{producer}.{height}
.Tasks
Blocks
variant to theSubject
enum if not already presentFilter<Subject::Blocks>
specializationFilter<Subject::Blocks>
:with_producer(producer: String) -> Self
with_height(height: BlockHeight) -> Self
Filter<Subject::Blocks>
to NATS subject strings, following the patternblocks.{producer}.{height}
Subscription
Technical Details
Ensure each method can be called just once in the builder
BlockHeight
type (likely as a type alias foru32
or similar)blocks.{producer}.{height}
patternAdditional Notes
Filter::<Subject::Blocks>::new().with_producer("0x1234...").with_height(1000)
blocks.0x1234....1000
Definition of Done
The text was updated successfully, but these errors were encountered: