sui_crypto

Trait SuiVerifier

Source
pub trait SuiVerifier {
    // Required methods
    fn verify_transaction(
        &self,
        transaction: &Transaction,
        signature: &UserSignature,
    ) -> Result<(), SignatureError>;
    fn verify_personal_message(
        &self,
        message: &PersonalMessage<'_>,
        signature: &UserSignature,
    ) -> Result<(), SignatureError>;
}
Expand description

Interface for verifying user transactions and messages in Sui

§Note

There is a blanket implementation of SuiVerifier for all T where T: Verifier<[UserSignature]> so it is generally recommended for a signer to implement Verifier<UserSignature> and rely on the blanket implementation which handles the proper construction of the signing message.

Required Methods§

Source

fn verify_transaction( &self, transaction: &Transaction, signature: &UserSignature, ) -> Result<(), SignatureError>

Source

fn verify_personal_message( &self, message: &PersonalMessage<'_>, signature: &UserSignature, ) -> Result<(), SignatureError>

Implementors§

Source§

impl<T: Verifier<UserSignature>> SuiVerifier for T