-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Release 2.0.1] Readme updated with the new 2.0.0 functionality witho…
…ut a NoPresentation type and the stringified Credential attribute, CredentialSubject.
- Loading branch information
UnumID Admin
committed
May 4, 2021
1 parent
a588bf4
commit 310e61f
Showing
11 changed files
with
61 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,31 @@ <h1>@unumid/server-sdk</h1> | |
<div class="col-8 col-content"> | ||
<div class="tsd-panel tsd-typography"> | ||
<p>This SDK combines the functionality of an <a href="#issuer"><strong>Issuer</strong></a> and <a href="#verifier"><strong>Verifier</strong></a> entities to work with UnumID's SaaS. For necessary account creation and API keys please email <a href="mailto:[email protected]">[email protected]</a>.</p> | ||
<a href="#distribution" id="distribution" style="color: inherit; text-decoration: none;"> | ||
<h2>Distribution</h2> | ||
</a> | ||
<p>This project is publicly published on the official npm <a href="https://www.npmjs.com/package/@unumid/server-sdk">registry</a>. For example it can be pulled with, <code>npm i @unumid/server-sdk</code> or <code>yarn add @unumid/server-sdk</code>.</p> | ||
<a href="#releases" id="releases" style="color: inherit; text-decoration: none;"> | ||
<h2>Releases</h2> | ||
</a> | ||
<p>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 <code>v</code> with semver notation, ie v1.1.1, to the <code>main</code> 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, <code>git tag v1.2.0 -m "Updated the SDK with a new CI job" && push origin v1.1.1</code>.</p> | ||
<a href="#global-dependencies" id="global-dependencies" style="color: inherit; text-decoration: none;"> | ||
<h2>Global Dependencies</h2> | ||
</a> | ||
<ul> | ||
<li>NodeJS v14.0.0 or higher, preferably v14.15.0 or higher</li> | ||
<li>yarn</li> | ||
</ul> | ||
<a href="#logging" id="logging" style="color: inherit; text-decoration: none;"> | ||
<h2>Logging</h2> | ||
</a> | ||
<p>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 <a href="https://github.com/winstonjs/winston#logging-levels">here</a>.</p> | ||
<p>The logs default to stdout so can be aggregated using any log provider you would like from disk.</p> | ||
<a href="#documentation" id="documentation" style="color: inherit; text-decoration: none;"> | ||
<h2>Documentation</h2> | ||
</a> | ||
<p>High level technical documentation can be found <a href="https://https://docs.unum.id/server-sdk">here</a> which is served via <a href="https://github.com/UnumID/UnumID.github.io">Docusaurus</a>. More detailed generated from source documentation can be found <a href="https://docs.unum.id/Server-SDK-Typescript/index.html">here</a> which is served via repo specific Github pages via the /docs folder of the main branch.</p> | ||
<p>In order to generate the Typedoc documentation from the source code run the <code>createTypedocs.sh</code> script.</p> | ||
<a href="#sdk-functionality" id="sdk-functionality" style="color: inherit; text-decoration: none;"> | ||
<h2>SDK Functionality</h2> | ||
</a> | ||
|
@@ -130,10 +155,10 @@ <h3>issueCredential</h3> | |
<span style="color: #000000"> </span><span style="color: #A31515">"id"</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// a url for credential's status</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"type"</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #A31515">"CredentialStatus"</span> | ||
<span style="color: #000000"> },</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"credentialSubject"</span><span style="color: #000000">: {</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"credentialSubject"</span><span style="color: #000000">: </span><span style="color: #795E26">stringify</span><span style="color: #000000">({ </span><span style="color: #008000">// a string representation of an object with with an id attribute and any number of arbitrary key values pairs.</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"id"</span><span style="color: #001080">:</span><span style="color: #000000"> </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// subject DID</span> | ||
<span style="color: #000000"> </span><span style="color: #001080">[key: string]:</span><span style="color: #000000"> </span><span style="color: #001080">any</span><span style="color: #000000">, </span><span style="color: #008000">// // data about subject</span> | ||
<span style="color: #000000"> },</span> | ||
<span style="color: #000000"> </span><span style="color: #001080">[key: string]:</span><span style="color: #000000"> </span><span style="color: #001080">any</span><span style="color: #000000">, </span><span style="color: #008000">// data about subject</span> | ||
<span style="color: #000000"> }),</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"issuer"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// issuer DID</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"type"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">[], </span><span style="color: #008000">// credential type(s), always begins with "VerifiableCredential"</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"id"</span><span style="color: #000000">: </span><span style="color: #001080">string</span><span style="color: #000000">, </span><span style="color: #008000">// identifies credential (version 4 UUID)</span> | ||
|
@@ -271,8 +296,8 @@ <h3>verifyPresentation</h3> | |
<p>Response Body: <a href="https://docs.unum.id/Server-SDK-Typescript/interfaces/decryptedpresentation.html"><strong>DecryptedPresentation</strong></a></p> | ||
<pre><code class="language-typescript"><span style="color: #000000">{</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"isVerified"</span><span style="color: #000000">: </span><span style="color: #001080">boolean</span><span style="color: #000000">; </span><span style="color: #008000">// whether the presentation is valid</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"type"</span><span style="color: #000000">: </span><span style="color: #A31515">'VerifiablePresentation'</span><span style="color: #000000"> | </span><span style="color: #A31515">'NoPresentation'</span><span style="color: #000000"> </span><span style="color: #008000">// type of presentation. NoPresentation means user declined request.</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"presentation"</span><span style="color: #000000">: </span><span style="color: #001080">Presentation</span><span style="color: #000000"> | </span><span style="color: #001080">NoPresentation</span><span style="color: #000000">, </span><span style="color: #008000">// decrypted Presentation (or NoPresentation) object</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"type"</span><span style="color: #000000">: </span><span style="color: #A31515">'VerifiablePresentation'</span><span style="color: #000000"> | </span><span style="color: #A31515">'DeclinedPresentation'</span><span style="color: #000000"> </span><span style="color: #008000">// type of presentation. DeclinedPresentation means user declined request and the submitted presentation's VerifiableCredential attribute was undefined or an empty array.</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"presentation"</span><span style="color: #000000">: </span><span style="color: #001080">Presentation</span><span style="color: #000000">, </span><span style="color: #008000">// decrypted Presentation object</span> | ||
<span style="color: #000000"> </span><span style="color: #A31515">"message"</span><span style="color: #000000">?: </span><span style="color: #001080">string</span><span style="color: #000000">; </span><span style="color: #008000">// (optional) included if isVerified is false. Explains why verification failed.</span> | ||
<span style="color: #000000">}</span> | ||
</code></pre> | ||
|
@@ -335,34 +360,6 @@ <h3>checkCredentialStatus</h3> | |
<span style="color: #000000"> </span><span style="color: #A31515">"status"</span><span style="color: #000000">: </span><span style="color: #001080">CredentialStatusOptions</span><span style="color: #000000">; </span><span style="color: #008000">// a string literal type that currently only consists of 'valid' and 'revoked'</span> | ||
<span style="color: #000000">}</span> | ||
</code></pre> | ||
<a href="#other-information" id="other-information" style="color: inherit; text-decoration: none;"> | ||
<h2>Other Information</h2> | ||
</a> | ||
<a href="#distribution" id="distribution" style="color: inherit; text-decoration: none;"> | ||
<h3>Distribution</h3> | ||
</a> | ||
<p>This project is publicly published on the official npm <a href="https://www.npmjs.com/package/@unumid/server-sdk">registry</a>. For example it can be pulled with, <code>npm i @unumid/server-sdk</code> or <code>yarn add @unumid/server-sdk</code>.</p> | ||
<a href="#releases" id="releases" style="color: inherit; text-decoration: none;"> | ||
<h3>Releases</h3> | ||
</a> | ||
<p>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 <code>v</code> with semver notation, ie v1.1.1, to the <code>main</code> 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, <code>git tag v1.2.0 -m "Updated the SDK with a new CI job" && push origin v1.1.1</code>.</p> | ||
<a href="#global-dependencies" id="global-dependencies" style="color: inherit; text-decoration: none;"> | ||
<h3>Global Dependencies</h3> | ||
</a> | ||
<ul> | ||
<li>NodeJS v14.0.0 or higher, preferably v14.15.0 or higher</li> | ||
<li>yarn</li> | ||
</ul> | ||
<a href="#logging" id="logging" style="color: inherit; text-decoration: none;"> | ||
<h3>Logging</h3> | ||
</a> | ||
<p>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 <a href="https://github.com/winstonjs/winston#logging-levels">here</a>.</p> | ||
<p>The logs default to stdout so can be aggregated using any log provider you would like from disk.</p> | ||
<a href="#documentation" id="documentation" style="color: inherit; text-decoration: none;"> | ||
<h3>Documentation</h3> | ||
</a> | ||
<p>High level technical documentation can be found <a href="https://https://docs.unum.id/server-sdk">here</a> which is served via <a href="https://github.com/UnumID/UnumID.github.io">Docusaurus</a>. More detailed generated from source documentation can be found <a href="https://docs.unum.id/Server-SDK-Typescript/index.html">here</a> which is served via repo specific Github pages via the /docs folder of the main branch.</p> | ||
<p>In order to generate the Typedoc documentation from the source code run the <code>createTypedocs.sh</code> script.</p> | ||
</div> | ||
</div> | ||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.