useanyhow::Result;useasync_trait::async_trait;/// Abstraction for Hardware-Backed Identity (TPM, Secure Enclave, etc.)
#[async_trait]pubtraitHardwareIdentity: Send + Sync {/// Seal a secret (e.g. key seed) to the hardware.
/// The `label` allows distinct secrets to be stored (e.g. "identity_seed").
async fnseal(&self, label:&str, data:&[u8])->Result<Vec<u8>>;/// Unseal a secret using the hardware's private key.
/// This should fail if the integrity of the machine state is compromised (if PCRs are checked).
async fnunseal(&self, blob:&[u8])->Result<Vec<u8>>;}