Trait TrustchainDIDAPI

Source
pub trait TrustchainDIDAPI {
    // Provided methods
    fn create(
        document_state: Option<DocumentState>,
        verbose: bool,
    ) -> Result<String, Box<dyn Error>> { ... }
    fn attest<'life0, 'life1, 'async_trait>(
        did: &'life0 str,
        controlled_did: &'life1 str,
        verbose: bool,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn resolve<'life0, 'life1, 'async_trait>(
        did: &'life0 str,
        resolver: &'life1 dyn TrustchainResolver,
    ) -> Pin<Box<dyn Future<Output = ResolverResult> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn verify<'life0, 'life1, 'async_trait, T, U>(
        did: &'life0 str,
        root_event_time: Timestamp,
        verifier: &'life1 U,
    ) -> Pin<Box<dyn Future<Output = Result<DIDChain, VerifierError>> + Send + 'async_trait>>
       where T: DIDResolver + Send + 'async_trait,
             U: Verifier<T> + Send + Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

API for Trustchain DID functionality.

Provided Methods§

Source

fn create( document_state: Option<DocumentState>, verbose: bool, ) -> Result<String, Box<dyn Error>>

Creates a controlled DID from a passed document state, writing the associated create operation to file in the operations path returning the file name including the created DID suffix.

Source

fn attest<'life0, 'life1, 'async_trait>( did: &'life0 str, controlled_did: &'life1 str, verbose: bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait,

An uDID attests to a dDID, writing the associated update operation to file in the operations path.

Source

fn resolve<'life0, 'life1, 'async_trait>( did: &'life0 str, resolver: &'life1 dyn TrustchainResolver, ) -> Pin<Box<dyn Future<Output = ResolverResult> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait,

Resolves a given DID using given endpoint.

Source

fn verify<'life0, 'life1, 'async_trait, T, U>( did: &'life0 str, root_event_time: Timestamp, verifier: &'life1 U, ) -> Pin<Box<dyn Future<Output = Result<DIDChain, VerifierError>> + Send + 'async_trait>>
where T: DIDResolver + Send + 'async_trait, U: Verifier<T> + Send + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Verifies a given DID using a resolver available at given endpoint, returning a result.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§