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