Skip to main content

ic_query/
lib.rs

1//! Reusable report models and helpers for Internet Computer metadata queries.
2//!
3//! The default feature set is empty. A dependency using
4//! `default-features = false` gets the pure report DTOs, renderers, and local
5//! parsing/resolution helpers that are intended to stay free of native
6//! live-call dependencies.
7//!
8//! This is a host dependency boundary, not a `no_std` promise. No-default
9//! builds are expected to compile for `wasm32-unknown-unknown` without
10//! `ic-agent`, Reqwest, Tokio, or `futures`, but they may still use ordinary
11//! `std` types such as `String` and `Vec`.
12//!
13//! Enable `dashboard-host` for official Dashboard live/cache APIs,
14//! `icrc-host` for native ICRC ledger/index APIs, `sns-host` for native SNS
15//! live/cache APIs, `cmc-host` for certified Cycles Minting Canister reports,
16//! `subnet-catalog-host` for the focused live/cache Subnet catalog API,
17//! `nns-topology-host` for that API plus exact-version joined NNS Subnet
18//! topology, `nns-host` for the complete NNS host surface, or `host` for every
19//! native live-call adapter and runtime helper. CLI parsing and process IO
20//! belong to the separate `ic-query-cli` crate.
21
22#[cfg(any(
23    feature = "cmc-host",
24    feature = "icrc-host",
25    feature = "sns-host",
26    feature = "subnet-catalog-host"
27))]
28mod agent;
29pub mod cache;
30#[cfg(any(
31    feature = "dashboard-host",
32    feature = "icrc-host",
33    feature = "nns-host",
34    feature = "sns-host",
35    feature = "subnet-catalog-host"
36))]
37mod cache_file;
38#[cfg(any(feature = "cmc-host", feature = "icrc-host"))]
39mod certification;
40pub mod duration;
41#[cfg(any(
42    feature = "dashboard-host",
43    feature = "icrc-host",
44    feature = "nns-host",
45    feature = "sns-host",
46    feature = "subnet-catalog-host"
47))]
48mod freshness;
49mod hex;
50#[cfg(any(
51    feature = "cmc-host",
52    feature = "dashboard-host",
53    feature = "icrc-host",
54    feature = "nns-host",
55    feature = "sns-host",
56    feature = "subnet-catalog-host"
57))]
58mod http_endpoint;
59mod human_quantity;
60pub mod ic;
61#[cfg(feature = "subnet-catalog-host")]
62mod ic_registry;
63pub mod icrc;
64#[cfg(any(
65    feature = "cmc-host",
66    feature = "dashboard-host",
67    feature = "nns-host",
68    feature = "sns-host",
69    feature = "subnet-catalog-host"
70))]
71mod network;
72pub mod nns;
73#[cfg(any(
74    feature = "dashboard-host",
75    feature = "icrc-host",
76    feature = "nns-host",
77    feature = "sns-host"
78))]
79mod progress;
80pub mod report;
81#[cfg(any(feature = "nns-host", feature = "sns-host"))]
82mod report_sort;
83#[cfg(any(
84    feature = "cmc-host",
85    feature = "dashboard-host",
86    feature = "icrc-host",
87    feature = "nns-host",
88    feature = "sns-host",
89    feature = "subnet-catalog-host"
90))]
91mod runtime;
92#[cfg(any(
93    feature = "dashboard-host",
94    feature = "icrc-host",
95    feature = "nns-host",
96    feature = "sns-host"
97))]
98pub(crate) mod snapshot_cache;
99pub mod sns;
100pub mod subnet_catalog;
101pub mod system;
102
103#[cfg(any(
104    feature = "dashboard-host",
105    feature = "icrc-host",
106    feature = "nns-host",
107    feature = "sns-host",
108    feature = "subnet-catalog-host"
109))]
110pub use cache_file::{CacheFileError, HostCacheError};
111mod table;
112#[cfg(any(feature = "nns-host", feature = "sns-host"))]
113mod text_search;
114mod text_value;
115mod token_amount;
116mod token_metadata_text;
117
118#[cfg(all(
119    test,
120    any(
121        feature = "dashboard-host",
122        feature = "icrc-host",
123        feature = "nns-host",
124        feature = "sns-host",
125        feature = "subnet-catalog-host"
126    )
127))]
128mod test_support;
129
130#[cfg(test)]
131mod tests;
132
133#[cfg(any(
134    feature = "dashboard-host",
135    feature = "icrc-host",
136    feature = "nns-host",
137    feature = "sns-host"
138))]
139pub use progress::{QueryProgress, QueryProgressEvent, QueryProgressState};