Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@unumid/server-sdk

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unumid/server-sdk - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

4

build/index.d.ts

@@ -5,3 +5,3 @@ import { registerVerifier } from './verifier/registerVerifier';

import { sendSms } from './verifier/sendSms';
import { UnumDto, RegisteredVerifier, PresentationRequestResponse, RegisteredIssuer, VerifiedStatus, DecryptedPresentation, CredentialInfo, CredentialStatusInfo } from './types';
import { UnumDto, RegisteredVerifier, RegisteredIssuer, VerifiedStatus, DecryptedPresentation, CredentialInfo, CredentialStatusInfo } from './types';
import { verifyPresentation } from './verifier/verifyPresentation';

@@ -15,3 +15,3 @@ import { registerIssuer } from './issuer/registerIssuer';

import { checkCredentialStatus } from './verifier/checkCredentialStatus';
export { registerIssuer, issueCredential, updateCredentialStatus, registerVerifier, sendEmail, sendRequest, sendSms, verifyPresentation, checkCredentialStatus, UnumDto, RegisteredVerifier, PresentationRequestResponse, VerifiedStatus, NoPresentation, Presentation, RegisteredIssuer, CredentialSubject, DecryptedPresentation, CredentialStatusInfo, CustError, Proof, Credential, CredentialInfo, extractCredentialInfo };
export { registerIssuer, issueCredential, updateCredentialStatus, registerVerifier, sendEmail, sendRequest, sendSms, verifyPresentation, checkCredentialStatus, UnumDto, RegisteredVerifier, VerifiedStatus, NoPresentation, Presentation, RegisteredIssuer, CredentialSubject, DecryptedPresentation, CredentialStatusInfo, CustError, Proof, Credential, CredentialInfo, extractCredentialInfo };
//# sourceMappingURL=index.d.ts.map

@@ -75,13 +75,2 @@ import { KeyPairSet, PublicKeyInfo } from '@unumid/library-issuer-verifier-utility';

/**
* Encapsulates the response attributes of a PresentationRequest.
*/
export interface PresentationRequestResponse {
presentationRequest: PresentationRequest;
verifier: VerifierInfo;
issuers: IssuerInfoMap;
deeplink: string;
qrCode: string;
}
/**
* Encapsulates the statues of a Credential with the internal uuid.

@@ -88,0 +77,0 @@ */

@@ -1,3 +0,3 @@

import { CredentialRequest, SignedPresentationRequest, UnsignedPresentationRequest } from '@unumid/types';
import { PresentationRequestResponse, SendRequestReqBody, UnumDto } from '../types';
import { CredentialRequest, PresentationRequestPostDto, SignedPresentationRequest, UnsignedPresentationRequest } from '@unumid/types';
import { SendRequestReqBody, UnumDto } from '../types';
/**

@@ -22,3 +22,3 @@ * Constructs an unsigned PresentationRequest from the incoming request body.

*/
export declare const sendRequest: (authorization: string, verifier: string, credentialRequests: CredentialRequest[], eccPrivateKey: string, holderAppUuid: string, expirationDate?: Date | undefined, metadata?: Record<string, unknown> | undefined) => Promise<UnumDto<PresentationRequestResponse>>;
export declare const sendRequest: (authorization: string, verifier: string, credentialRequests: CredentialRequest[], eccPrivateKey: string, holderAppUuid: string, expirationDate?: Date | undefined, metadata?: Record<string, unknown> | undefined) => Promise<UnumDto<PresentationRequestPostDto>>;
//# sourceMappingURL=sendRequest.d.ts.map

@@ -1,1 +0,1 @@

