Skip to content

Commit 318dc7a

Browse files
authored
add Iden3BasicDisplayMethodV1 (#241)
1 parent a803979 commit 318dc7a

File tree

5 files changed

+31
-5
lines changed

5 files changed

+31
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@0xpolygonid/js-sdk",
3-
"version": "1.15.2",
3+
"version": "1.15.3",
44
"description": "SDK to work with Polygon ID",
55
"main": "dist/node/cjs/index.js",
66
"module": "dist/node/esm/index.js",

src/verifiable/constants.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,12 @@ export enum PaymentType {
146146
export enum SupportedCurrencies {
147147
ETH = 'ETH'
148148
}
149+
150+
/**
151+
* DisplayMethodType type for display method
152+
*
153+
* @enum {string}
154+
*/
155+
export enum DisplayMethodType {
156+
Iden3BasicDisplayMethodV1 = 'Iden3BasicDisplayMethodV1'
157+
}

src/verifiable/credential.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import {
33
BJJSignatureProof2021,
44
Iden3SparseMerkleTreeProof,
55
CredentialStatus,
6-
RefreshService
6+
RefreshService,
7+
DisplayMethod
78
} from './proof';
89
import {
910
Claim,
@@ -42,6 +43,7 @@ export class W3CCredential {
4243
type: string[] = [];
4344
expirationDate?: string;
4445
refreshService?: RefreshService;
46+
displayMethod?: DisplayMethod;
4547
issuanceDate?: string;
4648
credentialSubject: { [key: string]: object | string | number | boolean } = {};
4749
credentialStatus!: CredentialStatus;

src/verifiable/proof.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { Hash, Proof } from '@iden3/js-merkletree';
2-
import { ProofType, CredentialStatusType, RefreshServiceType } from './constants';
2+
import {
3+
ProofType,
4+
CredentialStatusType,
5+
RefreshServiceType,
6+
DisplayMethodType
7+
} from './constants';
38
import { TreeState } from '../circuits';
49
import { Hex, Signature } from '@iden3/js-crypto';
510
import { Claim, DID } from '@iden3/js-iden3-core';
@@ -260,3 +265,13 @@ export interface RefreshService {
260265
id: string;
261266
type: RefreshServiceType | string;
262267
}
268+
269+
/**
270+
* DisplayMethod contains type and id
271+
* @public
272+
* @interface DisplayMethod
273+
*/
274+
export interface DisplayMethod {
275+
id: string;
276+
type: DisplayMethodType | string;
277+
}

0 commit comments

Comments
 (0)