pub trait DpkiService: Send + Sync {
    // Required methods
    fn is_key_valid<'life0, 'async_trait>(
        &'life0 self,
        key: AgentPubKey,
        timestamp: Timestamp
    ) -> Pin<Box<dyn Future<Output = DpkiServiceResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn key_mutation<'life0, 'async_trait>(
        &'life0 self,
        old_key: Option<AgentPubKey>,
        new_key: Option<AgentPubKey>
    ) -> Pin<Box<dyn Future<Output = DpkiServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cell_ids<'a>(&'a self) -> HashSet<&'a CellId>;
}
Expand description

Interface for the DPKI service

Required Methods§

source

fn is_key_valid<'life0, 'async_trait>( &'life0 self, key: AgentPubKey, timestamp: Timestamp ) -> Pin<Box<dyn Future<Output = DpkiServiceResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check if the key is valid (properly created and not revoked) as-at the given Timestamp

source

fn key_mutation<'life0, 'async_trait>( &'life0 self, old_key: Option<AgentPubKey>, new_key: Option<AgentPubKey> ) -> Pin<Box<dyn Future<Output = DpkiServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Defines the different ways that keys can be created and destroyed: If an old key is specified, it will be destroyed If a new key is specified, it will be registered If both a new and an old key are specified, the new key will atomically replace the old key (If no keys are specified, nothing will happen)

source

fn cell_ids<'a>(&'a self) -> HashSet<&'a CellId>

The CellIds in use by this service, which need to be protected

Implementors§

source§

impl DpkiService for DeepkeyBuiltin

source§

impl DpkiService for MockDpkiService

Interface for the DPKI service