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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)