mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
implement session handling for unsubscribe in subxt-client (#242)
* implement session handling for unsubscribe in subxt-client Signed-off-by: Gregory Hill <gregorydhill@outlook.com> * update jsonrpsee to `v0.2.0-alpha.2` Closes #241 * use new jsonrpsee request message types in subxt client Signed-off-by: Gregory Hill <gregorydhill@outlook.com> Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
This commit is contained in:
@@ -171,6 +171,7 @@ pub enum RpcClient {
|
||||
}
|
||||
|
||||
impl RpcClient {
|
||||
/// Start a JSON-RPC request.
|
||||
pub async fn request<T: DeserializeOwned>(
|
||||
&self,
|
||||
method: &str,
|
||||
@@ -186,6 +187,7 @@ impl RpcClient {
|
||||
}
|
||||
}
|
||||
|
||||
/// Start a JSON-RPC Subscription.
|
||||
pub async fn subscribe<T: DeserializeOwned>(
|
||||
&self,
|
||||
subscribe_method: &str,
|
||||
|
||||
Reference in New Issue
Block a user