ic-query 0.13.2

Internet Computer query library for NNS, SNS, ICRC, and related public network metadata
Documentation
//! Module: icrc
//!
//! Responsibility: expose generic ICRC ledger request and report APIs.
//! Does not own: SNS lookup, NNS registry cache behavior, or release flow.
//! Boundary: exposes live read-only token metadata, account balance, allowance,
//! index discovery, account and ledger transaction history, block type, and archive reports.

#[cfg(feature = "host")]
pub(crate) mod ledger;
#[cfg(feature = "host")]
mod live;
mod model;
mod text;

pub const DEFAULT_ICRC_SOURCE_ENDPOINT: &str = "https://icp-api.io";

#[cfg(feature = "host")]
pub use live::{
    IcrcAccountTransactionsSource, IcrcSource, LiveIcrcSource,
    build_icrc_account_transactions_report, build_icrc_account_transactions_report_with_source,
    build_icrc_allowance_report, build_icrc_allowance_report_with_source,
    build_icrc_archives_report, build_icrc_archives_report_with_source, build_icrc_balance_report,
    build_icrc_balance_report_with_source, build_icrc_block_types_report,
    build_icrc_block_types_report_with_source, build_icrc_capabilities_report,
    build_icrc_capabilities_report_with_source, build_icrc_index_report,
    build_icrc_index_report_with_source, build_icrc_tip_certificate_report,
    build_icrc_tip_certificate_report_with_source, build_icrc_token_report,
    build_icrc_token_report_with_source, build_icrc_transactions_report,
    build_icrc_transactions_report_with_source,
};
pub use model::normalize_subaccount_hex;
pub use model::{
    IcrcAccountRow, IcrcAccountTransactionRow, IcrcAccountTransactionsError,
    IcrcAccountTransactionsReport, IcrcAccountTransactionsRequest, IcrcAllowanceReport,
    IcrcAllowanceRequest, IcrcArchiveFollowErrorRow, IcrcArchiveRow, IcrcArchivedBlocksRow,
    IcrcArchivedRangeRow, IcrcArchivesReport, IcrcArchivesRequest, IcrcBalanceReport,
    IcrcBalanceRequest, IcrcBlockTypeRow, IcrcBlockTypesReport, IcrcBlockTypesRequest,
    IcrcCapabilitiesReport, IcrcCapabilitiesRequest, IcrcCapabilityRow, IcrcError,
    IcrcFollowedArchiveBlockRow, IcrcIndexReport, IcrcIndexRequest, IcrcTipCertificateReport,
    IcrcTipCertificateRequest, IcrcTokenMetadataRow, IcrcTokenReport, IcrcTokenRequest,
    IcrcTokenStandardRow, IcrcTransactionBlockRow, IcrcTransactionsReport, IcrcTransactionsRequest,
};
#[cfg(feature = "host")]
pub use model::{
    IcrcAccountTransactionsData, IcrcAllowanceData, IcrcArchivesData, IcrcBalanceData,
    IcrcBlockTypesData, IcrcCapabilitiesData, IcrcIndexData, IcrcTipCertificateData, IcrcTokenData,
    IcrcTransactionsData,
};
pub use text::{
    icrc_account_transactions_report_text, icrc_allowance_report_text, icrc_archives_report_text,
    icrc_balance_report_text, icrc_block_types_report_text, icrc_capabilities_report_text,
    icrc_index_report_text, icrc_tip_certificate_report_text, icrc_token_report_text,
    icrc_transactions_report_text,
};

#[cfg(all(test, feature = "host"))]
mod tests;