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

    1.0.0-beta.9 • Public • Published

    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',
    })

    Keywords

    none

    Install

    npm i @affinityproject/issuer-util

    DownloadsWeekly Downloads

    52

    Version

    1.0.0-beta.9

    License

    Apache-2.0

    Unpacked Size

    125 kB

    Total Files

    19

    Last publish

    Collaborators

    • izkp
    • kishorebhatia
    • standemchuk
    • djvs