junobuild_auth/state/
runtime.rs1use crate::state::services::read_state;
2use ic_canister_sig_creation::signature_map::LABEL_SIG;
3use ic_certification::hash_tree::HashTree;
4use ic_certification::{labeled_hash, pruned, Hash};
5
6fn sigs_root_hash() -> Hash {
7 read_state(|state| state.runtime.sigs.root_hash())
8}
9
10pub fn labeled_sigs_root_hash() -> Hash {
11 labeled_hash(LABEL_SIG, &sigs_root_hash())
12}
13
14pub fn pruned_labeled_sigs_root_hash_tree() -> HashTree<Vec<u8>> {
15 pruned(labeled_hash(LABEL_SIG, &sigs_root_hash()))
16}