76a61cb3ae
* Import cw3-flex-multisig and cw4-group contracts * Add release_funds to coconut-bandwidth-contract * Create contract.rs file * Add cw multi test and a test that uses it * Use mnemonic for coconut mode too * Stricter access to config file, which contains mnemonic * Update tests * Remove signed deposits dir after merging that into sql db * Clippy nits * More clippy * Remove backtraces features to pass clippy tests * Merge the same mnemonic for rewarding and coconut * Simplify things, letting network monitor use testnet-mode with gateways * Unify the nymd clients * Sqlx common storage for buying/consuming credentials * Link credential storage to credential client * Trigger rewarded_set update on bootstrap error * Fix bug on message signing * Simplify coconut feature in code and set it in validator-api * Update some local consts * Link clients to credential storage * Simplify sql query and change socks5 too * Update attr handling such that public ones are usable * Normalize test addresses * Fix clippy * Merge storages for (non)coconut creds * Fmt miss * Disable wasm client support for now Co-authored-by: durch <durch@users.noreply.github.com>
39 lines
1.2 KiB
Rust
39 lines
1.2 KiB
Rust
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
#[cfg(feature = "coconut")]
|
|
use coconut_interface::{error::CoconutInterfaceError, CoconutError};
|
|
use crypto::asymmetric::encryption::KeyRecoveryError;
|
|
use validator_client::ValidatorClientError;
|
|
|
|
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum Error {
|
|
#[error("The detailed description is yet to be determined")]
|
|
BandwidthCredentialError,
|
|
|
|
#[error("Could not contact any validator")]
|
|
NoValidatorsAvailable,
|
|
|
|
#[cfg(feature = "coconut")]
|
|
#[error("Ran into a coconut error - {0}")]
|
|
CoconutError(#[from] CoconutError),
|
|
|
|
#[cfg(feature = "coconut")]
|
|
#[error("Ran into a coconut interface error - {0}")]
|
|
CoconutInterfaceError(#[from] CoconutInterfaceError),
|
|
|
|
#[error("Ran into a validator client error - {0}")]
|
|
ValidatorClientError(#[from] ValidatorClientError),
|
|
|
|
#[error("Bandwidth operation overflowed. {0}")]
|
|
BandwidthOverflow(String),
|
|
|
|
#[error("There is not associated bandwidth for the given client")]
|
|
MissingBandwidth,
|
|
|
|
#[error("Could not parse the key - {0}")]
|
|
ParsePublicKey(#[from] KeyRecoveryError),
|
|
}
|