build-essential
or equivalent tools also installed, run:didkit
to your Cargo installation (typically ~/.cargo/bin
), which can be added to your system's PATH for ease of use.did-key
DIDdid-key
DID method. DIDKit can generate a signing key with the generate-ed25519-key
subcommand to create an Ed25519 private key in the JWK format. Existing JWKs can also be loaded via filepath.@context
property flags this JSON object as a W3C Verifiable Credential, and can be optionally interpreted as JSON-LD, which is out of scope for this tutorial. The id
property is the identifier for the VC, which may be unique and ultimately depends on the system design. The type
property identifies this VC as a base data model, with no additions. The issuer
property contains a URI referring to the issuer of the VC (the did-key generated previously), with issuanceDate
denoting when the VC was issued (now, in UTC). credentialSubject
contains the claim itself, which for this dummy example, contains no information other than the data subject in credentialSubject.id
, which happens to be an example Decentralized Identifier. A full listing of the required or suggested properties for a VC can be found in the VC Data Model specification.-v
), a proof purpose (-p
), and the unsigned credential (stdin
). Verification methods describe how to interpret the signature and check for validity. assertionMethod
, which asserts the authenticity of the credential. For more information verification methods and proof purposes, refer to the DID Core specification).signed-vc.json
and ensuring that it no longer verifies successfully.did-web
issued VCexample-vc.json
should resemble the following content:example-vc.json
and ensuring that it no longer verifies successfully. Under the hood, DIDKit will resolve the did-web
DID into a DID Document containing public keys and supported verification methods.did-web
DID directly by running the following:did-key
DID, verified it, and also verified a VC issued by a did-web
DID!