pub enum TendermintKey {
AccountKey(PublicKey),
ConsensusKey(PublicKey),
}
Expand description
Public key roles used in Tendermint networks
Variants§
AccountKey(PublicKey)
User signing keys used for interacting with accounts in the state machine
ConsensusKey(PublicKey)
Validator signing keys used for authenticating consensus protocol messages
Implementations§
Source§impl TendermintKey
impl TendermintKey
Sourcepub fn new_account_key(public_key: PublicKey) -> Result<TendermintKey, Error>
pub fn new_account_key(public_key: PublicKey) -> Result<TendermintKey, Error>
Create a new account key from a PublicKey
Sourcepub fn new_consensus_key(public_key: PublicKey) -> Result<TendermintKey, Error>
pub fn new_consensus_key(public_key: PublicKey) -> Result<TendermintKey, Error>
Create a new consensus key from a PublicKey
Sourcepub fn public_key(&self) -> &PublicKey
pub fn public_key(&self) -> &PublicKey
Get the PublicKey
value for this TendermintKey
Trait Implementations§
Source§impl Clone for TendermintKey
impl Clone for TendermintKey
Source§fn clone(&self) -> TendermintKey
fn clone(&self) -> TendermintKey
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TendermintKey
impl Debug for TendermintKey
Source§impl Ord for TendermintKey
impl Ord for TendermintKey
Source§fn cmp(&self, other: &TendermintKey) -> Ordering
fn cmp(&self, other: &TendermintKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TendermintKey
impl PartialEq for TendermintKey
Source§impl PartialOrd for TendermintKey
impl PartialOrd for TendermintKey
impl Copy for TendermintKey
impl Eq for TendermintKey
impl StructuralPartialEq for TendermintKey
Auto Trait Implementations§
impl Freeze for TendermintKey
impl RefUnwindSafe for TendermintKey
impl Send for TendermintKey
impl Sync for TendermintKey
impl Unpin for TendermintKey
impl UnwindSafe for TendermintKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more