diff --git a/package-lock.json b/package-lock.json index 5cab2bf2..145d9b0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@0xpolygonid/js-sdk", - "version": "1.15.2", + "version": "1.15.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@0xpolygonid/js-sdk", - "version": "1.15.2", + "version": "1.15.3", "license": "MIT or Apache-2.0", "dependencies": { "@noble/curves": "^1.4.0", diff --git a/package.json b/package.json index 6d13255c..2dc429c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@0xpolygonid/js-sdk", - "version": "1.15.2", + "version": "1.15.3", "description": "SDK to work with Polygon ID", "main": "dist/node/cjs/index.js", "module": "dist/node/esm/index.js", diff --git a/src/verifiable/constants.ts b/src/verifiable/constants.ts index e4917b53..beaa591b 100644 --- a/src/verifiable/constants.ts +++ b/src/verifiable/constants.ts @@ -146,3 +146,12 @@ export enum PaymentType { export enum SupportedCurrencies { ETH = 'ETH' } + +/** + * DisplayMethodType type for display method + * + * @enum {string} + */ +export enum DisplayMethodType { + Iden3BasicDisplayMethodV1 = 'Iden3BasicDisplayMethodV1' +} diff --git a/src/verifiable/credential.ts b/src/verifiable/credential.ts index 22e27140..8f5f2bc8 100644 --- a/src/verifiable/credential.ts +++ b/src/verifiable/credential.ts @@ -3,7 +3,8 @@ import { BJJSignatureProof2021, Iden3SparseMerkleTreeProof, CredentialStatus, - RefreshService + RefreshService, + DisplayMethod } from './proof'; import { Claim, @@ -42,6 +43,7 @@ export class W3CCredential { type: string[] = []; expirationDate?: string; refreshService?: RefreshService; + displayMethod?: DisplayMethod; issuanceDate?: string; credentialSubject: { [key: string]: object | string | number | boolean } = {}; credentialStatus!: CredentialStatus; diff --git a/src/verifiable/proof.ts b/src/verifiable/proof.ts index 702170f6..2867c505 100644 --- a/src/verifiable/proof.ts +++ b/src/verifiable/proof.ts @@ -1,5 +1,10 @@ import { Hash, Proof } from '@iden3/js-merkletree'; -import { ProofType, CredentialStatusType, RefreshServiceType } from './constants'; +import { + ProofType, + CredentialStatusType, + RefreshServiceType, + DisplayMethodType +} from './constants'; import { TreeState } from '../circuits'; import { Hex, Signature } from '@iden3/js-crypto'; import { Claim, DID } from '@iden3/js-iden3-core'; @@ -260,3 +265,13 @@ export interface RefreshService { id: string; type: RefreshServiceType | string; } + +/** + * DisplayMethod contains type and id + * @public + * @interface DisplayMethod + */ +export interface DisplayMethod { + id: string; + type: DisplayMethodType | string; +}