mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 21:08:32 +00:00
add point and from_point to GenericSecretKey
This commit is contained in:
@@ -61,6 +61,20 @@ where
|
|||||||
GenericPublicKey::from_point(self.point.public_key())
|
GenericPublicKey::from_point(self.point.public_key())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a reference to the underlying BLS point.
|
||||||
|
pub fn point(&self) -> &Sec {
|
||||||
|
&self.point
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Instantiates `Self` from a `point`.
|
||||||
|
pub fn from_point(point: Sec) -> Self {
|
||||||
|
Self {
|
||||||
|
point,
|
||||||
|
_phantom_signature: PhantomData,
|
||||||
|
_phantom_public_key: PhantomData,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Serialize `self` as compressed bytes.
|
/// Serialize `self` as compressed bytes.
|
||||||
///
|
///
|
||||||
/// ## Note
|
/// ## Note
|
||||||
|
|||||||
Reference in New Issue
Block a user