Struct vade_didcomm::VadeDidComm
source · [−]pub struct VadeDidComm {}
Implementations
sourceimpl VadeDidComm
impl VadeDidComm
Trait Implementations
sourceimpl VadePlugin for VadeDidComm
impl VadePlugin for VadeDidComm
sourcefn 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,
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,
Runs a custom function, currently supports
create_new_keys
to create a new key pair to be used for DIDCOMM communication.query_didcomm_messages
to fetch stored didcomm messaged by thid(e.g: “message_{thid}*”) and complete messageid(e.g: “message{thid}_{msgid}”)
Arguments
_method
- not required, can be left emptyfunction
- currently supportscreate_new_keys
_options
- not required, can be left empty_payload
- not required, can be left empty
Returns
Option<String>>
- created key pair
sourcefn didcomm_send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
options: &'life1 str,
message: &'life2 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,
Self: 'async_trait,
fn didcomm_send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
options: &'life1 str,
message: &'life2 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,
Self: 'async_trait,
Prepare a plain DIDComm json message to be sent, including encryption and protocol specific message enhancement. The DIDComm options can include a shared secret to encrypt the message with a specific key. If no key was given and the message should be encrypted (depends on protocol implementation), the DIDComm keypair from a db will be used.
Arguments
options
- of type DidcommOptions, used to apply a custom signing_keymessage
- the plain didcomm message (should be of type datatypes.rs/BaseMessage)
Returns
VadeDidCommPluginOutput
- stringified datatypes.rs/VadeDidCommPluginOutput contains the final message and protocol step specific metadata
sourcefn didcomm_receive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
options: &'life1 str,
message: &'life2 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,
Self: 'async_trait,
fn didcomm_receive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
options: &'life1 str,
message: &'life2 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,
Self: 'async_trait,
Receive a plain DIDComm json message, including decryption and protocol specific message parsing. The DIDComm options can include a shared secret to encrypt the message with a specific key. If no key was given and the message is encrypted the DIDComm keypair from a db will be used.
Arguments
options
- of type DidcommOptions, used to apply a custom signing_keymessage
- the plain / encrypted didcomm message (should be of type datatypes.rs/BaseMessage / datatypes.rs/EncryptedMessage)
Returns
VadeDidCommPluginOutput
- stringified datatypes.rs/VadeDidCommPluginOutput contains the final message and protocol step specific metadata
sourcefn 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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new DID. May also persist a DID document for it, depending on plugin implementation. Read more
sourcefn 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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Fetch data about a DID. This usually returns a DID document. Read more
sourcefn 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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Updates data related to a DID. May also persist a DID document for it, depending on plugin implementation. Read more
sourcefn vc_zkp_create_credential_definition<'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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn vc_zkp_create_credential_definition<'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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new zero-knowledge proof credential definition. A credential definition holds cryptographic key material and is needed by an issuer to issue a credential, thus needs to be created before issuance. A credential definition is always bound to one credential schema. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new zero-knowledge proof credential offer. This message is the response to a credential proposal. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> 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. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new zero-knowledge proof credential schema. The schema specifies properties a credential includes, both optional and mandatory. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new revocation registry definition. 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. Read more
sourcefn 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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Updates a revocation registry for a zero-knowledge proof. This step is necessary after revocation one or more credentials. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> 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. Read more
sourcefn vc_zkp_finish_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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn vc_zkp_finish_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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Finishes a credential, e.g. by incorporating the prover’s master secret into the credential signature after issuance. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Presents a proof for a zero-knowledge proof credential. A proof presentation is the response to a proof request. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> 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. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> 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. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> 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. Read more
sourcefn 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
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 + 'static, Global>>> + 'async_trait, Global>> 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. Read more
Auto Trait Implementations
impl RefUnwindSafe for VadeDidComm
impl Send for VadeDidComm
impl Sync for VadeDidComm
impl Unpin for VadeDidComm
impl UnwindSafe for VadeDidComm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more