Type Alias sp_application_crypto::ecdsa::Public

pub type Public = CryptoBytes<sp_core::::ecdsa::Public::{constant#0}, (PublicTag, EcdsaTag)>;
Expand description

The ECDSA compressed public key.

Aliased Type§

struct Public(pub [u8; 33], _);

Fields§

§0: [u8; 33]

Trait Implementations§

source§

impl From<Public> for Public

source§

fn from(outer: Public) -> Self

Converts to this type from the input type.
source§

impl RuntimePublic for Public

§

type Signature = CryptoBytes<sp_core::::ecdsa::Signature::{constant#0}, (SignatureTag, EcdsaTag)>

The signature that will be generated when signing with the corresponding private key.
source§

fn all(key_type: KeyTypeId) -> Vec<Self>

Returns all public keys for the given key type in the keystore.
source§

fn generate_pair(key_type: KeyTypeId, seed: Option<Vec<u8>>) -> Self

Generate a public/private pair for the given key type with an optional seed and store it in the keystore. Read more
source§

fn sign<M: AsRef<[u8]>>( &self, key_type: KeyTypeId, msg: &M, ) -> Option<Self::Signature>

Sign the given message with the corresponding private key of this public key. Read more
source§

fn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool

Verify that the given signature matches the given message using this public key.
source§

fn to_raw_vec(&self) -> Vec<u8>

Returns Self as raw vec.