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`] 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//! `agent` selects native IC transport and identities, with consumer-owned policy.
12//! `pocket-ic` selects native simulator client identities; Testkit owns lifecycle policy.
13//! `secp256k1` selects native offline public-key derivation with upstream identities.
14//! `bls` selects BLS keys, signatures and verification with upstream allocation support.
15//! `canister-sig-creation` selects canister public-key formats and hashing.
16//! `signature-verification` selects upstream canister-signature verification.
17//! `cdk` selects owned explicit-codec entrypoints and a Candid-free runtime.
18//! `ic0` selects qualified raw system calls without Candid or an executor.
19//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
20//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
21//! Consumers retain protocol schemas, resource limits and lifecycle policy.
22
23pub mod account;
24pub use account::{Account, AccountError, Subaccount};
25
26#[cfg(any(feature = "canister-sig-creation", feature = "signature-verification"))]
27mod signature_upstream;
28
29pub mod principal;
30pub use principal::{Principal, PrincipalError};
31
32#[cfg(all(feature = "agent", not(target_family = "wasm")))]
33pub mod agent;
34
35#[cfg(feature = "bls")]
36pub mod bls;
37#[cfg(feature = "candid")]
38pub mod candid;
39#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
40pub mod candid_parser;
41#[cfg(feature = "canister-sig-creation")]
42pub mod canister_sig_creation;
43#[cfg(feature = "cdk")]
44pub mod cdk;
45#[cfg(feature = "certification")]
46pub mod certification;
47#[cfg(feature = "ecdsa")]
48pub mod ecdsa;
49#[cfg(feature = "ed25519")]
50pub mod ed25519;
51#[cfg(feature = "executor")]
52pub mod executor;
53#[cfg(feature = "ic0")]
54pub mod ic0;
55#[cfg(feature = "icrc-ledger-types")]
56pub mod icrc_ledger_types;
57#[cfg(feature = "management-canister-types")]
58pub mod management_canister_types;
59#[cfg(all(feature = "secp256k1", not(target_family = "wasm")))]
60pub mod secp256k1;
61#[cfg(feature = "signature-verification")]
62pub mod signature_verification;
63
64#[cfg(all(feature = "pocket-ic", not(target_family = "wasm")))]
65pub mod pocket_ic;