37 breaking releases

0.48.0 Apr 3, 2025
0.47.0 Jan 29, 2025
0.46.0 Jan 14, 2025
0.44.0 Sep 26, 2024
0.0.0 Nov 21, 2022

#6 in #storage-key

Download history 894/week @ 2025-01-05 1262/week @ 2025-01-12 1771/week @ 2025-01-19 1684/week @ 2025-01-26 955/week @ 2025-02-02 1372/week @ 2025-02-09 1160/week @ 2025-02-16 1208/week @ 2025-02-23 788/week @ 2025-03-02 943/week @ 2025-03-09 686/week @ 2025-03-16 437/week @ 2025-03-23 1134/week @ 2025-03-30 1905/week @ 2025-04-06 2243/week @ 2025-04-13 1330/week @ 2025-04-20

6,625 downloads per month
Used in 9 crates (3 directly)

Apache-2.0 and GPL-3.0-or-later…

1MB
9K SLoC

Shared JSON-RPC client related code and abstractions.

It exposes a WebSocket JSON-RPC client that implements the RPC interface in sc-rpc-api along with some abstractions.

Usage


#[tokio::main]
async fn main() {

    let client = ws_client("ws://127.0.0.1:9944").await.unwrap();
    client.storage(StorageKey(vec![]), Some(H256::zero())).await.unwrap();

    // if all type params are not known you need to provide type params
    StateApi::<H256>::storage(&client, StorageKey(vec![]), None).await.unwrap();
}

Dependencies

~78–115MB
~2M SLoC