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//! `certified-subnet-catalog-host` for that API plus certified Registry archive,
18//! replay, and archive-bound catalog authority,
19//! `nns-topology-host` for that API plus exact-version joined NNS Subnet
20//! topology, `nns-host` for the complete NNS host surface, or `host` for every
21//! native live-call adapter and runtime helper. CLI parsing and process IO
22//! belong to the separate `ic-query-cli` crate.
23
24#[cfg(any(
25    feature = "cmc-host",
26    feature = "icrc-host",
27    feature = "sns-host",
28    feature = "subnet-catalog-host"
29))]
30mod agent;
31pub mod cache;
32#[cfg(any(
33    feature = "dashboard-host",
34    feature = "icrc-host",
35    feature = "nns-host",
36    feature = "sns-host",
37    feature = "subnet-catalog-host"
38))]
39mod cache_file;
40#[cfg(any(
41    feature = "certified-subnet-catalog-host",
42    feature = "cmc-host",
43    feature = "icrc-host"
44))]
45mod certification;
46pub mod duration;
47#[cfg(any(
48    feature = "dashboard-host",
49    feature = "icrc-host",
50    feature = "nns-host",
51    feature = "sns-host",
52    feature = "subnet-catalog-host"
53))]
54mod freshness;
55mod hex;
56#[cfg(any(
57    feature = "cmc-host",
58    feature = "dashboard-host",
59    feature = "icrc-host",
60    feature = "nns-host",
61    feature = "sns-host",
62    feature = "subnet-catalog-host"
63))]
64mod http_endpoint;
65mod human_quantity;
66pub mod ic;
67#[cfg(feature = "subnet-catalog-host")]
68mod ic_registry;
69pub mod icrc;
70#[cfg(any(
71    feature = "cmc-host",
72    feature = "dashboard-host",
73    feature = "nns-host",
74    feature = "sns-host",
75    feature = "subnet-catalog-host"
76))]
77mod network;
78pub mod nns;
79#[cfg(any(
80    feature = "dashboard-host",
81    feature = "icrc-host",
82    feature = "nns-host",
83    feature = "sns-host"
84))]
85mod progress;
86pub mod report;
87#[cfg(any(feature = "nns-host", feature = "sns-host"))]
88mod report_sort;
89#[cfg(any(
90    feature = "cmc-host",
91    feature = "dashboard-host",
92    feature = "icrc-host",
93    feature = "nns-host",
94    feature = "sns-host",
95    feature = "subnet-catalog-host"
96))]
97mod runtime;
98#[cfg(any(
99    feature = "dashboard-host",
100    feature = "icrc-host",
101    feature = "nns-host",
102    feature = "sns-host"
103))]
104pub(crate) mod snapshot_cache;
105pub mod sns;
106pub mod subnet_catalog;
107pub mod system;
108
109#[cfg(any(
110    feature = "dashboard-host",
111    feature = "icrc-host",
112    feature = "nns-host",
113    feature = "sns-host",
114    feature = "subnet-catalog-host"
115))]
116pub use cache_file::{CacheFileError, HostCacheError};
117mod table;
118#[cfg(any(feature = "nns-host", feature = "sns-host"))]
119mod text_search;
120mod text_value;
121mod token_amount;
122mod token_metadata_text;
123
124#[cfg(all(
125    test,
126    any(
127        feature = "dashboard-host",
128        feature = "icrc-host",
129        feature = "nns-host",
130        feature = "sns-host",
131        feature = "subnet-catalog-host"
132    )
133))]
134mod test_support;
135
136#[cfg(test)]
137mod tests;
138
139#[cfg(any(
140    feature = "dashboard-host",
141    feature = "icrc-host",
142    feature = "nns-host",
143    feature = "sns-host"
144))]
145pub use progress::{QueryProgress, QueryProgressEvent, QueryProgressState};