-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,075 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) 2022, MaidSafe. | ||
// All rights reserved. | ||
// | ||
// This SAFE Network Software is licensed under the BSD-3-Clause license. | ||
// Please see the LICENSE file for more details. | ||
|
||
use thiserror::Error; | ||
|
||
#[cfg(feature = "serde")] | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
#[derive(Clone, Debug, Eq, PartialEq, Error)] | ||
pub enum Error { | ||
#[error("We need a corresponding public key for each MLSAG ring entry")] | ||
ExpectedAPublicCommitmentsForEachRingEntry, | ||
#[error("The hidden commitment in the MLSAG ring must be of the form: $C - C'$")] | ||
InvalidHiddenCommitmentInRing, | ||
#[error("InputPseudoCommitmentsDoNotSumToOutputCommitments")] | ||
InputPseudoCommitmentsDoNotSumToOutputCommitments, | ||
#[error("The MLSAG ring signature is not valid")] | ||
InvalidRingSignature, | ||
#[error("KeyImage is not on the BLS12-381 G1 Curve")] | ||
KeyImageNotOnCurve, | ||
#[error("BulletProofs Error: {0}")] | ||
BulletProofs(#[from] bls_bulletproofs::ProofError), | ||
#[error("The DBC transaction must have at least one input")] | ||
TransactionMustHaveAnInput, | ||
#[error("key image is not unique across all transaction inputs")] | ||
KeyImageNotUniqueAcrossInputs, | ||
#[error("public key is not unique across all transaction inputs")] | ||
PublicKeyNotUniqueAcrossInputs, | ||
} |
Oops, something went wrong.