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

#4 in #storage-key

Download history 350/week @ 2024-12-24 308/week @ 2024-12-31 1028/week @ 2025-01-07 1317/week @ 2025-01-14 1690/week @ 2025-01-21 1638/week @ 2025-01-28 1104/week @ 2025-02-04 1223/week @ 2025-02-11 1160/week @ 2025-02-18 1242/week @ 2025-02-25 681/week @ 2025-03-04 926/week @ 2025-03-11 683/week @ 2025-03-18 426/week @ 2025-03-25 1603/week @ 2025-04-01 1472/week @ 2025-04-08

4,270 downloads per month
Used in 8 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

~77–115MB
~2M SLoC