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