ic_platform/lib.rs
1//! Controlled dependencies for IC runtime integration and required IC Candid interfaces.
2//!
3//! All owned application endpoints use IC Wire, including public endpoints.
4//! Candid adapts required management/system, NNS/SNS, ledger and other Candid
5//! interfaces; caller location does not select the codec. Existing Candid
6//! checkpoints remain a legacy persisted-data compatibility exception.
7//!
8//! [`Principal`] is always available. `candid` selects bounded decoding;
9//! `executor` selects the shared CDK executor without a Candid dependency.
10//! `candid-parser` selects native host parsing and binding generation only.
11//! `candid-service` separately selects Candid service declaration generation.
12//! `agent` selects native IC transport and identities, with consumer-owned policy.
13//! `pocket-ic` selects native simulator client identities; Testkit owns lifecycle policy.
14//! `secp256k1` selects native offline public-key derivation with upstream identities.
15//! `bls` selects BLS keys, signatures and verification with upstream allocation support.
16//! `canister-sig-creation` selects canister public-key formats and hashing.
17//! `signature-verification` selects upstream canister-signature verification.
18//! `cdk` selects owned explicit-codec entrypoints and a Candid-free runtime.
19//! `runtime` selects those same runtime adapters without the entrypoint generator.
20//! `ic0` selects qualified raw system calls without Candid or an executor.
21//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
22//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
23//! Consumers retain protocol schemas, resource limits and lifecycle policy.
24
25pub mod account;
26pub use account::{Account, AccountError, Subaccount};
27
28#[cfg(any(feature = "canister-sig-creation", feature = "signature-verification"))]
29mod signature_upstream;
30
31pub mod principal;
32pub use principal::{Principal, PrincipalError};
33
34#[cfg(all(feature = "agent", not(target_family = "wasm")))]
35pub mod agent;
36
37#[cfg(feature = "bls")]
38pub mod bls;
39#[cfg(feature = "candid")]
40pub mod candid;
41#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
42pub mod candid_parser;
43#[cfg(feature = "canister-sig-creation")]
44pub mod canister_sig_creation;
45#[cfg(feature = "runtime")]
46pub mod cdk;
47#[cfg(feature = "certification")]
48pub mod certification;
49#[cfg(feature = "ecdsa")]
50pub mod ecdsa;
51#[cfg(feature = "ed25519")]
52pub mod ed25519;
53#[cfg(feature = "executor")]
54pub mod executor;
55#[cfg(feature = "ic0")]
56pub mod ic0;
57#[cfg(feature = "icrc-ledger-types")]
58pub mod icrc_ledger_types;
59#[cfg(feature = "management-canister-types")]
60pub mod management_canister_types;
61#[cfg(all(feature = "secp256k1", not(target_family = "wasm")))]
62pub mod secp256k1;
63#[cfg(feature = "signature-verification")]
64pub mod signature_verification;
65
66#[cfg(all(feature = "pocket-ic", not(target_family = "wasm")))]
67pub mod pocket_ic;