pub struct Client { /* private fields */ }Expand description
The main entry point for fetching EVM data over JSON-RPC.
Wraps an alloy RPC provider and routes queries to the appropriate pipeline (blocks, logs, traces, or a coordinated combination).
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(config: ClientConfig) -> Result<Self>
pub fn new(config: ClientConfig) -> Result<Self>
Create a new client from configuration.
This sets up the alloy RPC provider with retry/backoff layers.
Sourcepub fn config(&self) -> &ClientConfig
pub fn config(&self) -> &ClientConfig
Return a reference to the client’s configuration.
Sourcepub fn stream(&self, query: Query) -> Result<DataStream>
pub fn stream(&self, query: Query) -> Result<DataStream>
Start a streaming query that yields ArrowResponse chunks.
Selects the appropriate pipeline based on the query:
- If the query requires, uses the coordinated multi-pipeline stream.
- If only blocks and/or tx, uses the
eth_getBlockByNumberpipeline. - If only log requests are present, uses the
eth_getLogspipeline. - If only trace requests are present, uses the
trace_blockpipeline.
Sourcepub fn response_to_btree(
response: ArrowResponse,
) -> BTreeMap<String, RecordBatch>
pub fn response_to_btree( response: ArrowResponse, ) -> BTreeMap<String, RecordBatch>
Convert an ArrowResponse into the BTreeMap<String, RecordBatch>
format expected by the tiders-core ingest pipeline.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more