Trait Verify

Source
pub trait Verify {
    type Signer: IdentifyAccount;

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

Means of signature verification.

Required Associated Types§

Source

type Signer: IdentifyAccount

Type of the signer.

Required Methods§

Source

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

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 Signature

Source§

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

Source§

fn verify<L: Lazy<[u8]>>(&self, msg: L, signer: &Public) -> bool

Source§

impl Verify for Signature

Source§

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

Source§

fn verify<L: Lazy<[u8]>>(&self, msg: L, signer: &Public) -> bool

Implementors§

Source§

impl Verify for MultiSignature

Source§

impl Verify for AnySignature

Source§

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

Source§

impl Verify for TestSignature

Source§

impl Verify for UintAuthorityId

Source§

impl Verify for sp_runtime::testing::sr25519::Signature

Source§

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