[][src]Trait sunshine_core::Keystore

pub trait Keystore<T: Runtime>: Send + Sync {
    type Key: Key<T>;
    type Error: Error;
    fn chain_signer(&self) -> Option<&(dyn ChainSigner<T> + Send + Sync)>;
fn offchain_signer(&self) -> Option<&dyn OffchainSigner<T>>;
#[must_use] fn set_device_key<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        key: &'life1 Self::Key,
        password: &'life2 SecretString,
        force: bool
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn lock<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn unlock<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        password: &'life1 SecretString
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn gen<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = u16> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn change_password_mask<'life0, 'life1, 'async_trait>(
        &'life0 self,
        password: &'life1 SecretString
    ) -> Pin<Box<dyn Future<Output = Result<[u8; 32], Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn apply_mask<'life0, 'life1, 'async_trait>(
        &'life0 self,
        mask: &'life1 [u8; 32],
        gen: u16
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Associated Types

type Key: Key<T>

type Error: Error

Loading content...

Required methods

fn chain_signer(&self) -> Option<&(dyn ChainSigner<T> + Send + Sync)>

fn offchain_signer(&self) -> Option<&dyn OffchainSigner<T>>

#[must_use]fn set_device_key<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    key: &'life1 Self::Key,
    password: &'life2 SecretString,
    force: bool
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn lock<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn unlock<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    password: &'life1 SecretString
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn gen<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = u16> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn change_password_mask<'life0, 'life1, 'async_trait>(
    &'life0 self,
    password: &'life1 SecretString
) -> Pin<Box<dyn Future<Output = Result<[u8; 32], Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn apply_mask<'life0, 'life1, 'async_trait>(
    &'life0 self,
    mask: &'life1 [u8; 32],
    gen: u16
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

Loading content...