DidResolver

Trait DidResolver 

Source
pub trait DidResolver: Send + Sync {
    // Required methods
    fn method(&self) -> &str;
    fn resolve<'a>(
        &'a self,
        did: &'a str,
    ) -> Pin<Box<dyn Future<Output = DidResolutionResult> + Send + 'a>>;
}
Expand description

A resolver that can dereference a DID string to a DidResolutionResult.

Per W3C DID Core §7.1, resolve must return the complete resolution result including document metadata and resolution metadata — even on failure (the error is encoded in did_resolution_metadata.error).

Required Methods§

Source

fn method(&self) -> &str

The DID method this resolver handles (e.g., "ndn", "key").

Source

fn resolve<'a>( &'a self, did: &'a str, ) -> Pin<Box<dyn Future<Output = DidResolutionResult> + Send + 'a>>

Resolve the DID, returning the full W3C resolution result.

Implementors§