Rename beacon_chain/ -> eth2/

This commit is contained in:
Paul Hauner
2019-01-22 16:16:02 +11:00
parent 87c73b1af9
commit e16f9e0aec
92 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
use super::{PublicKey, SecretKey};
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Keypair {
pub sk: SecretKey,
pub pk: PublicKey,
}
impl Keypair {
/// Instantiate a Keypair using SecretKey::random().
pub fn random() -> Self {
let sk = SecretKey::random();
let pk = PublicKey::from_secret_key(&sk);
Keypair { sk, pk }
}
}