Skip to main content

DIDMethodResolver

Trait DIDMethodResolver 

Source
pub trait DIDMethodResolver:
    Send
    + Sync
    + Debug {
    // Required methods
    fn method(&self) -> &str;
    fn resolve_method<'life0, 'life1, 'async_trait>(
        &'life0 self,
        did: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<DIDDoc>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A resolver for a specific DID method. This trait is only available in native builds.

Required Methods§

Source

fn method(&self) -> &str

Returns the method name this resolver handles (e.g., “key”, “web”, “pkh”).

Source

fn resolve_method<'life0, 'life1, 'async_trait>( &'life0 self, did: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DIDDoc>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve a DID to a DID document.

§Parameters
  • did - The DID to resolve
§Returns

The DID document as an Option

Implementors§