chore(deps): bump jsonrpsee v0.20 to v0.21 (#1347)

* chore(deps): bump jsonrpsee v0.20 to v0.21

* fix build

* update Cargo.lock in wasm-tests
This commit is contained in:
Niklas Adolfsson
2024-01-12 10:48:44 +01:00
committed by GitHub
parent fc5a18aaa0
commit ee95026186
13 changed files with 1093 additions and 794 deletions
+6 -2
View File
@@ -5,7 +5,6 @@
use super::{rpc::LightClientRpc, LightClient, LightClientError};
use crate::backend::rpc::RpcClient;
use crate::client::RawLightClient;
use crate::error::RpcError;
use crate::utils::validate_url_is_secure;
use crate::{config::Config, error::Error, OnlineClient};
use std::num::NonZeroU32;
@@ -259,11 +258,16 @@ async fn fetch_url(url: impl AsRef<str>) -> Result<serde_json::Value, Error> {
#[cfg(all(feature = "jsonrpsee", feature = "native"))]
mod jsonrpsee_helpers {
use crate::error::{Error, LightClientError};
use tokio_util::compat::Compat;
pub use jsonrpsee::{
client_transport::ws::{Receiver, Sender, Url, WsTransportClientBuilder},
client_transport::ws::{self, EitherStream, Url, WsTransportClientBuilder},
core::client::Client,
};
pub type Sender = ws::Sender<Compat<EitherStream>>;
pub type Receiver = ws::Receiver<Compat<EitherStream>>;
/// Build WS RPC client from URL
pub async fn client(url: &str) -> Result<Client, Error> {
let url = Url::parse(url).map_err(|_| Error::LightClient(LightClientError::InvalidUrl))?;