canic_core/interface/
mod.rs

1//! Interface Helpers
2//! Aggregates thin wrappers around external canisters (IC, ck-tokens, ICRC).
3
4pub mod ck;
5pub mod ic;
6pub mod icrc;
7
8pub mod prelude {
9    pub use crate::{
10        cdk::{
11            api::{canister_self, msg_caller},
12            candid::CandidType,
13        },
14        ids::CanisterRole,
15        interface::{InterfaceError, ic::call::Call},
16        log,
17        log::Level,
18        types::{Account, Cycles, Int, Nat, Principal, Subaccount},
19        utils::time::now_secs,
20    };
21    pub use serde::{Deserialize, Serialize};
22}
23
24use thiserror::Error as ThisError;
25
26///
27/// InterfaceError
28/// Shared result type for interface helpers.
29///
30
31#[derive(Debug, ThisError)]
32pub enum InterfaceError {
33    #[error("wasm hash matches")]
34    WasmHashMatches,
35}