Skip to main content

VerificationMethodResolver

Trait VerificationMethodResolver 

Source
pub trait VerificationMethodResolver: Send + Sync {
    // Required method
    fn resolve_vm<'life0, 'life1, 'async_trait>(
        &'life0 self,
        vm: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ResolvedKey, DataIntegrityError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Resolves a verification-method URI to its public key.

Implementors may do anything — purely local decoding (did:key), HTTP fetches (did:web), cached DID document lookups, HSM introspection. The method is async because the typical implementation involves I/O.

A blanket &T: VerificationMethodResolver impl means callers can pass a borrow of any resolver without wrapping it.

Required Methods§

Source

fn resolve_vm<'life0, 'life1, 'async_trait>( &'life0 self, vm: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ResolvedKey, DataIntegrityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve a verification-method URI, returning its key type and raw public-key bytes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§