Javascript library to manipulate Verifiable Credentials (VC) to DID Protocol
Usage
yarn add @arcblock/vc
const VC = require('@arcblock/vc');
const issuer = fromRandom();
const owner = fromRandom();
const vc = create({
type: 'EmailVerificationCredential',
issuer: {
wallet: issuer,
name: 'DID.KYC.Email',
},
subject: {
id: owner.toAddress(),
key: 'value',
method: 'SHA3',
},
});
console.log(vc);
const result = VC.verify({ vc, ownerDid: owner.toAddress(), trustedIssuers: issuer.toAddress() });
console.log(result);
Documentation
For full documentation, checkout https://ocap-js.netlify.com