refactor: remove old VID code

This commit is contained in:
Paolo Miguel de Leon
2022-05-12 10:26:20 +08:00
parent 604a879413
commit 2b339b51c3
7 changed files with 203 additions and 376 deletions

View File

@@ -9,7 +9,12 @@ export interface VC {
isVerified: boolean;
lastVerifiedOn: number;
locked: boolean;
reason?: string[];
reason?: VCSharingReason[];
}
export interface VCSharingReason {
timestamp: number;
message: string;
}
export type VcIdType = 'UIN' | 'VID';

View File

@@ -1,63 +0,0 @@
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;
}