Skip to main content

MintAuthDatabase

Trait MintAuthDatabase 

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

    // Required methods
    fn begin_transaction<'a, 'async_trait>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn MintAuthTransaction<Self::Err> + Send + Sync + 'a>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
    fn get_active_keyset_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<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;
    fn get_proofs_states<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ys: &'life1 [PublicKey],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<State>>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_blind_signatures<'life0, 'life1, 'async_trait>(
        &'life0 self,
        blinded_messages: &'life1 [PublicKey],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<BlindSignature>>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_auth_for_endpoint<'life0, 'async_trait>(
        &'life0 self,
        protected_endpoint: ProtectedEndpoint,
    ) -> Pin<Box<dyn Future<Output = Result<Option<AuthRequired>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_auth_for_endpoints<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<ProtectedEndpoint, Option<AuthRequired>>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Mint Database trait

Required Associated Types§

Source

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

Mint Database Error

Required Methods§

Source

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

Begins a transaction

Source

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

Get 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,

Source

fn get_proofs_states<'life0, 'life1, 'async_trait>( &'life0 self, ys: &'life1 [PublicKey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<State>>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get AuthProof state

Source

fn get_blind_signatures<'life0, 'life1, 'async_trait>( &'life0 self, blinded_messages: &'life1 [PublicKey], ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<BlindSignature>>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_auth_for_endpoint<'life0, 'async_trait>( &'life0 self, protected_endpoint: ProtectedEndpoint, ) -> Pin<Box<dyn Future<Output = Result<Option<AuthRequired>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get auth for protected_endpoint

Source

fn get_auth_for_endpoints<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<ProtectedEndpoint, Option<AuthRequired>>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get protected endpoints

Implementors§