chia-sdk-types 0.22.1

Standard Chia types for things such as puzzle info and conditions.
Documentation
use clvmr::{
    reduction::{EvalErr, Reduction},
    Allocator, NodePtr,
};

pub fn run_puzzle(
    allocator: &mut Allocator,
    puzzle: NodePtr,
    solution: NodePtr,
) -> Result<NodePtr, EvalErr> {
    let Reduction(_cost, output) = clvmr::run_program(
        allocator,
        &clvmr::ChiaDialect::new(0),
        puzzle,
        solution,
        11_000_000_000,
    )?;
    Ok(output)
}