[−][src]Struct vade_evan::VadeEvan
Implementations
impl VadeEvan
[src]
impl VadeEvan
[src]
pub fn generate_safe_prime() -> Result<String, Box<dyn Error>>
[src]
Generate new safe prime number with ursa
's configured default size.
Can be used to generate values for:
- payload.p_safe
- payload.q_safe
Trait Implementations
impl VadePlugin for VadeEvan
[src]
fn run_custom_function<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
function: &'life2 str,
_options: &'life3 str,
_payload: &'life4 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
function: &'life2 str,
_options: &'life3 str,
_payload: &'life4 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Runs a custom function, currently supports
generate_safe_prime
to generate safe prime numbers forvc_zkp_create_credential_definition
Arguments
method
- method to call a function for (e.g. "did:example")function
- currently only supportsgenerate_safe_prime
_options
- currently not used, so can be left empty_payload
- currently not used, so can be left empty
fn vc_zkp_create_credential_definition<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new credential definition and stores the public part on-chain. The private part (key) needs to be stored in a safe way and must not be shared. A credential definition holds cryptographic material needed to verify proofs. Every definition is bound to one credential schema.
To improve performance, safe prime numbers that are used to derive keys from can be
pre-generated with custom function generate_safe_prime
which can be called with
run_custom_function
.
For these numbers two calls have to be made to create two distinct numbers. They can then
be provided as payload.p_safe
and payload.q_safe
.
Note that options.identity
needs to be whitelisted for this function.
Arguments
method
- method to create a credential definition for (e.g. "did:example")options
- serializedAuthenticationOptions
payload
- serializedCreateCredentialDefinitionPayload
Returns
Option<String>
- The created definition as a JSON object
fn vc_zkp_create_credential_schema<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new zero-knowledge proof credential schema.
Note that options.identity
needs to be whitelisted for this function.
Arguments
method
- method to create a credential schema for (e.g. "did:example")options
- serializedAuthenticationOptions
payload
- serializedCreateCredentialSchemaPayload
Returns
Option<String>
- The created schema as a JSON object
fn vc_zkp_create_revocation_registry_definition<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new revocation registry definition and stores it on-chain. The definition consists of a public and a private part. The public part holds the cryptographic material needed to create non-revocation proofs. The private part needs to reside with the registry owner and is used to revoke credentials.
Note that options.identity
needs to be whitelisted for this function.
Arguments
method
- method to create a revocation registry definition for (e.g. "did:example")options
- serializedAuthenticationOptions
payload
- serializedCreateRevocationRegistryDefinitionPayload
Returns
- created revocation registry definition as a JSON object as serialized
CreateRevocationRegistryDefinitionResult
fn vc_zkp_issue_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Issues a new credential. This requires an issued schema, credential definition, an active revocation registry and a credential request message.
Arguments
method
- method to issue a credential for (e.g. "did:example")_options
- no authenticated request required, so can be left emptypayload
- serializedIssueCredentialPayload
Returns
- serialized
IssueCredentialResult
consisting of the credential, this credential's initial revocation state and the updated revocation info, only interesting for the issuer (needs to be stored privately)
fn vc_zkp_create_credential_offer<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a CredentialOffer
message. A CredentialOffer
is sent by an issuer and is the response
to a CredentialProposal
. The CredentialOffer
specifies which schema and definition the issuer
is capable and willing to use for credential issuance.
Arguments
method
- method to create a credential offer for (e.g. "did:example")_options
- no authenticated request required, so can be left emptypayload
- serializedOfferCredentialPayload
Returns
Option<String>
- The offer as a JSON object
fn vc_zkp_present_proof<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Presents a proof for one or more credentials. A proof presentation is the response to a proof request. The proof needs to incorporate all required fields from all required schemas requested in the proof request.
Arguments
method
- method to presents a proof for (e.g. "did:example")_options
- no authenticated request required, so can be left emptypayload
- serializedPresentProofPayload
Returns
Option<String>
- The offer as a JSON object
fn vc_zkp_create_credential_proposal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new zero-knowledge proof credential proposal. This message is the first in the credential issuance flow and is sent by the potential credential holder to the credential issuer.
Arguments
method
- method to create a credential proposal for (e.g. "did:example")_options
- no authenticated request required, so can be left emptypayload
- serializedCreateCredentialProposalPayload
Returns
Option<String>
- The proposal as a JSON object
fn vc_zkp_request_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Requests a credential. This message is the response to a credential offering and is sent by the potential credential holder. It incorporates the target schema, credential definition offered by the issuer, and the encoded values the holder wants to get signed. The credential is not stored on-chain and needs to be kept private.
Arguments
method
- method to request a credential for (e.g. "did:example")_options
- no authenticated request required, so can be left emptypayload
- serializedRequestCredentialPayload
Returns
Option<String>
- A JSON object consisting of theCredentialRequest
andCredentialSecretsBlindingFactors
(to be stored at the proofer's site in a private manner)
fn vc_zkp_request_proof<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Requests a zero-knowledge proof for one or more credentials issued under one or more specific schemas and is sent by a verifier to a prover. The proof request consists of the fields the verifier wants to be revealed per schema.
Arguments
method
- method to request a proof for (e.g. "did:example")_options
- no authenticated request required, so can be left emptypayload
- serializedRequestProofPayload
Returns
Option<String>
- AProofRequest
as JSON
fn vc_zkp_revoke_credential<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Revokes a credential. After revocation the published revocation registry needs to be updated with information returned by this function. To revoke a credential, tbe revoker must be in possession of the private key associated with the credential's revocation registry. After revocation, the published revocation registry must be updated. Only then is the credential truly revoked.
Note that options.identity
needs to be whitelisted for this function.
Arguments
method
- method to revoke a credential for (e.g. "did:example")options
- serializedAuthenticationOptions
payload
- serializedRevokeCredentialPayload
Returns
Option<String>
- The updated revocation registry definition as a JSON object. Contains information needed to update the respective revocation registry.
fn vc_zkp_verify_proof<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
_options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Verifies one or multiple proofs sent in a proof presentation.
Arguments
method
- method to verify a proof for (e.g. "did:example")_options
- no authenticated request required, so can be left emptypayload
- serializedValidateProofPayload
Returns
Option<String>
- A JSON object representing aProofVerification
type, specifying whether verification was successful
#[must_use]fn did_create<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
did_method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error + 'static>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
did_method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error + 'static>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
#[must_use]fn did_resolve<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_did: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error + 'static>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_did: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error + 'static>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn did_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
did: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error + 'static>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
did: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error + 'static>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
#[must_use]fn vc_zkp_update_revocation_registry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error + 'static>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
method: &'life1 str,
options: &'life2 str,
payload: &'life3 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error + 'static>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for VadeEvan
impl !Send for VadeEvan
impl !Sync for VadeEvan
impl Unpin for VadeEvan
impl !UnwindSafe for VadeEvan
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
[src]
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
fn from_ref(outer: &Outer) -> &T
[src]
Get a reference to the inner from the outer.
fn from_mut(outer: &mut Outer) -> &mut T
[src]
Get a mutable reference to the inner from the outer.
impl<T> MaybeDebug for T
impl<T> MaybeRefUnwindSafe for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
fn unchecked_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,