mod error;
#[cfg(feature = "subnet-catalog-host")]
mod host;
mod json;
mod model;
mod principal;
#[cfg(feature = "subnet-catalog-host")]
mod report;
mod resolver;
#[cfg(feature = "subnet-catalog-host")]
mod time;
#[cfg(feature = "subnet-catalog-host")]
pub use crate::ic_registry::RegistryHistoryCacheDisposition;
#[cfg(feature = "subnet-catalog-host")]
pub use crate::ic_registry::{SubnetCatalogProgress, SubnetCatalogProgressPhase};
pub use error::CatalogError;
#[cfg(feature = "subnet-catalog-host")]
pub(crate) use host::subject_from_catalog_error;
#[cfg(feature = "subnet-catalog-host")]
pub use host::{
CacheDisposition, CatalogLoadOutcome, CatalogReadPolicy, CatalogSourceSelection,
LiveSubnetCatalogSource, SubnetCatalogCacheRequest, SubnetCatalogDetailedSourceFuture,
SubnetCatalogErrorCategory, SubnetCatalogErrorCode, SubnetCatalogFailureCacheDisposition,
SubnetCatalogFailureEvidence, SubnetCatalogField, SubnetCatalogHostError,
SubnetCatalogLoadFailure, SubnetCatalogLoadFailureRequest, SubnetCatalogLoadRequest,
SubnetCatalogLoadStage, SubnetCatalogRefreshRequest, SubnetCatalogRefreshTrigger,
SubnetCatalogRemediation, SubnetCatalogRetryability, SubnetCatalogSource,
SubnetCatalogSourceFailure, SubnetCatalogSourceFuture, SubnetCatalogSubject,
SubnetCatalogUnknownRetryReason, fetch_subnet_catalog_async, load_cached_subnet_catalog,
load_subnet_catalog, load_subnet_catalog_with_source,
load_subnet_catalog_with_source_and_progress, refresh_subnet_catalog,
refresh_subnet_catalog_with_source, subnet_catalog_path, subnet_catalog_refresh_lock_path,
};
#[cfg(feature = "subnet-catalog-host")]
pub(crate) use host::{subnet_catalog_history_lock_path, subnet_catalog_history_path};
pub use json::{catalog_to_pretty_json, parse_catalog_json};
#[cfg(feature = "subnet-catalog-host")]
pub use model::UncertifiedCatalogCollection;
#[cfg(feature = "subnet-catalog-host")]
pub(in crate::subnet_catalog) use model::catalog_agreement_digest;
pub use model::{
CANISTER_RANGES_KEY_PREFIX, CLASSIFICATION_SCHEMA_VERSION, CatalogAssurance,
CatalogSnapshotAuthorityEvidence, CatalogValidationContext, ClassificationSource,
GeographicScope, RESOLVER_SCHEMA_VERSION, ROUTING_TABLE_KEY, RawSubnetCatalog, RoutingRange,
SUBNET_LIST_KEY, SUBNET_RECORD_KEY_PREFIX, SubnetCatalogProvenance,
SubnetCatalogRegistryRecordEvidence, SubnetCatalogRegistryRecordKind,
SubnetCatalogRegistryRecordSubject, SubnetCatalogRegistryValueEncoding,
SubnetCatalogRoutingSource, SubnetClassification, SubnetInfo, SubnetKind, SubnetSpecialization,
ValidatedSubnetCatalog,
};
pub use principal::canonical_principal_text;
pub(crate) use principal::{parse_principal, principal_bytes};
#[cfg(feature = "subnet-catalog-host")]
pub use report::{
CatalogStaleStatus, SubnetCatalogFilters, SubnetCatalogInfoReport, SubnetCatalogInfoRequest,
SubnetCatalogListReport, SubnetCatalogListRequest, SubnetCatalogRefreshReport,
SubnetCatalogReportMetadata, SubnetCatalogSubnetRow, build_subnet_catalog_info_report,
build_subnet_catalog_info_report_with_source_and_progress, build_subnet_catalog_list_report,
build_subnet_catalog_list_report_with_source_and_progress,
};
pub use resolver::{ResolveAs, ResolvedCanisterRoute, ResolvedSubnet, ResolvedSubnetSubject};
#[cfg(feature = "subnet-catalog-host")]
pub use time::catalog_stale_status;
pub const CATALOG_SCHEMA_VERSION: u32 = 1;
pub const MAINNET_NETWORK: &str = "ic";
pub const MAINNET_REGISTRY_CANISTER_ID: &str = "rwlgt-iiaaa-aaaaa-aaaaa-cai";
#[cfg(feature = "subnet-catalog-host")]
pub const DEFAULT_CATALOG_MAX_FUTURE_SKEW_SECONDS: u64 = 5 * 60;
#[cfg(feature = "subnet-catalog-host")]
pub const DEFAULT_STALE_AFTER_SECONDS: u64 = 7 * 24 * 60 * 60;
#[cfg(feature = "subnet-catalog-host")]
pub const DEFAULT_SUBNET_CATALOG_SOURCE_ENDPOINT: &str = "https://icp-api.io";
#[cfg(feature = "subnet-catalog-host")]
pub const MIN_SUBNET_CATALOG_AGREEMENT_ENDPOINTS: usize = 2;
#[cfg(feature = "subnet-catalog-host")]
pub const MAX_SUBNET_CATALOG_AGREEMENT_ENDPOINTS: usize = 3;
#[cfg(feature = "subnet-catalog-host")]
pub(crate) const SUBNET_CATALOG_LIST_REPORT_SCHEMA_VERSION: u32 = 1;
#[cfg(feature = "subnet-catalog-host")]
pub(crate) const SUBNET_CATALOG_INFO_REPORT_SCHEMA_VERSION: u32 = 1;
#[cfg(feature = "subnet-catalog-host")]
pub(crate) const SUBNET_CATALOG_REFRESH_REPORT_SCHEMA_VERSION: u32 = 1;
#[cfg(test)]
mod tests;