logo
pub trait DIDMethod: Sync {
    fn name(&self) -> &'static str;
fn to_resolver(&self) -> &dyn DIDResolver; fn generate(&self, _source: &Source<'_>) -> Option<String> { ... }
fn did_from_transaction(
        &self,
        _tx: DIDMethodTransaction
    ) -> Result<String, DIDMethodError> { ... }
fn submit_transaction<'life0, 'async_trait>(
        &'life0 self,
        _tx: DIDMethodTransaction
    ) -> Pin<Box<dyn Future<Output = Result<Value, DIDMethodError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn create(
        &self,
        _create: DIDCreate
    ) -> Result<DIDMethodTransaction, DIDMethodError> { ... }
fn update(
        &self,
        _update: DIDUpdate
    ) -> Result<DIDMethodTransaction, DIDMethodError> { ... }
fn recover(
        &self,
        _recover: DIDRecover
    ) -> Result<DIDMethodTransaction, DIDMethodError> { ... }
fn deactivate(
        &self,
        _deactivate: DIDDeactivate
    ) -> Result<DIDMethodTransaction, DIDMethodError> { ... } }
Expand description

An implementation of a DID method.

Depends on the DIDResolver trait. Also includes functionality to generate DIDs.

Some DID Methods are registered in the DID Specification Registries.

Required methods

Get the DID method’s name.

method-name in DID Syntax.

Upcast the DID method as a DID resolver.

This is a workaround for not being able to cast a trait object to a supertrait object.

Implementations should simply return self.

Provided methods

Generate a DID from some source.

Retrieve a DID from a DID method transaction

Submit a DID transaction

Create a DID

Update a DID

Recover a DID

Deactivate a DID

Implementors