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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: '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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: '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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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<BTreeMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Jpt, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: ToOwned<Owned = T> + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: '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 = Result<Jpt, JwkStorageDocumentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
}
Expand description
Handle JWP-based operations on DID Documents.
Required Methods§
Sourcefn 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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: 'async_trait,
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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: '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.
Sourcefn 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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: '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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
Self: 'async_trait,
Compute a JWP in the Issued form representing the Verifiable Credential See JSON Web Proof draft
Sourcefn 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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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 = Result<String, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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
Sourcefn 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<BTreeMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Jpt, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: ToOwned<Owned = T> + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: '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<BTreeMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<Jpt, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
K: JwkStorageBbsPlusExt + 'async_trait,
I: KeyIdStorage + 'async_trait,
T: ToOwned<Owned = T> + Serialize + DeserializeOwned + Sync + 'async_trait,
Self: 'async_trait,
Produces a JPT where the payload is produced from the given credential
.
Sourcefn 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 = Result<Jpt, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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 = Result<Jpt, JwkStorageDocumentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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.