mod accel;
pub mod host;
pub mod linux;
pub mod macos;
pub mod measured;
pub mod probe;
pub mod runtimes;
#[cfg(any(feature = "mesh", feature = "exochain"))]
pub mod cache;
#[cfg(test)]
mod fake_host;
#[cfg(test)]
mod tests_linux;
#[cfg(test)]
mod tests_mac;
pub use host::{ProbeHost, SystemHost};
pub use probe::{
Collected, DEFAULT_FACTS_TTL_SECS, EmulationCache, ProbeConfig, build_facts, probe_capabilities,
refresh_live, valid_image_ref,
};
#[cfg(any(feature = "mesh", feature = "exochain"))]
pub use cache::{CacheError, CachedNodeFacts, InsertOutcome, NodeFactsCache, TierSource};
#[cfg(any(feature = "mesh", feature = "exochain"))]
pub fn probe_and_sign(
host: &dyn ProbeHost,
cfg: &ProbeConfig,
key: &ed25519_dalek::SigningKey,
now: u64,
seq: u64,
ttl_secs: u64,
) -> Result<crate::node_facts_advert::SignedNodeFacts, crate::node_facts_advert::NodeFactsAdvertError>
{
let node_id = crate::node_registry::node_id_from_pubkey(&key.verifying_key().to_bytes());
let facts = build_facts(&node_id, now, ttl_secs, seq, probe_capabilities(host, cfg));
crate::node_facts_advert::sign_node_facts(&facts, key)
}