Enum safe_network::types::Keypair
source · [−]pub enum Keypair {
Ed25519(Arc<Keypair>),
BlsShare(Arc<BlsKeypairShare>),
}
Expand description
Wrapper for different keypair types.
Variants
Ed25519(Arc<Keypair>)
Ed25519 keypair.
BlsShare(Arc<BlsKeypairShare>)
BLS keypair share.
Implementations
Constructs a random Ed25519 keypair.
Constructs a BLS keypair share.
Returns the public key associated with this keypair.
Returns the secret key associated with this keypair.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Keypair
impl UnwindSafe for Keypair
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more