use crate::{AudienceId, DelegatedRoleGrant, Principal};
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IssuerDelegation {
pub root: Principal,
pub issuer: Principal,
pub binding_hash: [u8; 32],
pub seed_hash: [u8; 32],
pub max_token_ttl_ns: u64,
pub audience: AudienceId,
pub grants: Vec<DelegatedRoleGrant>,
pub not_before_ns: u64,
pub expires_at_ns: u64,
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DelegationCertificate {
pub delegation: IssuerDelegation,
pub issued_at_ns: u64,
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DelegationLeaf {
pub delegation: IssuerDelegation,
pub proof_epoch: u64,
pub registry_epoch: u64,
pub registry_hash: [u8; 32],
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RootBatchHeader {
pub schema_version: u16,
pub root: Principal,
pub batch_id: [u8; 32],
pub proof_epoch: u64,
pub registry_epoch: u64,
pub registry_hash: [u8; 32],
pub tree_root: [u8; 32],
pub not_before_ns: u64,
pub expires_at_ns: u64,
pub key_name: String,
pub derivation_path_hash: [u8; 32],
pub key_version: u64,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum MerkleStep {
Left([u8; 32]),
Right([u8; 32]),
}