@sphereon/ssi-sdk.data-store
Version:
73 lines • 2.16 kB
TypeScript
export type NonPersistedDigitalCredential = Omit<DigitalCredential, 'id' | 'regulationType'> & {
regulationType?: RegulationType;
};
export type DigitalCredential = {
id: string;
parentId?: string;
documentType: DocumentType;
documentFormat: CredentialDocumentFormat;
credentialRole: CredentialRole;
regulationType: RegulationType;
rawDocument: string;
uniformDocument: string;
credentialId?: string;
hash: string;
kmsKeyRef?: string;
identifierMethod?: string;
issuerCorrelationType: CredentialCorrelationType;
subjectCorrelationType?: CredentialCorrelationType;
rpCorrelationType?: CredentialCorrelationType;
isIssuerSigned?: boolean;
issuerCorrelationId: string;
subjectCorrelationId?: string;
rpCorrelationId?: string;
verifiedState?: CredentialStateType;
tenantId?: string;
createdAt: Date;
presentedAt?: Date;
lastUpdatedAt: Date;
validUntil?: Date;
validFrom?: Date;
verifiedAt?: Date;
revokedAt?: Date;
};
export declare enum DocumentType {
VC = "VC",
VP = "VP",
P = "P",
C = "C"
}
export declare enum RegulationType {
PID = "PID",
QEAA = "QEAA",
EAA = "EAA",
NON_REGULATED = "NON_REGULATED"
}
export declare enum CredentialDocumentFormat {
JSON_LD = "JSON_LD",
JWT = "JWT",
SD_JWT = "SD_JWT",
MSO_MDOC = "MSO_MDOC"
}
export declare namespace CredentialDocumentFormat {
function fromSpecValue(credentialFormat: string): CredentialDocumentFormat;
function toSpecValue(documentFormat: CredentialDocumentFormat, documentType: DocumentType): "vc+sd-jwt" | "mso_mdoc" | "ldp_vc" | "ldp_vp" | "jwt_vc_json" | "jwt_vp_json";
}
export declare enum CredentialCorrelationType {
DID = "DID",
X509_SAN = "X509_SAN",
KID = "KID",
URL = "URL"
}
export declare enum CredentialRole {
ISSUER = "ISSUER",
VERIFIER = "VERIFIER",
HOLDER = "HOLDER",
FEDERATION_TRUST_ANCHOR = "FEDERATION_TRUST_ANCHOR"
}
export declare enum CredentialStateType {
REVOKED = "REVOKED",
VERIFIED = "VERIFIED",
EXPIRED = "EXPIRED"
}
//# sourceMappingURL=digitalCredential.d.ts.map