Initial commit

This commit is contained in:
Paul Hauner
2018-07-06 17:54:07 +10:00
commit 7db81b167f
18 changed files with 519 additions and 0 deletions

13
src/utils/bls.rs Normal file
View File

@@ -0,0 +1,13 @@
extern crate bls;
extern crate pairing;
use self::bls::AggregateSignature as GenericAggregateSignature;
use self::bls::Signature as GenericSignature;
use self::bls::Keypair as GenericKeypair;
use self::bls::PublicKey as GenericPublicKey;
use self::pairing::bls12_381::Bls12;
pub type AggregateSignature = GenericAggregateSignature<Bls12>;
pub type Signature = GenericSignature<Bls12>;
pub type Keypair = GenericKeypair<Bls12>;
pub type PublicKey = GenericPublicKey<Bls12>;

4
src/utils/mod.rs Normal file
View File

@@ -0,0 +1,4 @@
extern crate ethereum_types;
pub mod types;
pub mod bls;

7
src/utils/types.rs Normal file
View File

@@ -0,0 +1,7 @@
use super::ethereum_types::{ H256, H160 };
pub type Sha256Digest = H256;
pub type Address = H160;
pub type Bitfield = Vec<u8>;