Struct vade_evan_substrate::VadeEvanSubstrate
source · [−]pub struct VadeEvanSubstrate { /* private fields */ }Expand description
Resolver for DIDs on the Trust&Trace substrate chain
Implementations
sourceimpl VadeEvanSubstrate
impl VadeEvanSubstrate
sourcepub fn new(config: ResolverConfig) -> VadeEvanSubstrate
pub fn new(config: ResolverConfig) -> VadeEvanSubstrate
Creates new instance of VadeEvanSubstrate.
pub async fn is_whitelisted(
&self,
did: &str,
private_key: &str
) -> Result<bool, Box<dyn Error>>
Trait Implementations
sourceimpl VadePlugin for VadeEvanSubstrate
impl VadePlugin for VadeEvanSubstrate
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>>> + 'async_trait>> 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>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Creates a new DID on substrate.
Arguments
did_method- did method to cater to, usually “did:evan”options- serializedIdentityArgumentspayload- no payload required, so can be left empty
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>>> + 'async_trait>> 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>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Updates data related to a DID. Two updates are supported depending on the value of
options.operation.
- whitelistIdentity: whitelists identity
didon substrate, this is required to be able to perform transactions this this identity - setDidDocument: sets the DID document for
did
Arguments
did- DID to update data foroptions- serializedDidUpdateArgumentspayload- DID document to set or empty
sourcefn did_resolve<'life0, 'life1, 'async_trait>(
&'life0 mut self,
did_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn did_resolve<'life0, 'life1, 'async_trait>(
&'life0 mut self,
did_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<VadePluginResultValue<Option<String>>, Box<dyn Error>>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Fetch data about a DID, which returns this DID’s DID document.
Arguments
did- did to fetch data for
sourcefn didcomm_receive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
options: &'life1 str,
payload: &'life2 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,
Self: 'async_trait,
fn didcomm_receive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
options: &'life1 str,
payload: &'life2 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,
Self: 'async_trait,
Processes a DIDComm message as received, usually also prepares a matching response for it. Read more
sourcefn didcomm_send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
options: &'life1 str,
payload: &'life2 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,
Self: 'async_trait,
fn didcomm_send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
options: &'life1 str,
payload: &'life2 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,
Self: 'async_trait,
Processes a DIDComm message as received, this may prepare a matching response for it if the DIDComm message can be interpreted and answered by a plugin’s implementation. Read more
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 + 'static, Global>>> + 'async_trait, Global>> 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 + 'static, Global>>> + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Runs a custom function, this allows to use Vades API for custom calls, that do not belong
to Vades core functionality but may be required for a projects use cases. 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 VadeEvanSubstrate
impl !Send for VadeEvanSubstrate
impl !Sync for VadeEvanSubstrate
impl Unpin for VadeEvanSubstrate
impl !UnwindSafe for VadeEvanSubstrate
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcefn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to unchecked_from.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more