Expand description
Returns the ordered validators of a block.
§Example
Returns the ordered validators for this block.
use near_jsonrpc_client::{methods, JsonRpcClient};
use near_primitives::types::BlockId;
let client = JsonRpcClient::connect("https://archival-rpc.mainnet.near.org");
let request = methods::EXPERIMENTAL_validators_ordered::RpcValidatorsOrderedRequest {
block_id: Some(BlockId::Hash("Brj839ta6ffccCvDcXzEh7iRak2jCxuc7M3U1cEmRH9k".parse()?))
};
let response = client.call(request).await?;
assert!(matches!(
response,
methods::EXPERIMENTAL_validators_ordered::RpcValidatorsOrderedResponse { .. }
));