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            call::Call,
13            candid::CandidType,
14        },
15        ids::CanisterRole,
16        interface::InterfaceError,
17        log,
18        log::Level,
19        types::{Account, Cycles, Int, Nat, Principal, Subaccount},
20        utils::time::now_secs,
21    };
22    pub use serde::{Deserialize, Serialize};
23}
24
25use thiserror::Error as ThisError;
26
27///
28/// InterfaceError
29/// Shared result type for interface helpers.
30///
31
32#[derive(Debug, ThisError)]
33pub enum InterfaceError {
34    #[error("wasm hash matches")]
35    WasmHashMatches,
36}