Trait TrustchainVCAPI

Source
pub trait TrustchainVCAPI {
    // Provided methods
    fn sign<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        credential: Credential,
        did: &'life0 str,
        linked_data_proof_options: Option<LinkedDataProofOptions>,
        key_id: Option<&'life1 str>,
        resolver: &'life2 dyn TrustchainResolver,
        context_loader: &'life3 mut ContextLoader,
    ) -> Pin<Box<dyn Future<Output = Result<Credential, IssuerError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
    fn verify_credential<'life0, 'life1, 'life2, 'async_trait, T, U>(
        credential: &'life0 Credential,
        linked_data_proof_options: Option<LinkedDataProofOptions>,
        root_event_time: Timestamp,
        verifier: &'life1 U,
        context_loader: &'life2 mut ContextLoader,
    ) -> Pin<Box<dyn Future<Output = Result<DIDChain, CredentialError>> + Send + 'async_trait>>
       where T: DIDResolver + Send + 'async_trait,
             U: Verifier<T> + Send + Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

API for Trustchain VC functionality.

Provided Methods§

Source

fn sign<'life0, 'life1, 'life2, 'life3, 'async_trait>( credential: Credential, did: &'life0 str, linked_data_proof_options: Option<LinkedDataProofOptions>, key_id: Option<&'life1 str>, resolver: &'life2 dyn TrustchainResolver, context_loader: &'life3 mut ContextLoader, ) -> Pin<Box<dyn Future<Output = Result<Credential, IssuerError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Signs a credential.

Source

fn verify_credential<'life0, 'life1, 'life2, 'async_trait, T, U>( credential: &'life0 Credential, linked_data_proof_options: Option<LinkedDataProofOptions>, root_event_time: Timestamp, verifier: &'life1 U, context_loader: &'life2 mut ContextLoader, ) -> Pin<Box<dyn Future<Output = Result<DIDChain, CredentialError>> + Send + 'async_trait>>
where T: DIDResolver + Send + 'async_trait, U: Verifier<T> + Send + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Verifies a credential

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§