Skip to main content

canic_core/
protocol.rs

1/// Runtime wire-level endpoint names used by `canic-core` for inter-canister calls.
2///
3/// Keep these synchronized with the macro-defined endpoints.
4
5pub const CANIC_RESPONSE_CAPABILITY_V1: &str = "canic_response_capability_v1";
6pub const CANIC_PREPARE_DELEGATION_PROOF: &str = "canic_prepare_delegation_proof";
7pub const CANIC_GET_DELEGATION_PROOF: &str = "canic_get_delegation_proof";
8pub const CANIC_PREPARE_DELEGATED_TOKEN: &str = "canic_prepare_delegated_token";
9pub const CANIC_GET_DELEGATED_TOKEN: &str = "canic_get_delegated_token";
10pub const CANIC_PREPARE_ROLE_ATTESTATION: &str = "canic_prepare_role_attestation";
11pub const CANIC_GET_ROLE_ATTESTATION: &str = "canic_get_role_attestation";
12pub const CANIC_INSTALL_ACTIVE_DELEGATION_PROOF: &str = "canic_install_active_delegation_proof";
13pub const CANIC_BOOTSTRAP_STATUS: &str = "canic_bootstrap_status";
14pub const CANIC_CYCLE_BALANCE: &str = "canic_cycle_balance";
15pub const CANIC_CYCLE_TRACKER: &str = "canic_cycle_tracker";
16pub const CANIC_CYCLE_TOPUPS: &str = "canic_cycle_topups";
17pub const CANIC_METADATA: &str = "canic_metadata";
18pub const CANIC_WASM_STORE_CATALOG: &str = "canic_wasm_store_catalog";
19pub const CANIC_WASM_STORE_INFO: &str = "canic_wasm_store_info";
20pub const CANIC_WASM_STORE_STATUS: &str = "canic_wasm_store_status";
21pub const CANIC_WASM_STORE_PREPARE_GC: &str = "canic_wasm_store_prepare_gc";
22pub const CANIC_WASM_STORE_BEGIN_GC: &str = "canic_wasm_store_begin_gc";
23pub const CANIC_WASM_STORE_COMPLETE_GC: &str = "canic_wasm_store_complete_gc";
24pub const CANIC_WASM_STORE_PREPARE: &str = "canic_wasm_store_prepare";
25pub const CANIC_WASM_STORE_CHUNK: &str = "canic_wasm_store_chunk";
26pub const CANIC_WASM_STORE_PUBLISH_CHUNK: &str = "canic_wasm_store_publish_chunk";
27pub const CANIC_WASM_STORE_STAGE_MANIFEST: &str = "canic_wasm_store_stage_manifest";
28pub const CANIC_WASM_STORE_BOOTSTRAP_RESUME_ROOT_ADMIN: &str =
29    "canic_wasm_store_bootstrap_resume_root_admin";
30pub const CANIC_WASM_STORE_BOOTSTRAP_DEBUG: &str = "canic_wasm_store_bootstrap_debug";
31pub const CANIC_WASM_STORE_OVERVIEW: &str = "canic_wasm_store_overview";
32pub const CANIC_TEMPLATE_PREPARE_ADMIN: &str = "canic_template_prepare_admin";
33pub const CANIC_TEMPLATE_PUBLISH_CHUNK_ADMIN: &str = "canic_template_publish_chunk_admin";
34pub const CANIC_TEMPLATE_STAGE_MANIFEST_ADMIN: &str = "canic_template_stage_manifest_admin";
35
36pub const CANIC_SYNC_STATE: &str = "canic_sync_state";
37pub const CANIC_SYNC_TOPOLOGY: &str = "canic_sync_topology";
38
39pub const CANIC_WASM_STORE_ROOT_UPDATE_METHODS: &[&str] = &[
40    CANIC_WASM_STORE_BEGIN_GC,
41    CANIC_WASM_STORE_CHUNK,
42    CANIC_WASM_STORE_COMPLETE_GC,
43    CANIC_WASM_STORE_INFO,
44    CANIC_WASM_STORE_PREPARE,
45    CANIC_WASM_STORE_PREPARE_GC,
46    CANIC_WASM_STORE_PUBLISH_CHUNK,
47    CANIC_WASM_STORE_STAGE_MANIFEST,
48];
49
50pub const CANIC_WASM_STORE_STRUCTURAL_QUERY_METHODS: &[&str] =
51    &[CANIC_WASM_STORE_CATALOG, CANIC_WASM_STORE_STATUS];
52
53#[must_use]
54pub const fn canic_wasm_store_method_requires_internal_proof(method: &str) -> bool {
55    let _ = method;
56    false
57}