[−][src]Enum tendermint::public_key::PublicKey
Public keys allowed in Tendermint protocols
Variants (Non-exhaustive)
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ed25519(Ed25519)
Ed25519 keys
Secp256k1(Secp256k1)
This is supported on crate feature
secp256k1
only.Secp256k1 keys
Implementations
impl PublicKey
[src]
pub fn from_raw_secp256k1(bytes: &[u8]) -> Option<PublicKey>
[src]
This is supported on crate feature
secp256k1
only.From raw secp256k1 public key bytes
pub fn from_raw_ed25519(bytes: &[u8]) -> Option<PublicKey>
[src]
From raw Ed25519 public key bytes
pub fn ed25519(self) -> Option<Ed25519>
[src]
Get Ed25519 public key
pub fn secp256k1(self) -> Option<Secp256k1>
[src]
This is supported on crate feature
secp256k1
only.Get Secp256k1 public key
pub fn verify(&self, msg: &[u8], signature: &Signature) -> Result<(), Error>
[src]
Verify the given Signature
using this public key
pub fn as_bytes(&self) -> &[u8]
[src]
View this key as a byte slice
pub fn to_bytes(self) -> Vec<u8>
[src]
Get a vector containing the byte serialization of this key
pub fn to_amino_bytes(self) -> Vec<u8>
[src]
Serialize this key as amino bytes
pub fn to_bech32(self, hrp: &str) -> String
[src]
Serialize this key as Bech32 with the given human readable prefix
pub fn to_hex(self) -> String
[src]
Serialize this key as hexadecimal
Trait Implementations
impl Clone for PublicKey
[src]
impl Copy for PublicKey
[src]
impl Debug for PublicKey
[src]
impl<'de> Deserialize<'de> for PublicKey
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for PublicKey
[src]
impl From<PublicKey<Secp256k1>> for PublicKey
[src]
impl From<PublicKey> for PubKeyResponse
[src]
fn from(public_key: PublicKey) -> PubKeyResponse
[src]
impl From<PublicKey> for PublicKey
[src]
impl From<PublicKey> for Id
[src]
impl Ord for PublicKey
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<PublicKey> for PublicKey
[src]
impl PartialOrd<PublicKey> for PublicKey
[src]
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for PublicKey
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for PublicKey
[src]
impl StructuralPartialEq for PublicKey
[src]
impl TryFrom<PubKeyResponse> for PublicKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,