Skip to main content

ic_query/icrc/
mod.rs

1//! Module: icrc
2//!
3//! Responsibility: top-level generic ICRC ledger query commands.
4//! Does not own: SNS lookup, NNS registry cache behavior, or release flow.
5//! Boundary: exposes live read-only token metadata, account balance, allowance,
6//! index discovery, transaction history, block type, and archive reports.
7
8#[cfg(feature = "cli")]
9mod commands;
10#[cfg(feature = "host")]
11pub(crate) mod ledger;
12#[cfg(feature = "host")]
13mod live;
14mod model;
15mod text;
16
17pub const DEFAULT_ICRC_SOURCE_ENDPOINT: &str = "https://icp-api.io";
18
19#[cfg(feature = "host")]
20pub use live::{
21    build_icrc_allowance_report, build_icrc_archives_report, build_icrc_balance_report,
22    build_icrc_block_types_report, build_icrc_capabilities_report, build_icrc_index_report,
23    build_icrc_tip_certificate_report, build_icrc_token_report, build_icrc_transactions_report,
24};
25pub use model::{
26    IcrcAllowanceReport, IcrcAllowanceRequest, IcrcArchiveFollowErrorRow, IcrcArchiveRow,
27    IcrcArchivedBlocksRow, IcrcArchivedRangeRow, IcrcArchivesReport, IcrcArchivesRequest,
28    IcrcBalanceReport, IcrcBalanceRequest, IcrcBlockTypeRow, IcrcBlockTypesReport,
29    IcrcBlockTypesRequest, IcrcCapabilitiesReport, IcrcCapabilitiesRequest, IcrcCapabilityRow,
30    IcrcError, IcrcFollowedArchiveBlockRow, IcrcIndexReport, IcrcIndexRequest,
31    IcrcTipCertificateReport, IcrcTipCertificateRequest, IcrcTokenMetadataRow, IcrcTokenReport,
32    IcrcTokenRequest, IcrcTokenStandardRow, IcrcTransactionBlockRow, IcrcTransactionsReport,
33    IcrcTransactionsRequest,
34};
35pub use text::{
36    icrc_allowance_report_text, icrc_archives_report_text, icrc_balance_report_text,
37    icrc_block_types_report_text, icrc_capabilities_report_text, icrc_index_report_text,
38    icrc_tip_certificate_report_text, icrc_token_report_text, icrc_transactions_report_text,
39};
40
41#[cfg(feature = "cli")]
42pub use commands::run;
43
44#[cfg(all(test, feature = "cli", feature = "host"))]
45mod tests;