#![no_std]
#![allow(
dead_code,
unused_imports,
reason = "the imported prover stack is intentionally retained behind a narrow crate API"
)]
extern crate alloc;
#[cfg(any(test, feature = "std"))]
extern crate std;
use alloc::vec::Vec;
pub use deferred::session::{SessionInputError, WitnessLocation};
use miden_core::deferred::PrecompileWitness;
pub use miden_core::proof::{HashFunction, PrecompileProof, StarkProof};
pub(crate) mod ec;
pub(crate) mod hash;
pub(crate) mod logup;
pub(crate) mod math;
pub(crate) mod primitives;
pub(crate) mod relations;
pub(crate) mod session;
pub(crate) mod stark_config;
pub(crate) mod transcript;
pub(crate) mod uint;
pub(crate) mod utils;
pub fn prove_precompiles(
witnesses: Vec<PrecompileWitness>,
hash_fn: HashFunction,
) -> Result<PrecompileProof, PrecompileProvingError> {
deferred::session::prove(witnesses, hash_fn)
}
#[derive(Debug, thiserror::Error)]
pub enum PrecompileProvingError {
#[error(transparent)]
Input(#[from] SessionInputError),
#[error(transparent)]
Prove(#[from] ProveError),
}
#[derive(Debug, thiserror::Error)]
pub enum ProveError {
#[error("chiplet stack declares preprocessed columns, but no preprocessed bundle was built")]
MissingPreprocessed,
#[error(transparent)]
Preprocessed(#[from] miden_lifted_stark::PreprocessedValidationError),
#[error(transparent)]
Prover(#[from] miden_lifted_stark::ProverError),
#[error("failed to serialize STARK proof: {0}")]
Serialization(#[from] wincode::error::WriteError),
}
pub(crate) mod deferred;
#[cfg(test)]
mod tests;