34 breaking releases

0.44.0 Sep 26, 2024
0.43.0 Jul 18, 2024
0.41.0 Jul 13, 2024
0.36.0 Mar 18, 2024
0.0.0 Nov 21, 2022

#47 in #json-rpc-client

Download history 945/week @ 2024-07-25 1017/week @ 2024-08-01 938/week @ 2024-08-08 978/week @ 2024-08-15 1060/week @ 2024-08-22 497/week @ 2024-08-29 494/week @ 2024-09-05 788/week @ 2024-09-12 617/week @ 2024-09-19 1025/week @ 2024-09-26 703/week @ 2024-10-03 660/week @ 2024-10-10 1209/week @ 2024-10-17 863/week @ 2024-10-24 657/week @ 2024-10-31 448/week @ 2024-11-07

3,337 downloads per month
Used in 7 crates (3 directly)

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

475KB
7K SLoC

Release

Polkadot SDK stable2409


lib.rs:

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

~79–120MB
~2.5M SLoC