KeysDatabase

Trait KeysDatabase 

Source
pub trait KeysDatabase {
    type Err: Into<Error> + From<Error>;

    // Required methods
    fn begin_transaction<'a, 'async_trait>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn KeysDatabaseTransaction<'a, Self::Err> + Send + Sync + 'a>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
    fn get_active_keyset_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        unit: &'life1 CurrencyUnit,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Id>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_active_keysets<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<CurrencyUnit, Id>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_keyset_info<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 Id,
    ) -> Pin<Box<dyn Future<Output = Result<Option<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_keyset_infos<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Mint Keys Database trait

Required Associated Types§

Source

type Err: Into<Error> + From<Error>

Mint Keys Database Error

Required Methods§

Source

fn begin_transaction<'a, 'async_trait>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn KeysDatabaseTransaction<'a, Self::Err> + Send + Sync + 'a>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Beings a transaction

Source

fn get_active_keyset_id<'life0, 'life1, 'async_trait>( &'life0 self, unit: &'life1 CurrencyUnit, ) -> Pin<Box<dyn Future<Output = Result<Option<Id>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get Active Keyset

Source

fn get_active_keysets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<CurrencyUnit, Id>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all Active Keyset

Source

fn get_keyset_info<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 Id, ) -> Pin<Box<dyn Future<Output = Result<Option<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_keyset_infos<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MintKeySetInfo>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§