allow for multiple sharing reason

This commit is contained in:
pmigueld
2022-02-21 18:13:39 +08:00
committed by Paolo Miguel de Leon
parent f7fa134dce
commit e815236ef7
7 changed files with 472 additions and 11 deletions

View File

@@ -8,8 +8,8 @@ export interface VC {
requestId: string;
isVerified: boolean;
lastVerifiedOn: number;
reason?: string;
locked: boolean;
reason?: string[];
}
export type VcIdType = 'UIN' | 'VID';

63
types/vid.ts Normal file
View File

@@ -0,0 +1,63 @@
export interface VID {
tag: string;
uin: string;
credential: VIDCredential;
verifiableCredential: VIDVerifiableCredential;
generatedOn: Date;
requestId: string;
reason?: VIDSharingReason[];
}
export interface VIDSharingReason {
timestamp: number;
message: string;
}
export interface VIDCredential {
id: string;
uin: string;
fullName: string;
gender: string;
biometrics: {
// Encrypted Base64Encoded Biometrics
face: string;
finger: {
left_thumb: string;
right_thumb: string;
};
};
dateOfBirth: string;
phone: string;
email: string;
region: string;
addressLine1: string;
addressLine2: string;
addressLine3: string;
city: string;
province: string;
postalCode: string;
}
export interface VIDVerifiableCredential {
id: string;
transactionId: string;
type: {
namespace: string;
name: string;
};
timestamp: string;
dataShareUri: string;
data: {
credential: string;
proof: {
signature: string;
};
credentialType: string;
protectionKey: string;
};
}
export interface VIDLabel {
singular: string;
plural: string;
}