alloy_provider/
lib.rs

1#![doc = include_str!("../README.md")]
2#![doc(
3    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
4    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
5)]
6#![cfg_attr(not(test), warn(unused_crate_dependencies))]
7#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
8
9// For features.
10#[cfg(any(feature = "reqwest", feature = "hyper"))]
11use alloy_transport_http as _;
12
13/// Type alias for a [`RootProvider`] using the [`Http`] transport and a
14/// reqwest client.
15///
16/// [`Http`]: alloy_transport_http::Http
17#[cfg(any(test, feature = "reqwest"))]
18#[deprecated(since = "0.9.0", note = "use `RootProvider` instead")]
19pub type ReqwestProvider<N = alloy_network::Ethereum> = crate::RootProvider<N>;
20
21/// Type alias for a [`RootProvider`] using the [`Http`] transport and a hyper
22/// client.
23///
24/// [`Http`]: alloy_transport_http::Http
25#[cfg(feature = "hyper")]
26#[deprecated(since = "0.9.0", note = "use `RootProvider` instead")]
27pub type HyperProvider<N = alloy_network::Ethereum> = crate::RootProvider<N>;
28
29#[macro_use]
30extern crate tracing;
31
32mod builder;
33pub use builder::{Identity, ProviderBuilder, ProviderLayer, Stack};
34
35mod blocks;
36
37pub mod ext;
38
39pub mod fillers;
40
41mod heart;
42pub use heart::{
43    PendingTransaction, PendingTransactionBuilder, PendingTransactionConfig,
44    PendingTransactionError, WatchTxError,
45};
46
47pub mod layers;
48
49mod provider;
50pub use provider::{
51    bindings, builder, BoxedFut, CallInfoTrait, CallItem, CallItemBuilder, CallTuple, Caller,
52    DynProvider, Dynamic, Empty, EthCall, EthCallMany, EthCallManyParams, EthCallParams,
53    EthGetBlock, EthGetBlockParams, Failure, FilterPollerBuilder, MulticallBuilder, MulticallError,
54    MulticallItem, ParamsWithBlock, Provider, ProviderCall, Result, RootProvider, RpcWithBlock,
55    SendableTx, SendableTxErr, WalletProvider, MULTICALL3_ADDRESS,
56};
57
58pub mod utils;
59
60#[doc(no_inline)]
61pub use alloy_network::{self as network, Network};
62
63#[cfg(feature = "ws")]
64pub use alloy_rpc_client::WsConnect;
65
66#[cfg(feature = "ipc")]
67pub use alloy_rpc_client::IpcConnect;