README
Issuer Util
Utilities to issue verifiable credentials.
Installation
npm install --save @affinityproject/issuer-util
Usage
buildVcV1
Create a VC
to be used in a credential
import {buildVCV1Subject, buildVcV1} from '@affinityproject/issuer-util'
const did = 'did:demo:0xabc'
const credentialSubject = await buildVCV1Subject({
subject: did,
data: {'@type': 'Thing', key: 'value'},
})
const vc = await buildVCV1({
id: 'acbfeba0af-b-23b-af0b1-0tbfa-asfasfasf',
credentialSubject: credentialSubject,
holder: {
id: did,
},
type: 'CustomCredential',
issuanceDate: '2016-02-01T00:00:00.000Z',
expirationDate: '2018-02-01T00:00:00.000Z',
})