identity_storage::storage

Trait JwpDocumentExt

Source
pub trait JwpDocumentExt {
    // Required methods
    fn generate_method_jwp<'life0, 'life1, 'life2, 'async_trait, K, I>(
        &'life0 mut self,
        storage: &'life1 Storage<K, I>,
        key_type: KeyType,
        alg: ProofAlgorithm,
        fragment: Option<&'life2 str>,
        scope: MethodScope,
    ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
       where K: JwkStorageBbsPlusExt + 'async_trait,
             I: KeyIdStorage + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn create_issued_jwp<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I>(
        &'life0 self,
        storage: &'life1 Storage<K, I>,
        fragment: &'life2 str,
        jpt_claims: &'life3 JptClaims,
        options: &'life4 JwpCredentialOptions,
    ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
       where K: JwkStorageBbsPlusExt + 'async_trait,
             I: KeyIdStorage + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn create_presented_jwp<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        presentation: &'life1 mut SelectiveDisclosurePresentation,
        method_id: &'life2 str,
        options: &'life3 JwpPresentationOptions,
    ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn create_credential_jpt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I, T>(
        &'life0 self,
        credential: &'life1 Credential<T>,
        storage: &'life2 Storage<K, I>,
        fragment: &'life3 str,
        options: &'life4 JwpCredentialOptions,
        custom_claims: Option<Object>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Jpt>> + Send + 'async_trait>>
       where K: JwkStorageBbsPlusExt + 'async_trait,
             I: KeyIdStorage + 'async_trait,
             T: ToOwned<Owned = T> + Serialize + DeserializeOwned + Sync + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn create_presentation_jpt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        presentation: &'life1 mut SelectiveDisclosurePresentation,
        method_id: &'life2 str,
        options: &'life3 JwpPresentationOptions,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Jpt>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

Handle JWP-based operations on DID Documents.

Required Methods§

Source

fn generate_method_jwp<'life0, 'life1, 'life2, 'async_trait, K, I>( &'life0 mut self, storage: &'life1 Storage<K, I>, key_type: KeyType, alg: ProofAlgorithm, fragment: Option<&'life2 str>, scope: MethodScope, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Generate new key material in the given storage and insert a new verification method with the corresponding public key material into the DID document. This supports BBS+ keys.

Source

fn create_issued_jwp<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I>( &'life0 self, storage: &'life1 Storage<K, I>, fragment: &'life2 str, jpt_claims: &'life3 JptClaims, options: &'life4 JwpCredentialOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Compute a JWP in the Issued form representing the Verifiable Credential See JSON Web Proof draft

Source

fn create_presented_jwp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, presentation: &'life1 mut SelectiveDisclosurePresentation, method_id: &'life2 str, options: &'life3 JwpPresentationOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Compute a JWP in the Presented form representing the presented Verifiable Credential after the Selective Disclosure of attributes See JSON Web Proof draft

Source

fn create_credential_jpt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I, T>( &'life0 self, credential: &'life1 Credential<T>, storage: &'life2 Storage<K, I>, fragment: &'life3 str, options: &'life4 JwpCredentialOptions, custom_claims: Option<Object>, ) -> Pin<Box<dyn Future<Output = StorageResult<Jpt>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, T: ToOwned<Owned = T> + Serialize + DeserializeOwned + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Produces a JPT where the payload is produced from the given credential.

Source

fn create_presentation_jpt<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, presentation: &'life1 mut SelectiveDisclosurePresentation, method_id: &'life2 str, options: &'life3 JwpPresentationOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<Jpt>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Produces a JPT where the payload contains the Selective Disclosed attributes of 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.

Implementations on Foreign Types§

Source§

impl JwpDocumentExt for CoreDocument

Source§

fn generate_method_jwp<'life0, 'life1, 'life2, 'async_trait, K, I>( &'life0 mut self, storage: &'life1 Storage<K, I>, key_type: KeyType, alg: ProofAlgorithm, fragment: Option<&'life2 str>, scope: MethodScope, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn create_issued_jwp<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I>( &'life0 self, storage: &'life1 Storage<K, I>, fragment: &'life2 str, jpt_claims: &'life3 JptClaims, options: &'life4 JwpCredentialOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source§

fn create_presented_jwp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, presentation: &'life1 mut SelectiveDisclosurePresentation, method_id: &'life2 str, options: &'life3 JwpPresentationOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn create_credential_jpt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I, T>( &'life0 self, credential: &'life1 Credential<T>, storage: &'life2 Storage<K, I>, fragment: &'life3 str, options: &'life4 JwpCredentialOptions, custom_claims: Option<Object>, ) -> Pin<Box<dyn Future<Output = StorageResult<Jpt>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, T: ToOwned<Owned = T> + Serialize + DeserializeOwned + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source§

fn create_presentation_jpt<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, presentation: &'life1 mut SelectiveDisclosurePresentation, method_id: &'life2 str, options: &'life3 JwpPresentationOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<Jpt>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

impl JwpDocumentExt for IotaDocument

Source§

fn generate_method_jwp<'life0, 'life1, 'life2, 'async_trait, K, I>( &'life0 mut self, storage: &'life1 Storage<K, I>, key_type: KeyType, alg: ProofAlgorithm, fragment: Option<&'life2 str>, scope: MethodScope, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn create_issued_jwp<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I>( &'life0 self, storage: &'life1 Storage<K, I>, fragment: &'life2 str, jpt_claims: &'life3 JptClaims, options: &'life4 JwpCredentialOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source§

fn create_presented_jwp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, presentation: &'life1 mut SelectiveDisclosurePresentation, method_id: &'life2 str, options: &'life3 JwpPresentationOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn create_credential_jpt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, K, I, T>( &'life0 self, credential: &'life1 Credential<T>, storage: &'life2 Storage<K, I>, fragment: &'life3 str, options: &'life4 JwpCredentialOptions, custom_claims: Option<Object>, ) -> Pin<Box<dyn Future<Output = StorageResult<Jpt>> + Send + 'async_trait>>
where K: JwkStorageBbsPlusExt + 'async_trait, I: KeyIdStorage + 'async_trait, T: ToOwned<Owned = T> + Serialize + DeserializeOwned + Sync + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source§

fn create_presentation_jpt<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, presentation: &'life1 mut SelectiveDisclosurePresentation, method_id: &'life2 str, options: &'life3 JwpPresentationOptions, ) -> Pin<Box<dyn Future<Output = StorageResult<Jpt>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§