1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (c) 2022 MASSA LABS <info@massa.net>

use displaydoc::Display;
use thiserror::Error;

#[non_exhaustive]
#[derive(Display, Error, Debug, Clone)]
/// Error generated by massa-signature crate
pub enum MassaSignatureError {
    /// Parsing error: {0}
    ParsingError(String),

    /// Signature error : {0}
    SignatureError(String),

    /// Wrong prefix for hash: expected {0}, got {1}
    WrongPrefix(String, String),

    /// invalid version identifier: {0}
    InvalidVersionError(String),
}