Skip to main content

PlatformMessageSignable

Trait PlatformMessageSignable 

Source
pub trait PlatformMessageSignable {
    // Required methods
    fn verify_signature(
        &self,
        public_key_type: KeyType,
        public_key_data: &[u8],
        signature: &[u8],
    ) -> SimpleConsensusValidationResult;
    fn sign_by_private_key(
        &self,
        private_key: &[u8],
        key_type: KeyType,
        bls: &impl BlsModule,
    ) -> Result<Vec<u8>, ProtocolError>;
}

Required Methods§

Source

fn verify_signature( &self, public_key_type: KeyType, public_key_data: &[u8], signature: &[u8], ) -> SimpleConsensusValidationResult

Source

fn sign_by_private_key( &self, private_key: &[u8], key_type: KeyType, bls: &impl BlsModule, ) -> Result<Vec<u8>, ProtocolError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PlatformMessageSignable for &[u8]

Source§

fn verify_signature( &self, public_key_type: KeyType, public_key_data: &[u8], signature: &[u8], ) -> SimpleConsensusValidationResult

Source§

fn sign_by_private_key( &self, private_key: &[u8], key_type: KeyType, bls: &impl BlsModule, ) -> Result<Vec<u8>, ProtocolError>

Implementors§