use thiserror::Error;
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Error)]
pub(crate) enum InternalError {
#[error("Cannot decompress Edwards point.")]
PointDecompression,
#[error("Cannot use scalar with high-bit set.")]
ScalarFormat,
#[error("{name} must be {length} bytes in length.")]
BytesLength { name: &'static str, length: usize },
#[error("Verification equation was not satisfied.")]
Verify,
}
#[derive(Clone, Copy, Eq, PartialEq, Hash, Debug, Error)]
#[error("ProofError: {0}")]
pub struct ProofError(pub(crate) InternalError);