Trait SparkSigner

Source
pub trait SparkSigner:
    SparkSignerShamir
    + SparkSignerEcdsa
    + SparkSignerEcies
    + SparkSignerFrost
    + SparkSignerSecp256k1
    + SparkSignerFrostSigning
    + SparkSignerDerivationPath {
    type WrappedSigner: Sized;

    // Required methods
    fn from_mnemonic<'life0, 'async_trait>(
        mnemonic: &'life0 str,
        network: SparkNetwork,
    ) -> Pin<Box<dyn Future<Output = Result<Self::WrappedSigner, SparkSdkError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn from_master_seed<'life0, 'async_trait>(
        master_seed: &'life0 [u8],
        network: SparkNetwork,
    ) -> Pin<Box<dyn Future<Output = Result<Self::WrappedSigner, SparkSdkError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Source

type WrappedSigner: Sized

The constructed signer type, wrapped in an Arc<parking_lot::RwLock<>>

Required Methods§

Source

fn from_mnemonic<'life0, 'async_trait>( mnemonic: &'life0 str, network: SparkNetwork, ) -> Pin<Box<dyn Future<Output = Result<Self::WrappedSigner, SparkSdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates a new signer instance from a mnemonic (BIP-39).

§Arguments
  • mnemonic - The mnemonic to derive keys from
§Returns

A new instance of Self

Source

fn from_master_seed<'life0, 'async_trait>( master_seed: &'life0 [u8], network: SparkNetwork, ) -> Pin<Box<dyn Future<Output = Result<Self::WrappedSigner, SparkSdkError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Creates a new signer instance from a seed.

§Arguments
  • seed - The seed bytes to derive keys from
§Returns

A new instance of Self

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§