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(feature = "ecdsa")]
57pub mod ecdsa;
58#[cfg(feature = "ed25519")]
59pub mod ed25519;
60#[cfg(feature = "executor")]
61pub mod executor;
62#[cfg(feature = "ic0")]
63pub mod ic0;
64
65#[cfg(feature = "icrc-ledger-types")]
66pub mod icrc_ledger_types;
67#[cfg(feature = "management-canister-types")]
68pub mod management_canister_types;
69#[cfg(all(feature = "secp256k1", not(target_family = "wasm")))]
70pub mod secp256k1;
71#[cfg(feature = "signature-verification")]
72pub mod signature_verification;
73#[cfg(feature = "stable-structures")]
74pub mod stable_structures;
75
76#[cfg(all(feature = "pocket-ic", not(target_family = "wasm")))]
77pub mod pocket_ic;