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