referrerpolicy=no-referrer-when-downgrade
sp_application_crypto::bandersnatch

Type Alias Public

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

Bandersnatch public key.

Aliased Type§

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

Fields§

§0: [u8; 32]

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

Source§

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

Dummy implementation. Returns an empty vector.

Source§

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

The signature that will be generated when signing with the corresponding private key.
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 generate_proof_of_possession( &mut self, key_type: KeyTypeId, ) -> Option<Self::Signature>

Generate proof of possession of the corresponding public key Read more
Source§

fn verify_proof_of_possession( &self, proof_of_possession: &Self::Signature, ) -> bool

Verify that the given proof of possession is valid for the corresponding public key.
Source§

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

Returns Self as raw vec.