🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@affinidi/issuer-util

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@affinidi/issuer-util

Utilities to issue verifiable credentials.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 17 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts