1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! # Chain Queries
//!
//! Read-only queries against Bittensor blockchain state.
//!
//! This module provides functions for querying:
//!
//! - **Account**: Balances, stake amounts, and stake info
//! - **Metagraph**: Full or selective metagraph data for subnets
//! - **Neurons**: Individual neuron info and UID lookups
//! - **Subnets**: Subnet existence, hyperparameters, and metadata
//!
//! # Example
//!
//! ```rust,ignore
//! use bittensor_rs::queries::{get_metagraph, get_balance, get_neuron};
//!
//! async fn example(client: &subxt::OnlineClient<subxt::PolkadotConfig>, account_id: &subxt::config::polkadot::AccountId32) -> Result<(), Box<dyn std::error::Error>> {
//! // Get metagraph for subnet 1
//! let metagraph = get_metagraph(client, 1).await?;
//!
//! // Check account balance
//! let balance = get_balance(client, account_id).await?;
//!
//! // Get specific neuron by UID
//! let neuron = get_neuron(client, 1, 0).await?;
//! Ok(())
//! }
//! ```
//!
//! All query functions accept a subxt `OnlineClient` and return typed results.
pub use ;
pub use ;
pub use ;
pub use ;