sui_crypto

Trait SuiSigner

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

Interface for signing user transactions and messages in Sui

§Note

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

Required Methods§

Source

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

Source

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

Implementors§

Source§

impl<T: Signer<UserSignature>> SuiSigner for T