junobuild-satellite 0.6.0

Core implementation of a Juno Satellite.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use ic_cdk::api::certified_data_set as set_certified_data;
use ic_certification::fork_hash;
use junobuild_auth::state::labeled_sigs_root_hash;
use junobuild_storage::runtime::certified_assets_root_hash;

pub fn update_certified_data() {
    let prefixed_root_hash = fork_hash(
        &certified_assets_root_hash(),
        // NB: sigs have to be added last due to lexicographic order of labels
        &labeled_sigs_root_hash(),
    );

    set_certified_data(&prefixed_root_hash[..]);
}