use thiserror::Error;
#[derive(Error, Debug)]
#[allow(dead_code)]
pub(crate) enum InternalError {
#[error("Not on curve.")]
CurveDecodingError,
#[error("Not a field element.")]
FieldDecodingError,
#[error("Wrong length of commitment key bytes.")]
CommitmentKeyLengthError,
#[error("Wrong length of commitment bytes.")]
ValueVecLengthError,
#[error("Wrong length of value vec bytes.")]
CommitmentLengthError,
#[error("Wrong value vec length or key length or both.")]
KeyValueLengthMismatch,
}
#[derive(Error, Debug)]
#[error("CommitmentError: {0}")]
pub struct CommitmentError(pub(crate) InternalError);