mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 20:32:45 +00:00
Rename beacon_chain/ -> eth2/
This commit is contained in:
16
eth2/utils/bls/src/keypair.rs
Normal file
16
eth2/utils/bls/src/keypair.rs
Normal 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 }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user