[][src]Struct exonum_keys::Keys

pub struct Keys {
    pub consensus: KeyPair,
    pub service: KeyPair,
}

Struct containing all validator key pairs.

Fields

consensus: KeyPair

Consensus keypair.

service: KeyPair

Service keypair.

Methods

impl Keys[src]

pub fn from_keys(
    consensus_pk: PublicKey,
    consensus_sk: SecretKey,
    service_pk: PublicKey,
    service_sk: SecretKey
) -> Self
[src]

Create validator keys from provided keypairs.

Panics

If public key in any keypair doesn't match with corresponding private key.

impl Keys[src]

pub fn consensus_pk(&self) -> PublicKey[src]

Consensus public key.

pub fn consensus_sk(&self) -> &SecretKey[src]

Consensus private key.

pub fn service_pk(&self) -> PublicKey[src]

Service public key.

pub fn service_sk(&self) -> &SecretKey[src]

Service secret key.

Trait Implementations

impl Clone for Keys[src]

impl Default for Keys[src]

impl Eq for Keys[src]

impl PartialEq<Keys> for Keys[src]

impl Debug for Keys[src]

impl StructuralPartialEq for Keys[src]

impl StructuralEq for Keys[src]

impl Serialize for Keys[src]

impl<'de> Deserialize<'de> for Keys[src]

Auto Trait Implementations

impl Send for Keys

impl Sync for Keys

impl Unpin for Keys

impl UnwindSafe for Keys

impl RefUnwindSafe for Keys

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,