From 310e61f66a1770f337fb0cc8dba89e6080c2ba12 Mon Sep 17 00:00:00 2001 From: UnumID Admin Date: Tue, 4 May 2021 01:34:06 +0000 Subject: [PATCH] [Release 2.0.1] Readme updated with the new 2.0.0 functionality without a NoPresentation type and the stringified Credential attribute, CredentialSubject. --- docs/classes/custerror.html | 4 +- docs/index.html | 63 +++++++++++----------- docs/interfaces/credentialinfo.html | 4 +- docs/interfaces/credentialstatusinfo.html | 8 +-- docs/interfaces/decryptedpresentation.html | 8 +-- docs/interfaces/registeredissuer.html | 2 +- docs/interfaces/registeredverifier.html | 2 +- docs/interfaces/unumdto.html | 4 +- docs/interfaces/verifiedstatus.html | 4 +- docs/modules.html | 24 ++++----- package.json | 2 +- 11 files changed, 61 insertions(+), 64 deletions(-) diff --git a/docs/classes/custerror.html b/docs/classes/custerror.html index 0a02c268..902148bd 100644 --- a/docs/classes/custerror.html +++ b/docs/classes/custerror.html @@ -128,7 +128,7 @@

constructor

Parameters

@@ -153,7 +153,7 @@

code

code: number
diff --git a/docs/index.html b/docs/index.html index d4fcffcb..3db3607c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -59,6 +59,31 @@

@unumid/server-sdk

This SDK combines the functionality of an Issuer and Verifier entities to work with UnumID's SaaS. For necessary account creation and API keys please email admin@unum.id.

+ +

Distribution

+
+

This project is publicly published on the official npm registry. For example it can be pulled with, npm i @unumid/server-sdk or yarn add @unumid/server-sdk.

+ +

Releases

+
+

Releases and publishing to NPM is automated via Github Actions CI job. In order to trigger a release one should push a git tag with a preceding v with semver notation, ie v1.1.1, to the main branch. This will trigger the CI job to bump the package version, generate typedocs, publish to NPM, make a release commit, and make a Github Release. The message of the git tag will be the release message so please make it meaningful. For example, git tag v1.2.0 -m "Updated the SDK with a new CI job" && push origin v1.1.1.

+ +

Global Dependencies

+
+
    +
  • NodeJS v14.0.0 or higher, preferably v14.15.0 or higher
  • +
  • yarn
  • +
+ +

Logging

+
+

Logs level defaults to Info. One can set to debug for more information via the environment variable LOG_LEVEL, i.e. LOG_LEVEL=debug. We are using standard NPM log levels. More details on the various log levels here.

+

The logs default to stdout so can be aggregated using any log provider you would like from disk.

+ +

Documentation

+
+

High level technical documentation can be found here which is served via Docusaurus. More detailed generated from source documentation can be found here which is served via repo specific Github pages via the /docs folder of the main branch.

+

In order to generate the Typedoc documentation from the source code run the createTypedocs.sh script.

SDK Functionality

@@ -130,10 +155,10 @@

issueCredential

"id": string, // a url for credential's status "type": "CredentialStatus" }, - "credentialSubject": { + "credentialSubject": stringify({ // a string representation of an object with with an id attribute and any number of arbitrary key values pairs. "id": string, // subject DID - [key: string]: any, // // data about subject - }, + [key: string]: any, // data about subject + }), "issuer": string, // issuer DID "type": string[], // credential type(s), always begins with "VerifiableCredential" "id": string, // identifies credential (version 4 UUID) @@ -271,8 +296,8 @@

verifyPresentation

Response Body: DecryptedPresentation

{
   "isVerified": boolean; // whether the presentation is valid
-  "type": 'VerifiablePresentation' | 'NoPresentation' // type of presentation. NoPresentation means user declined request.
-  "presentation": Presentation | NoPresentation, // decrypted Presentation (or NoPresentation) object
+  "type": 'VerifiablePresentation' | 'DeclinedPresentation' // type of presentation. DeclinedPresentation means user declined request and the submitted presentation's VerifiableCredential attribute was undefined or an empty array.
+  "presentation": Presentation, // decrypted Presentation object
   "message"?: string; // (optional) included if isVerified is false. Explains why verification failed.
 }
 
@@ -335,34 +360,6 @@

checkCredentialStatus

"status": CredentialStatusOptions; // a string literal type that currently only consists of 'valid' and 'revoked' } - -

Other Information

-
- -

Distribution

-
-

This project is publicly published on the official npm registry. For example it can be pulled with, npm i @unumid/server-sdk or yarn add @unumid/server-sdk.

- -

Releases

-
-

Releases and publishing to NPM is automated via Github Actions CI job. In order to trigger a release one should push a git tag with a preceding v with semver notation, ie v1.1.1, to the main branch. This will trigger the CI job to bump the package version, generate typedocs, publish to NPM, make a release commit, and make a Github Release. The message of the git tag will be the release message so please make it meaningful. For example, git tag v1.2.0 -m "Updated the SDK with a new CI job" && push origin v1.1.1.

- -

Global Dependencies

-
-
    -
  • NodeJS v14.0.0 or higher, preferably v14.15.0 or higher
  • -
  • yarn
  • -
- -

Logging

-
-

Logs level defaults to Info. One can set to debug for more information via the environment variable LOG_LEVEL, i.e. LOG_LEVEL=debug. We are using standard NPM log levels. More details on the various log levels here.

-

The logs default to stdout so can be aggregated using any log provider you would like from disk.

- -

Documentation

-
-

High level technical documentation can be found here which is served via Docusaurus. More detailed generated from source documentation can be found here which is served via repo specific Github pages via the /docs folder of the main branch.

-

In order to generate the Typedoc documentation from the source code run the createTypedocs.sh script.