diff --git a/src/lib.rs b/src/lib.rs index 170800f589..a8b8f6936c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -353,6 +353,11 @@ impl Client { &self.properties } + /// Returns the rpc client. + pub fn rpc_client(&self) -> &RpcClient { + &self.rpc.client + } + /// Fetch the value under an unhashed storage key pub async fn fetch_unhashed( &self, diff --git a/src/rpc.rs b/src/rpc.rs index 75c67b22d5..22b8e7e310 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -258,7 +258,8 @@ pub struct ReadProof { /// Client for substrate rpc interfaces pub struct Rpc { - client: RpcClient, + /// Rpc client for sending requests. + pub client: RpcClient, marker: PhantomData, accept_weak_inclusion: bool, }