Vade Evan
About
This crate allows you to use to work with DIDs and zero knowledge proof VCs on Trust and Trace.
For this purpose two VadePlugin implementations are exported: VadeEvan and SubstrateDidResolverEvan.
VadeEvan
Responsible for working with zero knowledge proof VCs on Trust and Trace.
Implements the following VadePlugin functions:
vc_zkp_create_credential_schemavc_zkp_create_credential_definitionvc_zkp_create_credential_proposalvc_zkp_create_credential_offervc_zkp_request_credentialvc_zkp_create_revocation_registry_definitionvc_zkp_update_revocation_registryvc_zkp_issue_credentialvc_zkp_revoke_credentialvc_zkp_request_proofvc_zkp_present_proofvc_zkp_verify_proofrun_custom_function
SubstrateDidResolverEvan
Supports creating, updating and getting DIDs and DID documents on substrate, therefore supports:
Signing substrate requests
As the did resolver instance needs to sign its requests against substrate, a remote endpoint for signing has to be provided. The DID resolver will sign requests for did_create and did_update. A signing endpoint has to be passed with the config argument in the constructor, e.g.:
use ;
let signer: = Boxnew;
let resolver = new;
signing_url will be called with a POST request. The messages that should be signed is passed to the server alongside a reference to a key like this:
Two types of of responses are supported. Successful signing results are give in this format:
Errors can be signaled this way:
Compiling vade-evan
"Regular" build
No surprise here:
Default Features
By default features did, native, and vc-zkp are used. So everything included and available for usage in other Rust libraries.
Features can be omitted. This mostly concerns, the vc-zkp feature, as it can be dropped without affecting the did functionality. did can be omitted as well but will most probably limit usability vc-zkp functionalities as this relies on did logic for some parts of its logic.
In short: Use either did and vc-zkp together (default) or just did.
Command Line Interface
To enable the cli just add the feature cli to the feature set:
You can now use the vade-evan cli. Get started by having a look at the help shown after calling it with:
WASM
To compile vade-evan for wasm, use wasm pack.
You can specify to use only did feature or to use did and vc-zkp. The following examples will use both features.
Also you have to specify whether to build a browser or a nodejs environment.
nodejs:
browser:
Features for building
| feature | default | contents |
|---|---|---|
| did | x | enables DID functionalities - SubstrateDidResolverEvan |
| vc-zkp | x | enables VC functionalities - VadeEvan |
| portable | x | build with optimizations to run natively, not compatible with wasm feature |
| wasm | build with optimizations to run as web assembly, not compatible with native |
|
| cli | enables command line interface |