@tangleid/credential
Utilities for generating credential.
Installation
Install using npm:
npm install @tangleid/credential
or using yarn:
yarn add @tangleid/credential
API Reference
credential~generateCredential(params)
Param | Type | Default | Description |
---|---|---|---|
params | object |
Parameters for generating the credential object. | |
params.subject | object |
Subject of the credential. | |
[params.metadata] | object |
{} |
Metadata of the credential. |
[params.context] | object |
['https://www.w3.org/2018/credentials/v1'] |
Context URLs of the credential. |
[params.alias] | object |
{} |
Context alias of the credential. |
Generate credential object.
Returns: object
- Credential object in JSON-LD format.