@arcblock/nft-template
TypeScript icon, indicating that this package has built-in type declarations

1.18.116 • Public • Published

Verifiable Credentials

styled with prettier docs Gitter

Javascript library to manipulate Verifiable Credentials (VC) to DID Protocol

TODO: deprecated this package

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.address,
    key: 'value',
    method: 'SHA3',
  },
});

console.log(vc);

const result = VC.verify({ vc, ownerDid: owner.address, trustedIssuers: issuer.address });
console.log(result); // true

Documentation

For full documentation, checkout https://asset-chain.netlify.com

Package Sidebar

Install

npm i @arcblock/nft-template

Weekly Downloads

53

Version

1.18.116

License

Apache-2.0

Unpacked Size

43.8 kB

Total Files

5

Last publish

Collaborators

  • wangshijun
  • polunzh
  • mave99a
  • gxw