1 unstable release
| 0.44.0 | Dec 30, 2025 |
|---|
#4 in #rpcs
79 downloads per month
Used in 15 crates
(3 directly)
245KB
4.5K
SLoC
This crate provides a low level RPC interface to Bizinikiwi based nodes.
See the client module for a client::RpcClient which is driven by implementations
of client::RpcClientT (several of which are provided behind feature flags).
See the methods module for structs which implement sets of concrete RPC calls for
communicating with Bizinikiwi based nodes. These structs are all driven by a
client::RpcClient.
The RPC clients/methods here are made use of in subxt. Enabling the subxt feature flag
ensures that all Subxt configurations are also valid RPC configurations.
The provided RPC client implementations can be used natively (with the default native feature
flag) or in WASM based web apps (with the web feature flag).
subxt-rpcs
This crate provides an interface for interacting with Bizinikiwi nodes via the available RPC methods.
use subxt_rpcs::{RpcClient, ChainHeadRpcMethods};
// Connect to a local node:
let client = RpcClient::from_url("ws://127.0.0.1:9944").await?;
// Use a set of methods, here the V2 "chainHead" ones:
let methods = ChainHeadRpcMethods::new(client);
// Call some RPC methods (in this case a subscription):
let mut follow_subscription = methods.chainhead_v1_follow(false).await.unwrap();
while let Some(follow_event) = follow_subscription.next().await {
// do something with events..
}
Dependencies
~12–33MB
~410K SLoC