Skip to main content

SuiRandomizedSigner

Trait SuiRandomizedSigner 

Source
pub trait SuiRandomizedSigner {
    // Required methods
    fn sign_transaction_with_rng(
        &self,
        rng: &mut dyn CryptoRngCore,
        transaction: &Transaction,
    ) -> Result<UserSignature, SignatureError>;
    fn sign_personal_message_with_rng(
        &self,
        rng: &mut dyn CryptoRngCore,
        message: &PersonalMessage<'_>,
    ) -> Result<UserSignature, SignatureError>;
}
Available on crate feature mldsa65 only.
Expand description

Interface for signing user transactions and messages with a scheme that takes fresh randomness per signature

Randomized counterpart of SuiSigner. Today that is ML-DSA-65 only.

§Note

There is a blanket implementation of SuiRandomizedSigner for all T where T: [signature::RandomizedSigner]<[UserSignature]>, which handles the proper construction of the signing message.

The rng is taken as &mut dyn CryptoRngCore rather than &mut impl CryptoRngCore so that the trait stays dyn-compatible, like SuiSigner, and signers can be held as dyn SuiRandomizedSigner.

Required Methods§

Source

fn sign_transaction_with_rng( &self, rng: &mut dyn CryptoRngCore, transaction: &Transaction, ) -> Result<UserSignature, SignatureError>

Source

fn sign_personal_message_with_rng( &self, rng: &mut dyn CryptoRngCore, message: &PersonalMessage<'_>, ) -> Result<UserSignature, SignatureError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: RandomizedSigner<UserSignature>> SuiRandomizedSigner for T