referrerpolicy=no-referrer-when-downgrade
polkadot_service::runtime_traits

Trait Verify

Source
pub trait Verify {
    type Signer: IdentifyAccount;

    // Required method
    fn verify<L>(
        &self,
        msg: L,
        signer: &<Self::Signer as IdentifyAccount>::AccountId,
    ) -> bool
       where L: Lazy<[u8]>;
}
Expand description

Means of signature verification.

Required Associated Types§

Source

type Signer: IdentifyAccount

Type of the signer.

Required Methods§

Source

fn verify<L>( &self, msg: L, signer: &<Self::Signer as IdentifyAccount>::AccountId, ) -> bool
where L: Lazy<[u8]>,

Verify a signature.

Return true if signature is valid for the value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Verify for CryptoBytes<sp_core::::ecdsa::Signature::{constant#0}, (SignatureTag, EcdsaTag)>

Source§

type Signer = CryptoBytes<sp_core::::ecdsa::Public::{constant#0}, (PublicTag, EcdsaTag)>

Source§

fn verify<L>( &self, msg: L, signer: &CryptoBytes<sp_core::::ecdsa::Public::{constant#0}, (PublicTag, EcdsaTag)>, ) -> bool
where L: Lazy<[u8]>,

Source§

impl Verify for CryptoBytes<sp_core::::ed25519::Signature::{constant#0}, (SignatureTag, Ed25519Tag)>

Source§

type Signer = CryptoBytes<sp_core::::ed25519::Public::{constant#0}, (PublicTag, Ed25519Tag)>

Source§

fn verify<L>( &self, msg: L, signer: &CryptoBytes<sp_core::::ed25519::Public::{constant#0}, (PublicTag, Ed25519Tag)>, ) -> bool
where L: Lazy<[u8]>,

Source§

impl Verify for CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>

Source§

type Signer = CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>

Source§

fn verify<L>( &self, msg: L, signer: &CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>, ) -> bool
where L: Lazy<[u8]>,

Implementors§