The @zcloak/vc module is designed to facilitate the creation, issuance, and verification of Verifiable Credentials (VCs) within the zCloak Network. VCs are a key component of decentralized identity systems, allowing for the secure and verifiable exchange of claims about identity.

Integration steps

  1. Installation: yarn add @zcloak/vc
  2. Import the necessary classes and functions.
import { VerifiableCredentialBuilder } from '@zcloak/vc';
...

Key Classes and Functions

Raw Class

The Raw class represents a claim (raw credential) with its contents, owner, ctype, and hash type.

export class Raw implements IRaw {
  public contents: AnyJson;
  public owner: DidUrl;
  public ctype: CType;
  public hashType: HashType;
  //......
  }

Key methods include:

setContents(params)

 public setContents(contents: AnyJson): this {
   //......
  }

setOwner(params)

public setOwner(owner: DidUrl): this {
    //......
}