#[non_exhaustive]pub enum Pubkey {
Ed25519(Binary),
Secp256k1(Binary),
Sr25519(Binary),
}Expand description
A Tendermint validator pubkey.
See https://github.com/tendermint/tendermint/blob/master/proto/tendermint/crypto/keys.proto for a list of available types. Sr25519 is added here as it is likely to join the party.
This type is optimized for the JSON interface. No data validation on the enum cases is performed.
If you don’t trust the data source, you can create a ValidatedPubkey enum that mirrors this
type and uses fixed sized data fields.
Variants (Non-exhaustive)§
This enum is marked as 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(Binary)
32 bytes Ed25519 pubkey
Secp256k1(Binary)
Must use 33 bytes 0x02/0x03 prefixed compressed pubkey format
Sr25519(Binary)
32 bytes Sr25519 pubkey
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pubkey
impl<'de> Deserialize<'de> for Pubkey
Source§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
Source§impl From<Ed25519Pubkey> for Pubkey
impl From<Ed25519Pubkey> for Pubkey
Source§fn from(ed: Ed25519Pubkey) -> Self
fn from(ed: Ed25519Pubkey) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for Pubkey
impl JsonSchema for Pubkey
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Ord for Pubkey
impl Ord for Pubkey
Source§impl PartialOrd for Pubkey
impl PartialOrd for Pubkey
Source§impl<'a> TryFrom<&'a Pubkey> for Ed25519Pubkey
impl<'a> TryFrom<&'a Pubkey> for Ed25519Pubkey
Source§impl TryFrom<Pubkey> for Ed25519Pubkey
impl TryFrom<Pubkey> for Ed25519Pubkey
impl Eq for Pubkey
impl StructuralPartialEq for Pubkey
Auto Trait Implementations§
impl Freeze for Pubkey
impl RefUnwindSafe for Pubkey
impl Send for Pubkey
impl Sync for Pubkey
impl Unpin for Pubkey
impl UnwindSafe for Pubkey
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