window.searchData = {"kinds":{"64":"Function","256":"Interface","1024":"Property"},"rows":[{"id":0,"kind":64,"name":"registerIssuer","url":"modules.html#registerissuer","classes":"tsd-kind-function"},{"id":1,"kind":64,"name":"issueCredential","url":"modules.html#issuecredential","classes":"tsd-kind-function"},{"id":2,"kind":64,"name":"updateCredentialStatus","url":"modules.html#updatecredentialstatus","classes":"tsd-kind-function"},{"id":3,"kind":64,"name":"registerVerifier","url":"modules.html#registerverifier","classes":"tsd-kind-function"},{"id":4,"kind":64,"name":"sendEmail","url":"modules.html#sendemail","classes":"tsd-kind-function"},{"id":5,"kind":64,"name":"sendRequest","url":"modules.html#sendrequest","classes":"tsd-kind-function"},{"id":6,"kind":64,"name":"sendSms","url":"modules.html#sendsms","classes":"tsd-kind-function"},{"id":7,"kind":64,"name":"verifyPresentation","url":"modules.html#verifypresentation","classes":"tsd-kind-function"},{"id":8,"kind":64,"name":"checkCredentialStatus","url":"modules.html#checkcredentialstatus","classes":"tsd-kind-function"},{"id":9,"kind":256,"name":"UnumDto","url":"interfaces/unumdto.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":10,"kind":1024,"name":"authToken","url":"interfaces/unumdto.html#authtoken","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UnumDto"},{"id":11,"kind":1024,"name":"body","url":"interfaces/unumdto.html#body","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UnumDto"},{"id":12,"kind":256,"name":"RegisteredVerifier","url":"interfaces/registeredverifier.html","classes":"tsd-kind-interface"},{"id":13,"kind":1024,"name":"keys","url":"interfaces/registeredverifier.html#keys","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RegisteredVerifier"},{"id":14,"kind":256,"name":"PresentationRequestResponse","url":"interfaces/presentationrequestresponse.html","classes":"tsd-kind-interface"},{"id":15,"kind":1024,"name":"presentationRequest","url":"interfaces/presentationrequestresponse.html#presentationrequest","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PresentationRequestResponse"},{"id":16,"kind":1024,"name":"verifier","url":"interfaces/presentationrequestresponse.html#verifier","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PresentationRequestResponse"},{"id":17,"kind":1024,"name":"issuers","url":"interfaces/presentationrequestresponse.html#issuers","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PresentationRequestResponse"},{"id":18,"kind":1024,"name":"deeplink","url":"interfaces/presentationrequestresponse.html#deeplink","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PresentationRequestResponse"},{"id":19,"kind":1024,"name":"qrCode","url":"interfaces/presentationrequestresponse.html#qrcode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PresentationRequestResponse"},{"id":20,"kind":256,"name":"VerifiedStatus","url":"interfaces/verifiedstatus.html","classes":"tsd-kind-interface"},{"id":21,"kind":1024,"name":"isVerified","url":"interfaces/verifiedstatus.html#isverified","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"VerifiedStatus"},{"id":22,"kind":1024,"name":"message","url":"interfaces/verifiedstatus.html#message","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"VerifiedStatus"},{"id":23,"kind":256,"name":"RegisteredIssuer","url":"interfaces/registeredissuer.html","classes":"tsd-kind-interface"},{"id":24,"kind":1024,"name":"keys","url":"interfaces/registeredissuer.html#keys","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RegisteredIssuer"},{"id":25,"kind":256,"name":"DecryptedPresentation","url":"interfaces/decryptedpresentation.html","classes":"tsd-kind-interface"},{"id":26,"kind":1024,"name":"type","url":"interfaces/decryptedpresentation.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"DecryptedPresentation"},{"id":27,"kind":1024,"name":"presentation","url":"interfaces/decryptedpresentation.html#presentation","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"DecryptedPresentation"},{"id":28,"kind":1024,"name":"isVerified","url":"interfaces/decryptedpresentation.html#isverified","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"DecryptedPresentation"},{"id":29,"kind":1024,"name":"message","url":"interfaces/decryptedpresentation.html#message","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"DecryptedPresentation"},{"id":30,"kind":256,"name":"CredentialStatusInfo","url":"interfaces/credentialstatusinfo.html","classes":"tsd-kind-interface"},{"id":31,"kind":1024,"name":"createdAt","url":"interfaces/credentialstatusinfo.html#createdat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialStatusInfo"},{"id":32,"kind":1024,"name":"updatedAt","url":"interfaces/credentialstatusinfo.html#updatedat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialStatusInfo"},{"id":33,"kind":1024,"name":"credentialId","url":"interfaces/credentialstatusinfo.html#credentialid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialStatusInfo"},{"id":34,"kind":1024,"name":"status","url":"interfaces/credentialstatusinfo.html#status","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialStatusInfo"},{"id":35,"kind":256,"name":"CredentialInfo","url":"interfaces/credentialinfo.html","classes":"tsd-kind-interface"},{"id":36,"kind":1024,"name":"credentialTypes","url":"interfaces/credentialinfo.html#credentialtypes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialInfo"},{"id":37,"kind":1024,"name":"subjectDid","url":"interfaces/credentialinfo.html#subjectdid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialInfo"},{"id":38,"kind":64,"name":"extractCredentialInfo","url":"modules.html#extractcredentialinfo","classes":"tsd-kind-function"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,32.834]],["parent/0",[]],["name/1",[1,32.834]],["parent/1",[]],["name/2",[2,32.834]],["parent/2",[]],["name/3",[3,32.834]],["parent/3",[]],["name/4",[4,32.834]],["parent/4",[]],["name/5",[5,32.834]],["parent/5",[]],["name/6",[6,32.834]],["parent/6",[]],["name/7",[7,32.834]],["parent/7",[]],["name/8",[8,32.834]],["parent/8",[]],["name/9",[9,24.361]],["parent/9",[]],["name/10",[10,32.834]],["parent/10",[9,1.804]],["name/11",[11,32.834]],["parent/11",[9,1.804]],["name/12",[12,27.726]],["parent/12",[]],["name/13",[13,27.726]],["parent/13",[12,2.053]],["name/14",[14,18.171]],["parent/14",[]],["name/15",[15,32.834]],["parent/15",[14,1.345]],["name/16",[16,32.834]],["parent/16",[14,1.345]],["name/17",[17,32.834]],["parent/17",[14,1.345]],["name/18",[18,32.834]],["parent/18",[14,1.345]],["name/19",[19,32.834]],["parent/19",[14,1.345]],["name/20",[20,24.361]],["parent/20",[]],["name/21",[21,27.726]],["parent/21",[20,1.804]],["name/22",[22,27.726]],["parent/22",[20,1.804]],["name/23",[23,27.726]],["parent/23",[]],["name/24",[13,27.726]],["parent/24",[23,2.053]],["name/25",[24,19.841]],["parent/25",[]],["name/26",[25,32.834]],["parent/26",[24,1.469]],["name/27",[26,32.834]],["parent/27",[24,1.469]],["name/28",[21,27.726]],["parent/28",[24,1.469]],["name/29",[22,27.726]],["parent/29",[24,1.469]],["name/30",[27,19.841]],["parent/30",[]],["name/31",[28,32.834]],["parent/31",[27,1.469]],["name/32",[29,32.834]],["parent/32",[27,1.469]],["name/33",[30,32.834]],["parent/33",[27,1.469]],["name/34",[31,32.834]],["parent/34",[27,1.469]],["name/35",[32,24.361]],["parent/35",[]],["name/36",[33,32.834]],["parent/36",[32,1.804]],["name/37",[34,32.834]],["parent/37",[32,1.804]],["name/38",[35,32.834]],["parent/38",[]]],"invertedIndex":[["authtoken",{"_index":10,"name":{"10":{}},"parent":{}}],["body",{"_index":11,"name":{"11":{}},"parent":{}}],["checkcredentialstatus",{"_index":8,"name":{"8":{}},"parent":{}}],["createdat",{"_index":28,"name":{"31":{}},"parent":{}}],["credentialid",{"_index":30,"name":{"33":{}},"parent":{}}],["credentialinfo",{"_index":32,"name":{"35":{}},"parent":{"36":{},"37":{}}}],["credentialstatusinfo",{"_index":27,"name":{"30":{}},"parent":{"31":{},"32":{},"33":{},"34":{}}}],["credentialtypes",{"_index":33,"name":{"36":{}},"parent":{}}],["decryptedpresentation",{"_index":24,"name":{"25":{}},"parent":{"26":{},"27":{},"28":{},"29":{}}}],["deeplink",{"_index":18,"name":{"18":{}},"parent":{}}],["extractcredentialinfo",{"_index":35,"name":{"38":{}},"parent":{}}],["issuecredential",{"_index":1,"name":{"1":{}},"parent":{}}],["issuers",{"_index":17,"name":{"17":{}},"parent":{}}],["isverified",{"_index":21,"name":{"21":{},"28":{}},"parent":{}}],["keys",{"_index":13,"name":{"13":{},"24":{}},"parent":{}}],["message",{"_index":22,"name":{"22":{},"29":{}},"parent":{}}],["presentation",{"_index":26,"name":{"27":{}},"parent":{}}],["presentationrequest",{"_index":15,"name":{"15":{}},"parent":{}}],["presentationrequestresponse",{"_index":14,"name":{"14":{}},"parent":{"15":{},"16":{},"17":{},"18":{},"19":{}}}],["qrcode",{"_index":19,"name":{"19":{}},"parent":{}}],["registeredissuer",{"_index":23,"name":{"23":{}},"parent":{"24":{}}}],["registeredverifier",{"_index":12,"name":{"12":{}},"parent":{"13":{}}}],["registerissuer",{"_index":0,"name":{"0":{}},"parent":{}}],["registerverifier",{"_index":3,"name":{"3":{}},"parent":{}}],["sendemail",{"_index":4,"name":{"4":{}},"parent":{}}],["sendrequest",{"_index":5,"name":{"5":{}},"parent":{}}],["sendsms",{"_index":6,"name":{"6":{}},"parent":{}}],["status",{"_index":31,"name":{"34":{}},"parent":{}}],["subjectdid",{"_index":34,"name":{"37":{}},"parent":{}}],["type",{"_index":25,"name":{"26":{}},"parent":{}}],["unumdto",{"_index":9,"name":{"9":{}},"parent":{"10":{},"11":{}}}],["updatecredentialstatus",{"_index":2,"name":{"2":{}},"parent":{}}],["updatedat",{"_index":29,"name":{"32":{}},"parent":{}}],["verifiedstatus",{"_index":20,"name":{"20":{}},"parent":{"21":{},"22":{}}}],["verifier",{"_index":16,"name":{"16":{}},"parent":{}}],["verifypresentation",{"_index":7,"name":{"7":{}},"parent":{}}]],"pipeline":[]}}
window.searchData = {"kinds":{"64":"Function","256":"Interface","1024":"Property"},"rows":[{"id":0,"kind":64,"name":"registerIssuer","url":"modules.html#registerissuer","classes":"tsd-kind-function"},{"id":1,"kind":64,"name":"issueCredential","url":"modules.html#issuecredential","classes":"tsd-kind-function"},{"id":2,"kind":64,"name":"updateCredentialStatus","url":"modules.html#updatecredentialstatus","classes":"tsd-kind-function"},{"id":3,"kind":64,"name":"registerVerifier","url":"modules.html#registerverifier","classes":"tsd-kind-function"},{"id":4,"kind":64,"name":"sendEmail","url":"modules.html#sendemail","classes":"tsd-kind-function"},{"id":5,"kind":64,"name":"sendRequest","url":"modules.html#sendrequest","classes":"tsd-kind-function"},{"id":6,"kind":64,"name":"sendSms","url":"modules.html#sendsms","classes":"tsd-kind-function"},{"id":7,"kind":64,"name":"verifyPresentation","url":"modules.html#verifypresentation","classes":"tsd-kind-function"},{"id":8,"kind":64,"name":"checkCredentialStatus","url":"modules.html#checkcredentialstatus","classes":"tsd-kind-function"},{"id":9,"kind":256,"name":"UnumDto","url":"interfaces/unumdto.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":10,"kind":1024,"name":"authToken","url":"interfaces/unumdto.html#authtoken","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UnumDto"},{"id":11,"kind":1024,"name":"body","url":"interfaces/unumdto.html#body","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UnumDto"},{"id":12,"kind":256,"name":"RegisteredVerifier","url":"interfaces/registeredverifier.html","classes":"tsd-kind-interface"},{"id":13,"kind":1024,"name":"keys","url":"interfaces/registeredverifier.html#keys","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RegisteredVerifier"},{"id":14,"kind":256,"name":"VerifiedStatus","url":"interfaces/verifiedstatus.html","classes":"tsd-kind-interface"},{"id":15,"kind":1024,"name":"isVerified","url":"interfaces/verifiedstatus.html#isverified","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"VerifiedStatus"},{"id":16,"kind":1024,"name":"message","url":"interfaces/verifiedstatus.html#message","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"VerifiedStatus"},{"id":17,"kind":256,"name":"RegisteredIssuer","url":"interfaces/registeredissuer.html","classes":"tsd-kind-interface"},{"id":18,"kind":1024,"name":"keys","url":"interfaces/registeredissuer.html#keys","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RegisteredIssuer"},{"id":19,"kind":256,"name":"DecryptedPresentation","url":"interfaces/decryptedpresentation.html","classes":"tsd-kind-interface"},{"id":20,"kind":1024,"name":"type","url":"interfaces/decryptedpresentation.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"DecryptedPresentation"},{"id":21,"kind":1024,"name":"presentation","url":"interfaces/decryptedpresentation.html#presentation","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"DecryptedPresentation"},{"id":22,"kind":1024,"name":"isVerified","url":"interfaces/decryptedpresentation.html#isverified","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"DecryptedPresentation"},{"id":23,"kind":1024,"name":"message","url":"interfaces/decryptedpresentation.html#message","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"DecryptedPresentation"},{"id":24,"kind":256,"name":"CredentialStatusInfo","url":"interfaces/credentialstatusinfo.html","classes":"tsd-kind-interface"},{"id":25,"kind":1024,"name":"createdAt","url":"interfaces/credentialstatusinfo.html#createdat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialStatusInfo"},{"id":26,"kind":1024,"name":"updatedAt","url":"interfaces/credentialstatusinfo.html#updatedat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialStatusInfo"},{"id":27,"kind":1024,"name":"credentialId","url":"interfaces/credentialstatusinfo.html#credentialid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialStatusInfo"},{"id":28,"kind":1024,"name":"status","url":"interfaces/credentialstatusinfo.html#status","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialStatusInfo"},{"id":29,"kind":256,"name":"CredentialInfo","url":"interfaces/credentialinfo.html","classes":"tsd-kind-interface"},{"id":30,"kind":1024,"name":"credentialTypes","url":"interfaces/credentialinfo.html#credentialtypes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialInfo"},{"id":31,"kind":1024,"name":"subjectDid","url":"interfaces/credentialinfo.html#subjectdid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CredentialInfo"},{"id":32,"kind":64,"name":"extractCredentialInfo","url":"modules.html#extractcredentialinfo","classes":"tsd-kind-function"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,31.209]],["parent/0",[]],["name/1",[1,31.209]],["parent/1",[]],["name/2",[2,31.209]],["parent/2",[]],["name/3",[3,31.209]],["parent/3",[]],["name/4",[4,31.209]],["parent/4",[]],["name/5",[5,31.209]],["parent/5",[]],["name/6",[6,31.209]],["parent/6",[]],["name/7",[7,31.209]],["parent/7",[]],["name/8",[8,31.209]],["parent/8",[]],["name/9",[9,22.736]],["parent/9",[]],["name/10",[10,31.209]],["parent/10",[9,1.585]],["name/11",[11,31.209]],["parent/11",[9,1.585]],["name/12",[12,26.101]],["parent/12",[]],["name/13",[13,26.101]],["parent/13",[12,1.819]],["name/14",[14,22.736]],["parent/14",[]],["name/15",[15,26.101]],["parent/15",[14,1.585]],["name/16",[16,26.101]],["parent/16",[14,1.585]],["name/17",[17,26.101]],["parent/17",[]],["name/18",[13,26.101]],["parent/18",[17,1.819]],["name/19",[18,18.216]],["parent/19",[]],["name/20",[19,31.209]],["parent/20",[18,1.27]],["name/21",[20,31.209]],["parent/21",[18,1.27]],["name/22",[15,26.101]],["parent/22",[18,1.27]],["name/23",[16,26.101]],["parent/23",[18,1.27]],["name/24",[21,18.216]],["parent/24",[]],["name/25",[22,31.209]],["parent/25",[21,1.27]],["name/26",[23,31.209]],["parent/26",[21,1.27]],["name/27",[24,31.209]],["parent/27",[21,1.27]],["name/28",[25,31.209]],["parent/28",[21,1.27]],["name/29",[26,22.736]],["parent/29",[]],["name/30",[27,31.209]],["parent/30",[26,1.585]],["name/31",[28,31.209]],["parent/31",[26,1.585]],["name/32",[29,31.209]],["parent/32",[]]],"invertedIndex":[["authtoken",{"_index":10,"name":{"10":{}},"parent":{}}],["body",{"_index":11,"name":{"11":{}},"parent":{}}],["checkcredentialstatus",{"_index":8,"name":{"8":{}},"parent":{}}],["createdat",{"_index":22,"name":{"25":{}},"parent":{}}],["credentialid",{"_index":24,"name":{"27":{}},"parent":{}}],["credentialinfo",{"_index":26,"name":{"29":{}},"parent":{"30":{},"31":{}}}],["credentialstatusinfo",{"_index":21,"name":{"24":{}},"parent":{"25":{},"26":{},"27":{},"28":{}}}],["credentialtypes",{"_index":27,"name":{"30":{}},"parent":{}}],["decryptedpresentation",{"_index":18,"name":{"19":{}},"parent":{"20":{},"21":{},"22":{},"23":{}}}],["extractcredentialinfo",{"_index":29,"name":{"32":{}},"parent":{}}],["issuecredential",{"_index":1,"name":{"1":{}},"parent":{}}],["isverified",{"_index":15,"name":{"15":{},"22":{}},"parent":{}}],["keys",{"_index":13,"name":{"13":{},"18":{}},"parent":{}}],["message",{"_index":16,"name":{"16":{},"23":{}},"parent":{}}],["presentation",{"_index":20,"name":{"21":{}},"parent":{}}],["registeredissuer",{"_index":17,"name":{"17":{}},"parent":{"18":{}}}],["registeredverifier",{"_index":12,"name":{"12":{}},"parent":{"13":{}}}],["registerissuer",{"_index":0,"name":{"0":{}},"parent":{}}],["registerverifier",{"_index":3,"name":{"3":{}},"parent":{}}],["sendemail",{"_index":4,"name":{"4":{}},"parent":{}}],["sendrequest",{"_index":5,"name":{"5":{}},"parent":{}}],["sendsms",{"_index":6,"name":{"6":{}},"parent":{}}],["status",{"_index":25,"name":{"28":{}},"parent":{}}],["subjectdid",{"_index":28,"name":{"31":{}},"parent":{}}],["type",{"_index":19,"name":{"20":{}},"parent":{}}],["unumdto",{"_index":9,"name":{"9":{}},"parent":{"10":{},"11":{}}}],["updatecredentialstatus",{"_index":2,"name":{"2":{}},"parent":{}}],["updatedat",{"_index":23,"name":{"26":{}},"parent":{}}],["verifiedstatus",{"_index":14,"name":{"14":{}},"parent":{"15":{},"16":{}}}],["verifypresentation",{"_index":7,"name":{"7":{}},"parent":{}}]],"pipeline":[]}}
{
"name": "@unumid/server-sdk",
"version": "1.1.1",
"version": "1.1.2",
"main": "build/index.js",

@@ -46,4 +46,4 @@ "repository": "git@github.com:UnumID/Server-SDK-TypeScript.git",

"dependencies": {
"@unumid/library-issuer-verifier-utility": "git+ssh://git@github.com/UnumID/library-issuer-verifier-utility.git#v0.10.0",
"@unumid/types": "git+ssh://git@github.com/UnumID/types.git#v1.2.1",
"@unumid/library-issuer-verifier-utility": "git+ssh://git@github.com/UnumID/library-issuer-verifier-utility.git#v0.11.0",
"@unumid/types": "git+ssh://git@github.com/UnumID/types.git#v1.3.0",
"dotenv": "^8.2.0",

@@ -50,0 +50,0 @@ "express": "^4.17.1",

@@ -184,4 +184,4 @@ This SDK combines the functionality of an [**Issuer**](#issuer) and [**Verifier**](#verifier) entities to work with UnumID's SaaS. For necessary account creation and API keys please email admin@unum.id.

Response Body: [**PresentationRequestResponse**](https://docs.unum.id/Server-SDK-Typescript/interfaces/presentationrequestresponse.html)
```typescript title="PresentationRequestResponse"
Response Body: [**PresentationRequestPostDto**](https://docs.unum.id/types/interfaces/presentationrequestpostdto.html)
```typescript title="PresentationRequestPostDto"
{

@@ -209,2 +209,7 @@ "presentationRequest": {

},
"holderApp": {
"name": string, // human readable name for holder app. Displayed to users in the Web SDK.
"uriScheme": string, // uri scheme to create deep links to the holder app.
"deeplinkButtonImg": string // image for the Web SDK to display as a button, encoded as a data uri
},
/* You send this to a user with the Web SDK: */

@@ -327,7 +332,3 @@ "deeplink": string, // deep link (URL) that can be used to trigger intended mobile app to load PresentationRequest

Currently this project is still closed source, so standard distribution options via public source code or NPM repository are not viable. Downstream projects are leveraging this project via it's git url using Docker Buildkit to provide SSH credentials for access to this Github source code repo. An example of such a buildkit configuration can be found in the [hooli-demo-server](https://github.com/UnumID/hooli-demo-server) `Dockerfile` and `.circleci/config.yaml`.
We considered opting to build and push as a private module through a private Github NPM repo. However due to the complexities of configuring a downstream project to have rights to pull from the private NPM repo we have opted to not add pushing a private package to our CI job.
Soon, we hope to open source this project and uploaded the package as public NPM module.
This project is publicly published on the official npm [registry](https://www.npmjs.com/package/@unumid/server-sdk). For example it can be pulled with, `npm i @unumid/server-sdk` or `yarn add @unumid/server-sdk`.
### Global Dependencies

@@ -345,2 +346,2 @@ - NodeJS v14.0.0 or higher, preferably v14.15.0 or higher

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

@@ -5,3 +5,3 @@ import { registerVerifier } from './verifier/registerVerifier';

import { sendSms } from './verifier/sendSms';
import { UnumDto, RegisteredVerifier, PresentationRequestResponse, RegisteredIssuer, VerifiedStatus, DecryptedPresentation, CredentialInfo, CredentialStatusInfo } from './types';
import { UnumDto, RegisteredVerifier, RegisteredIssuer, VerifiedStatus, DecryptedPresentation, CredentialInfo, CredentialStatusInfo } from './types';
import { verifyPresentation } from './verifier/verifyPresentation';

@@ -31,3 +31,2 @@ import { registerIssuer } from './issuer/registerIssuer';

RegisteredVerifier,
PresentationRequestResponse,
VerifiedStatus,

@@ -34,0 +33,0 @@ NoPresentation,

@@ -75,13 +75,2 @@ import { KeyPairSet, PublicKeyInfo } from '@unumid/library-issuer-verifier-utility';

/**
* Encapsulates the response attributes of a PresentationRequest.
*/
export interface PresentationRequestResponse {
presentationRequest: PresentationRequest;
verifier: VerifierInfo;
issuers: IssuerInfoMap;
deeplink: string;
qrCode: string;
}
/**
* Encapsulates the statues of a Credential with the internal uuid.

@@ -88,0 +77,0 @@ */

@@ -1,2 +0,1 @@

import * as express from 'express';
import { configData } from '../config';

@@ -6,13 +5,7 @@ import { requireAuth } from '../requireAuth';

import { CryptoError } from '@unumid/library-crypto';
import { CredentialRequest, SignedPresentationRequest, UnsignedPresentationRequest } from '@unumid/types';
import { CredentialRequest, PresentationRequestPostDto, SignedPresentationRequest, UnsignedPresentationRequest } from '@unumid/types';
import {
PresentationRequestResponse,
SendRequestReqBody,
UnumDto
} from '../types';
import { SendRequestReqBody, UnumDto } from '../types';
import logger from '../logger';
type SendRequestReqType = express.Request<Record<string, unknown>, PresentationRequestResponse, SendRequestReqBody>
/**

@@ -170,3 +163,11 @@ * Constructs an unsigned PresentationRequest from the incoming request body.

*/
export const sendRequest = async (authorization:string, verifier: string, credentialRequests: CredentialRequest[], eccPrivateKey: string, holderAppUuid: string, expirationDate?: Date, metadata?: Record<string, unknown>): Promise<UnumDto<PresentationRequestResponse>> => {
export const sendRequest = async (
authorization:string,
verifier: string,
credentialRequests: CredentialRequest[],
eccPrivateKey: string,
holderAppUuid: string,
expirationDate?: Date,
metadata?: Record<string, unknown>
): Promise<UnumDto<PresentationRequestPostDto>> => {
try {

@@ -193,7 +194,7 @@ requireAuth(authorization);

const restResp = await makeNetworkRequest<PresentationRequestResponse>(restData);
const restResp = await makeNetworkRequest<PresentationRequestPostDto>(restData);
const authToken: string = handleAuthToken(restResp);
const presentationRequestResponse: UnumDto<PresentationRequestResponse> = { body: { ...restResp.body }, authToken };
const presentationRequestResponse: UnumDto<PresentationRequestPostDto> = { body: { ...restResp.body }, authToken };

@@ -200,0 +201,0 @@ return presentationRequestResponse;

@@ -10,2 +10,3 @@ import {

} from '@unumid/library-issuer-verifier-utility';
import { HolderApp, PresentationRequestPostDto } from '@unumid/types';

@@ -16,3 +17,2 @@ import { configData } from '../../src/config';

Verifier,
PresentationRequestResponse,
VerifierInfo,

@@ -207,2 +207,3 @@ IssuerInfoMap,

issuers?: IssuerInfoMap;
holderApp?: HolderAppInfo;
}

@@ -232,3 +233,12 @@

export const makeDummyPresentationRequestResponse = async (options: MakeDummyPresentationRequestOptions = {}): Promise<PresentationRequestResponse> => {
type HolderAppInfo = Pick<HolderApp, 'name' | 'uriScheme' | 'deeplinkButtonImg'>
export const makeDummyHolderAppInfo = (options: Partial<HolderAppInfo> = {}): HolderAppInfo => {
return {
name: options.name || 'Dummy HolderApp',
uriScheme: options.uriScheme || 'acme://',
deeplinkButtonImg: options.deeplinkButtonImg || 'data:image/png;base64,dummydeeplinkButtonImg'
};
};
export const makeDummyPresentationRequestResponse = async (options: MakeDummyPresentationRequestOptions = {}): Promise<PresentationRequestPostDto> => {
const unsignedPresentationRequest = options.unsignedPresentationRequest || makeDummyUnsignedPresentationRequest();

@@ -246,2 +256,3 @@ const privateKeyId = options.privateKeyId || getUUID();

const issuers = options.issuers || makeDummyIssuerInfoMap();
const holderApp = makeDummyHolderAppInfo(options.holderApp);

@@ -267,3 +278,4 @@ let { privateKey } = options;

verifier,
issuers
issuers,
holderApp
};

@@ -270,0 +282,0 @@ };

import * as utilLib from '@unumid/library-issuer-verifier-utility';
import { CredentialRequest } from '@unumid/types';
import { CredentialRequest, PresentationRequestPostDto, PresentationRequest } from '@unumid/types';
import { sendRequest } from '../../src/index';
import { PresentationRequestResponse, UnumDto } from '../../src/types';
import { UnumDto } from '../../src/types';
import { dummyAuthToken, makeDummyPresentationRequestResponse } from './mocks';

@@ -27,3 +27,3 @@

authToken: string
): Promise<UnumDto<PresentationRequestResponse>> => {
): Promise<UnumDto<PresentationRequestPostDto>> => {
return sendRequest(authToken, verifier, credentialRequests, eccPrivateKey, holderAppUuid, expiresAt, metadata);

@@ -52,5 +52,5 @@ };

describe('sendRequest', () => {
let apiResponse: UnumDto<PresentationRequestResponse>, apiResponseAuthToken: string;
let apiResponse: UnumDto<PresentationRequestPostDto>, apiResponseAuthToken: string;
let metadata: Record<string, unknown>, expiresAt: Date;
let presentationRequestResponse: PresentationRequestResponse;
let presentationRequestResponse: PresentationRequestPostDto;
let presentationRequest: PresentationRequest;

@@ -171,3 +171,3 @@

describe('sendRequest - Failure cases', () => {
let response: UnumDto<PresentationRequestResponse>;
let response: UnumDto<PresentationRequestPostDto>;
const {

@@ -174,0 +174,0 @@ verifier,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc