mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-28 10:13:37 +00:00
Update to latest interop keypair spec
This commit is contained in:
@@ -20,6 +20,10 @@ impl PublicKey {
|
||||
PublicKey(RawPublicKey::from_secret_key(secret_key.as_raw()))
|
||||
}
|
||||
|
||||
pub fn from_raw(raw: RawPublicKey) -> Self {
|
||||
Self(raw)
|
||||
}
|
||||
|
||||
/// Returns the underlying signature.
|
||||
pub fn as_raw(&self) -> &RawPublicKey {
|
||||
&self.0
|
||||
|
||||
@@ -20,6 +20,10 @@ impl SecretKey {
|
||||
SecretKey(RawSecretKey::random(&mut rand::thread_rng()))
|
||||
}
|
||||
|
||||
pub fn from_raw(raw: RawSecretKey) -> Self {
|
||||
Self(raw)
|
||||
}
|
||||
|
||||
/// Returns the underlying point as compressed bytes.
|
||||
fn as_bytes(&self) -> Vec<u8> {
|
||||
self.as_raw().as_bytes()
|
||||
|
||||
Reference in New Issue
Block a user