pub fn set_certified_data(data: &[u8])
šDeprecated since 0.18.0: Use
certified_data_set
insteadExpand description
Sets the certified data of this canister.
Canisters can store up to 32 bytes of data that is certified by the system on a regular basis. One can call data_certificate function from a query call to get a certificate authenticating the value set by calling this function.
This function can only be called from the following contexts: . - ācanister_initā, ācanister_pre_upgradeā and ācanister_post_upgradeā hooks. . - ācanister_updateā calls. . - reply or reject callbacks.
§Panics
.- This function traps if data.len() > 32. .- This function traps if itās called from an illegal context (e.g., from a query call).