pub trait VerifySignature {
    type SignerId;
    type Payload;
    type Signature;

    // Required methods
    fn verify(
        signer: &Self::SignerId,
        payload: &Self::Payload,
        signature: &Self::Signature
    ) -> SignatureVerificationResult;
    fn weight(payload_byte_length: usize) -> Weight;
}
Expand description

A signature verification implementation.

Required Associated Types§

source

type SignerId

The identifier of the signer.

source

type Payload

The type of the payload that can be verified with the implementation.

source

type Signature

The type of the signature that is expected by the implementation.

Required Methods§

source

fn verify( signer: &Self::SignerId, payload: &Self::Payload, signature: &Self::Signature ) -> SignatureVerificationResult

Verifies that the signature matches the payload and has been generated by the signer.

source

fn weight(payload_byte_length: usize) -> Weight

The weight if the signature verification.

Implementors§

source§

impl<Account, Payload> VerifySignature for EqualVerify<Account, Payload>where Account: PartialEq, Payload: PartialEq,

§

type SignerId = Account

§

type Payload = Payload

§

type Signature = (Account, Payload)

source§

impl<Account, Payload, Signature: Default> VerifySignature for AlwaysVerify<Account, Payload, Signature>

§

type SignerId = Account

§

type Payload = Payload

§

type Signature = Signature