@affinidi/issuer-util
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    Issuer Util

    Utilities to issue verifiable credentials.

    Installation

    npm install --save @affinidi/issuer-util
    

    Usage

    buildVcV1

    Create a VC to be used in a credential

    import {buildVCV1Subject, buildVcV1} from '@affinidi/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',
    })

    Keywords

    none

    Install

    npm i @affinidi/issuer-util

    DownloadsWeekly Downloads

    109

    Version

    1.0.1

    License

    Apache-2.0

    Unpacked Size

    136 kB

    Total Files

    20

    Last publish

    Collaborators

    • robert-affinidi
    • standemchuk