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 = "sns-host",
36    feature = "subnet-catalog-host"
37))]
38mod cache_file;
39#[cfg(any(
40    feature = "certified-subnet-catalog-host",
41    feature = "cmc-host",
42    feature = "icrc-host"
43))]
44mod certification;
45pub mod duration;
46#[cfg(any(
47    feature = "dashboard-host",
48    feature = "icrc-host",
49    feature = "sns-host",
50    feature = "subnet-catalog-host"
51))]
52mod freshness;
53mod hex;
54#[cfg(any(
55    feature = "cmc-host",
56    feature = "dashboard-host",
57    feature = "icrc-host",
58    feature = "sns-host",
59    feature = "subnet-catalog-host"
60))]
61mod http_endpoint;
62mod human_quantity;
63pub mod ic;
64#[cfg(feature = "subnet-catalog-host")]
65mod ic_registry;
66pub mod icrc;
67#[cfg(any(
68    feature = "cmc-host",
69    feature = "dashboard-host",
70    feature = "sns-host",
71    feature = "subnet-catalog-host"
72))]
73mod network;
74pub mod nns;
75#[cfg(any(
76    feature = "dashboard-host",
77    feature = "icrc-host",
78    feature = "nns-host",
79    feature = "sns-host"
80))]
81mod progress;
82pub mod report;
83#[cfg(any(feature = "nns-host", feature = "sns-host"))]
84mod report_sort;
85#[cfg(any(
86    feature = "cmc-host",
87    feature = "dashboard-host",
88    feature = "icrc-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 = "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 = "sns-host",
124        feature = "subnet-catalog-host"
125    )
126))]
127mod test_support;
128
129#[cfg(test)]
130mod tests;
131
132#[cfg(any(
133    feature = "dashboard-host",
134    feature = "icrc-host",
135    feature = "nns-host",
136    feature = "sns-host"
137))]
138pub use progress::{QueryProgress, QueryProgressEvent, QueryProgressState};