referrerpolicy=no-referrer-when-downgrade

Type Alias Public

pub type Public = CryptoBytes<sp_core::::paired_crypto::ecdsa_bls381::Public::{constant#0}, (PublicTag, (PairedCryptoTag, EcdsaBls381Tag))>;
Expand description

(ECDSA,BLS12-381) public key pair.

Aliased Type§

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

Fields§

§0: [u8; 177]

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§

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

Dummy implementation. Returns None.

Source§

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

Dummy implementation. Returns false.

Source§

type Signature = CryptoBytes<sp_core::::paired_crypto::ecdsa_bls381::Signature::{constant#0}, (SignatureTag, (PairedCryptoTag, EcdsaBls381Tag))>

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

type ProofOfPossession = CryptoBytes<sp_core::::paired_crypto::ecdsa_bls381::ProofOfPossession::{constant#0}, (SignatureTag, (PairedCryptoTag, EcdsaBls381Tag))>

The Proof Of Possession 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 generate_proof_of_possession( &mut self, key_type: KeyTypeId, owner: &[u8], ) -> Option<Self::ProofOfPossession>

Generates the necessary proof(s) usually as a signature or list of signatures, for the corresponding public key to be accepted as legitimate by the network. Read more
Source§

fn verify_proof_of_possession( &self, owner: &[u8], proof_of_possession: &Self::ProofOfPossession, ) -> bool

Verifies that the given proof is valid for the corresponding public key. The proof is usually a signature or list of signatures, for the corresponding public key to be accepted by the network. It include attestation of the owner of the public key in the form signing the owner’s identity but might also includes other signatures. Read more
Source§

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

Returns Self as raw vec.