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//! `blake3` selects the upstream hash function, streaming hasher and digest identity.
17//! `canister-sig-creation` selects canister public-key formats and hashing.
18//! `signature-verification` selects upstream canister-signature verification.
19//! `cdk` selects owned explicit-codec entrypoints and a Candid-free runtime.
20//! `runtime` selects those same runtime adapters without the entrypoint generator.
21//! `ic0` selects qualified raw system calls without Candid or an executor.
22//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
23//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
24//! Consumers retain protocol schemas, resource limits and lifecycle policy.
25
26#[cfg(feature = "principal")]
27pub mod account;
28#[cfg(feature = "principal")]
29pub use account::{Account, AccountError, Subaccount};
30
31#[cfg(any(feature = "canister-sig-creation", feature = "signature-verification"))]
32mod signature_upstream;
33
34#[cfg(feature = "principal")]
35pub mod principal;
36#[cfg(feature = "principal")]
37pub use principal::{Principal, PrincipalError};
38
39#[cfg(all(feature = "agent", not(target_family = "wasm")))]
40pub mod agent;
41
42#[cfg(feature = "blake3")]
43pub mod blake3;
44#[cfg(feature = "bls")]
45pub mod bls;
46#[cfg(feature = "candid")]
47pub mod candid;
48#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
49pub mod candid_parser;
50#[cfg(feature = "canister-sig-creation")]
51pub mod canister_sig_creation;
52#[cfg(feature = "runtime")]
53pub mod cdk;
54#[cfg(feature = "certification")]
55pub mod certification;
56#[cfg(all(feature = "certified-assets-types", not(target_family = "wasm")))]
57pub mod certified_assets_types;
58#[cfg(feature = "cmc-types")]
59pub mod cmc_types;
60#[cfg(feature = "cycles-ledger-types")]
61pub mod cycles_ledger_types;
62#[cfg(feature = "ecdsa")]
63pub mod ecdsa;
64#[cfg(feature = "ed25519")]
65pub mod ed25519;
66#[cfg(feature = "executor")]
67pub mod executor;
68#[cfg(feature = "ic0")]
69pub mod ic0;
70#[cfg(feature = "icp-ledger-types")]
71pub mod icp_ledger_types;
72#[cfg(feature = "nns-registry-types")]
73pub mod nns_registry_types;
74
75#[cfg(feature = "icrc-ledger-types")]
76pub mod icrc_ledger_types;
77#[cfg(feature = "management-canister-types")]
78pub mod management_canister_types;
79#[cfg(all(feature = "secp256k1", not(target_family = "wasm")))]
80pub mod secp256k1;
81#[cfg(feature = "signature-verification")]
82pub mod signature_verification;
83#[cfg(feature = "stable-structures")]
84pub mod stable_structures;
85
86#[cfg(all(feature = "pocket-ic", not(target_family = "wasm")))]
87pub mod pocket_ic;