alloy_provider::ext

Trait RpcApi

source
pub trait RpcApi<N, T>: Send + Sync {
    // Required method
    fn rpc_modules<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = TransportResult<RpcModules>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature rpc-api only.
Expand description

The rpc API provides methods to get information about the RPC server itself, such as the enabled namespaces.

Required Methods§

source

fn rpc_modules<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<RpcModules>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lists the enabled RPC namespaces and the versions of each.

Implementors§

source§

impl<N, T, P> RpcApi<N, T> for P
where N: Network, T: Transport + Clone, P: Provider<T, N>,