// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (C) 2026 Ignalina ApS and Vetra Automation AB
//! Heimdall core: the job API ([`JobRunner`]), Job, Policy, JobResult,
//! SignedResult and key handling (spec §7). See docs/API.md.
//!
//! **Heimdall is a defensive sandbox.** It runs untrusted work so that a
//! compromised job can touch nothing but its own input and output, and the
//! caller trusts only Heimdall's signed verdict. This crate holds the types
//! every layer shares, the per-boot Ed25519 key, the canonical (signed) byte
//! encoding of a result, and the caller-side verification.
//!
//! The flow: Heimdall boots, makes a [`BootKey`] and hands its [`PinnedKey`]
//! to callers out of band. A caller builds a [`Job`] (fresh [`JobId`] and
//! [`Nonce`]) and keeps its [`JobTicket`]. Heimdall runs the job and returns
//! [`BootKey::sign`]'s [`SignedResult`] as wire bytes. The caller runs
//! [`Verifier::accept`] with the ticket, then [`check_outputs`] on out/.
//!
//! The milestone 0 flow (Holger): construct a [`JobRunner`], pin its
//! [`JobRunner::verifying_key`], call [`JobRunner::run`], then [`verify`] and
//! [`check_outputs`].
#![forbid(unsafe_code)]
pub use ed25519_dalek;
pub mod codec;
pub mod codes;
#[doc(hidden)]
pub mod fuzz_api;
pub mod hex;
mod outputs;
mod runner;
mod signed;
mod types;
pub use codec::{decode_result, encode_result, DecodeError};
pub use outputs::*;
pub use runner::*;
pub use signed::*;
pub use types::*;