Expose RpcClient and RestClient interfaces as pub
[rust-lightning] / lightning-block-sync / src / rpc.rs
index 34cbd2e02c028eb51a364f431f509cabdee4c4c0..d59401e0f1c090d084f811cc6b9d8be731887ff9 100644 (file)
@@ -34,7 +34,7 @@ impl RpcClient {
        }
 
        /// Calls a method with the response encoded in JSON format and interpreted as type `T`.
-       async fn call_method<T>(&mut self, method: &str, params: &[serde_json::Value]) -> std::io::Result<T>
+       pub async fn call_method<T>(&mut self, method: &str, params: &[serde_json::Value]) -> std::io::Result<T>
        where JsonResponse: TryFrom<Vec<u8>, Error = std::io::Error> + TryInto<T, Error = std::io::Error> {
                let host = format!("{}:{}", self.endpoint.host(), self.endpoint.port());
                let uri = self.endpoint.path();