dissolve util (#7460)

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor finished

* removed obsolete util/src/lib.rs

* removed commented out code
This commit is contained in:
Marek Kotewicz
2018-01-10 13:35:18 +01:00
committed by Svyatoslav Nikolsky
parent 4a4d64be56
commit e95b093483
395 changed files with 744 additions and 1913 deletions

View File

@@ -18,7 +18,7 @@
use secret::Secret;
use Public;
use bigint::hash::H256;
use ethereum_types::H256;
pub use self::derivation::Error as DerivationError;
/// Represents label that can be stored as a part of key derivation
@@ -211,8 +211,7 @@ mod derivation {
use rcrypto::hmac::Hmac;
use rcrypto::mac::Mac;
use rcrypto::sha2::Sha512;
use bigint::hash::{H512, H256};
use bigint::prelude::{U256, U512};
use ethereum_types::{U256, U512, H512, H256};
use secp256k1::key::{SecretKey, PublicKey};
use SECP256K1;
use keccak;
@@ -388,7 +387,7 @@ mod tests {
use super::{ExtendedSecret, ExtendedPublic, ExtendedKeyPair};
use secret::Secret;
use std::str::FromStr;
use bigint::hash::{H128, H256};
use ethereum_types::{H128, H256};
use super::{derivation, Derivation};
fn master_chain_basic() -> (H256, H256) {

View File

@@ -19,7 +19,7 @@
extern crate byteorder;
extern crate crypto as rcrypto;
extern crate edit_distance;
extern crate ethcore_bigint as bigint;
extern crate ethereum_types;
extern crate parity_wordlist;
extern crate rand;
extern crate rustc_hex;
@@ -57,7 +57,10 @@ pub use self::signature::{sign, verify_public, verify_address, recover, Signatur
pub use self::secret::Secret;
pub use self::extended::{ExtendedPublic, ExtendedSecret, ExtendedKeyPair, DerivationError, Derivation};
use bigint::hash::{H160, H256, H512};
use ethereum_types::H256;
pub use ethereum_types::{Address, Public};
pub type Message = H256;
lazy_static! {
pub static ref SECP256K1: secp256k1::Secp256k1 = secp256k1::Secp256k1::new();
@@ -74,7 +77,3 @@ pub trait Generator {
/// Should be called to generate new keypair.
fn generate(&mut self) -> Result<KeyPair, Self::Error>;
}
pub type Address = H160;
pub type Message = H256;
pub type Public = H512;

View File

@@ -17,8 +17,7 @@
use super::{SECP256K1, Public, Secret, Error};
use secp256k1::key;
use secp256k1::constants::{GENERATOR_X, GENERATOR_Y, CURVE_ORDER};
use bigint::prelude::U256;
use bigint::hash::H256;
use ethereum_types::{U256, H256};
/// Whether the public key is valid.
pub fn public_is_valid(public: &Public) -> bool {

View File

@@ -19,7 +19,7 @@ use std::ops::Deref;
use std::str::FromStr;
use rustc_hex::ToHex;
use secp256k1::key;
use bigint::hash::H256;
use ethereum_types::H256;
use {Error, SECP256K1};
#[derive(Clone, PartialEq, Eq)]

View File

@@ -22,7 +22,7 @@ use std::hash::{Hash, Hasher};
use secp256k1::{Message as SecpMessage, RecoverableSignature, RecoveryId, Error as SecpError};
use secp256k1::key::{SecretKey, PublicKey};
use rustc_hex::{ToHex, FromHex};
use bigint::hash::{H520, H256};
use ethereum_types::{H520, H256};
use {Secret, Public, SECP256K1, Error, Message, public_to_address, Address};
/// Signature encoded as RSV components