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_COMMAND: &str = "canic_command";
6pub const CANIC_STATUS: &str = "canic_status";
7
8pub const BLOB_STORAGE_BLOBS_ARE_LIVE: &str = "_immutableObjectStorageBlobsAreLive";
9pub const BLOB_STORAGE_BLOBS_TO_DELETE: &str = "_immutableObjectStorageBlobsToDelete";
10pub const BLOB_STORAGE_CONFIRM_BLOB_DELETION: &str = "_immutableObjectStorageConfirmBlobDeletion";
11pub const BLOB_STORAGE_CREATE_CERTIFICATE: &str = "_immutableObjectStorageCreateCertificate";
12pub const BLOB_STORAGE_UPDATE_GATEWAY_PRINCIPALS: &str =
13    "_immutableObjectStorageUpdateGatewayPrincipals";
14pub const BLOB_STORAGE_FUND_FROM_PROJECT_CYCLES: &str =
15    "_immutableObjectStorageFundFromProjectCycles";
16pub const BLOB_STORAGE_STATUS: &str = "get_blob_storage_status";
17pub const BLOB_STORAGE_CASHIER_ACCOUNT_BALANCE_GET_V1: &str = "account_balance_get_v1";
18pub const BLOB_STORAGE_CASHIER_ACCOUNT_TOP_UP_V1: &str = "account_top_up_v1";
19pub const BLOB_STORAGE_CASHIER_STORAGE_GATEWAY_PRINCIPAL_LIST_V1: &str =
20    "storage_gateway_principal_list_v1";
21
22/// Maximum encoded payload accepted by state and topology cascade endpoints.
23pub const CASCADE_SNAPSHOT_MAX_BYTES: usize = 16_384;
24
25pub const BLOB_STORAGE_069_GATEWAY_METHODS: &[&str] = &[
26    BLOB_STORAGE_BLOBS_ARE_LIVE,
27    BLOB_STORAGE_BLOBS_TO_DELETE,
28    BLOB_STORAGE_CONFIRM_BLOB_DELETION,
29    BLOB_STORAGE_CREATE_CERTIFICATE,
30];
31
32pub const BLOB_STORAGE_070_GATEWAY_METHODS: &[&str] = &[
33    BLOB_STORAGE_UPDATE_GATEWAY_PRINCIPALS,
34    BLOB_STORAGE_FUND_FROM_PROJECT_CYCLES,
35];
36
37pub const BLOB_STORAGE_070_CASHIER_METHODS: &[&str] = &[
38    BLOB_STORAGE_CASHIER_ACCOUNT_BALANCE_GET_V1,
39    BLOB_STORAGE_CASHIER_ACCOUNT_TOP_UP_V1,
40    BLOB_STORAGE_CASHIER_STORAGE_GATEWAY_PRINCIPAL_LIST_V1,
41];