referrerpolicy=no-referrer-when-downgrade

Trait BeefyAuthorityId

Source
pub trait BeefyAuthorityId<MsgHash: Hash>: RuntimeAppPublic {
    // Required method
    fn verify(
        &self,
        signature: &<Self as RuntimeAppPublic>::Signature,
        msg: &[u8],
    ) -> bool;
}
Expand description

Trait representing BEEFY authority id, including custom signature verification.

Accepts custom hashing fn for the message and custom convertor fn for the signer.

Required Methods§

Source

fn verify( &self, signature: &<Self as RuntimeAppPublic>::Signature, msg: &[u8], ) -> bool

Verify a signature.

Return true if signature over msg is valid for this id.

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.

Implementors§

Source§

impl<H> BeefyAuthorityId<H> for sp_consensus_beefy::ecdsa_bls_crypto::AuthorityId
where H: Hash, H::Output: Into<[u8; 32]>,

Source§

impl<MsgHash: Hash> BeefyAuthorityId<MsgHash> for sp_consensus_beefy::bls_crypto::AuthorityId
where <MsgHash as Hash>::Output: Into<[u8; 32]>,

Source§

impl<MsgHash: Hash> BeefyAuthorityId<MsgHash> for sp_consensus_beefy::ecdsa_crypto::AuthorityId
where <MsgHash as Hash>::Output: Into<[u8; 32]>,