Trait TrustchainVPAPI

Source
pub trait TrustchainVPAPI {
    // Provided methods
    fn sign_presentation<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        presentation: Presentation,
        did: &'life0 str,
        key_id: Option<&'life1 str>,
        endpoint: &'life2 str,
        linked_data_proof_options: Option<LinkedDataProofOptions>,
        context_loader: &'life3 mut ContextLoader,
    ) -> Pin<Box<dyn Future<Output = Result<Presentation, PresentationError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
    fn verify_presentation<'life0, 'life1, 'life2, 'async_trait, T, U>(
        presentation: &'life0 Presentation,
        ldp_options: Option<LinkedDataProofOptions>,
        root_event_time: Timestamp,
        verifier: &'life1 U,
        context_loader: &'life2 mut ContextLoader,
    ) -> Pin<Box<dyn Future<Output = Result<(), PresentationError>> + 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 VP functionality.

Provided Methods§

Source

fn sign_presentation<'life0, 'life1, 'life2, 'life3, 'async_trait>( presentation: Presentation, did: &'life0 str, key_id: Option<&'life1 str>, endpoint: &'life2 str, linked_data_proof_options: Option<LinkedDataProofOptions>, context_loader: &'life3 mut ContextLoader, ) -> Pin<Box<dyn Future<Output = Result<Presentation, PresentationError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Signs a presentation constructing a verifiable presentation.

Source

fn verify_presentation<'life0, 'life1, 'life2, 'async_trait, T, U>( presentation: &'life0 Presentation, ldp_options: Option<LinkedDataProofOptions>, root_event_time: Timestamp, verifier: &'life1 U, context_loader: &'life2 mut ContextLoader, ) -> Pin<Box<dyn Future<Output = Result<(), PresentationError>> + 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 verifiable presentation.

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§