Skip to main content

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` selects Principal and Account. `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
25#[cfg(feature = "principal")]
26pub mod account;
27#[cfg(feature = "principal")]
28pub use account::{Account, AccountError, Subaccount};
29
30#[cfg(any(feature = "canister-sig-creation", feature = "signature-verification"))]
31mod signature_upstream;
32
33#[cfg(feature = "principal")]
34pub mod principal;
35#[cfg(feature = "principal")]
36pub use principal::{Principal, PrincipalError};
37
38#[cfg(all(feature = "agent", not(target_family = "wasm")))]
39pub mod agent;
40
41#[cfg(feature = "bls")]
42pub mod bls;
43#[cfg(feature = "candid")]
44pub mod candid;
45#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
46pub mod candid_parser;
47#[cfg(feature = "canister-sig-creation")]
48pub mod canister_sig_creation;
49#[cfg(feature = "runtime")]
50pub mod cdk;
51#[cfg(feature = "certification")]
52pub mod certification;
53#[cfg(feature = "ecdsa")]
54pub mod ecdsa;
55#[cfg(feature = "ed25519")]
56pub mod ed25519;
57#[cfg(feature = "executor")]
58pub mod executor;
59#[cfg(feature = "ic0")]
60pub mod ic0;
61
62#[cfg(feature = "icrc-ledger-types")]
63pub mod icrc_ledger_types;
64#[cfg(feature = "management-canister-types")]
65pub mod management_canister_types;
66#[cfg(all(feature = "secp256k1", not(target_family = "wasm")))]
67pub mod secp256k1;
68#[cfg(feature = "signature-verification")]
69pub mod signature_verification;
70#[cfg(feature = "stable-structures")]
71pub mod stable_structures;
72
73#[cfg(all(feature = "pocket-ic", not(target_family = "wasm")))]
74pub mod pocket_ic;