1pub mod fetch;
8
9mod quantity;
10mod routing;
11mod transport;
12
13pub use quantity::{QuantityError, U256, parse_quantity};
14pub use routing::{Endpoint, RouteError, Routing, parse_use_pathing};
15pub use transport::{BatchResult, MAX_BATCH_CALLS, RemoteError, RpcError, Transport};
16
17#[cfg(not(target_arch = "wasm32"))]
18mod dyn_transport;
19#[cfg(not(target_arch = "wasm32"))]
20pub use dyn_transport::DynTransport;
21
22#[cfg(all(feature = "http", not(target_arch = "wasm32")))]
23mod http;
24#[cfg(all(feature = "http", not(target_arch = "wasm32")))]
25pub use http::{HttpConfig, HttpProxy, HttpTransport};
26
27#[cfg(all(feature = "ws", not(target_arch = "wasm32")))]
28mod websocket;
29#[cfg(all(feature = "ws", not(target_arch = "wasm32")))]
30pub use websocket::{WsConfig, WsSubscription, WsSubscriptionKind, WsTransport};
31
32#[cfg(feature = "fuzzing")]
40#[doc(hidden)]
41pub mod fuzz_internals {
42 #[cfg(all(feature = "http", not(target_arch = "wasm32")))]
44 pub fn decode_response(
45 bytes: &[u8],
46 expected_id: u64,
47 ) -> Result<serde_json::Value, crate::RpcError> {
48 crate::transport::decode_response(bytes, expected_id)
49 }
50
51 #[cfg(all(feature = "http", not(target_arch = "wasm32")))]
53 pub fn decode_batch(bytes: &[u8], first: u64, count: usize) -> crate::BatchResult {
54 crate::http::decode_batch(bytes, first, count)
55 }
56
57 #[cfg(all(feature = "ws", not(target_arch = "wasm32")))]
60 pub fn dispatch_frames(layout: u8, frames: &[&[u8]]) {
61 crate::websocket::fuzz_dispatch(layout, frames)
62 }
63}