gdc-common-utils-ts 1.0.4 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AesManager.d.ts +27 -0
- package/dist/AesManager.js +62 -0
- package/dist/CryptographyService.d.ts +76 -0
- package/dist/CryptographyService.js +403 -0
- package/dist/constants/Schemas.d.ts +45 -0
- package/dist/constants/Schemas.js +48 -0
- package/dist/constants/index.js +1 -0
- package/{src/constants/schemaorg.ts → dist/constants/schemaorg.d.ts} +24 -116
- package/dist/constants/schemaorg.js +185 -0
- package/dist/cryptoDecode.d.ts +3 -0
- package/dist/cryptoDecode.js +90 -0
- package/dist/cryptoEncode.d.ts +1 -0
- package/dist/cryptoEncode.js +30 -0
- package/dist/cryptography.abstract.d.ts +13 -0
- package/{src/cryptography.abstract.ts → dist/cryptography.abstract.js} +6 -14
- package/dist/hmac.d.ts +2 -0
- package/{src/hmac.ts → dist/hmac.js} +4 -7
- package/dist/index.js +3 -0
- package/{src/interfaces/Cryptography.types.ts → dist/interfaces/Cryptography.types.d.ts} +71 -71
- package/dist/interfaces/Cryptography.types.js +8 -0
- package/dist/interfaces/ICryptoHelper.d.ts +28 -0
- package/dist/interfaces/ICryptoHelper.js +3 -0
- package/dist/interfaces/ICryptography.d.ts +154 -0
- package/dist/interfaces/ICryptography.js +3 -0
- package/dist/interfaces/IWallet.d.ts +55 -0
- package/dist/interfaces/IWallet.js +3 -0
- package/dist/interfaces/MlDsa.d.ts +9 -0
- package/{src/interfaces/MlDsa.ts → dist/interfaces/MlDsa.js} +1 -5
- package/dist/interfaces/MlKem.d.ts +11 -0
- package/{src/interfaces/MlKem.ts → dist/interfaces/MlKem.js} +0 -5
- package/dist/models/aes.d.ts +85 -0
- package/dist/models/aes.js +10 -0
- package/dist/models/auth.d.ts +35 -0
- package/dist/models/auth.js +3 -0
- package/{src/models/bundle.ts → dist/models/bundle.d.ts} +41 -63
- package/dist/models/bundle.js +26 -0
- package/dist/models/clinical-sections.d.ts +36 -0
- package/dist/models/clinical-sections.en.d.ts +75 -0
- package/dist/models/clinical-sections.en.js +81 -0
- package/dist/models/clinical-sections.js +32 -0
- package/dist/models/comm.d.ts +44 -0
- package/dist/models/comm.js +4 -0
- package/{src/models/confidential-job.ts → dist/models/confidential-job.d.ts} +23 -45
- package/dist/models/confidential-job.js +20 -0
- package/dist/models/confidential-message.d.ts +97 -0
- package/dist/models/confidential-message.js +4 -0
- package/{src/models/confidential-storage.ts → dist/models/confidential-storage.d.ts} +35 -56
- package/dist/models/confidential-storage.js +3 -0
- package/{src/models/consent-rule.ts → dist/models/consent-rule.d.ts} +22 -42
- package/dist/models/consent-rule.js +21 -0
- package/{src/models/crypto.ts → dist/models/crypto.d.ts} +5 -13
- package/dist/models/crypto.js +3 -0
- package/dist/models/device-license.d.ts +133 -0
- package/dist/models/device-license.js +3 -0
- package/{src/models/did.ts → dist/models/did.d.ts} +21 -30
- package/dist/models/did.js +3 -0
- package/dist/models/index.js +31 -0
- package/dist/models/indexing.d.ts +11 -0
- package/dist/models/indexing.js +18 -0
- package/dist/models/issue.d.ts +57 -0
- package/dist/models/issue.js +75 -0
- package/dist/models/jsonapi.d.ts +13 -0
- package/dist/models/jsonapi.js +3 -0
- package/{src/models/jwe.ts → dist/models/jwe.d.ts} +10 -22
- package/dist/models/jwe.js +3 -0
- package/{src/models/jwk.ts → dist/models/jwk.d.ts} +0 -11
- package/dist/models/jwk.js +3 -0
- package/{src/models/jws.ts → dist/models/jws.d.ts} +0 -7
- package/dist/models/jws.js +3 -0
- package/dist/models/jwt.d.ts +9 -0
- package/dist/models/jwt.js +3 -0
- package/dist/models/multibase58.d.ts +13 -0
- package/dist/models/multibase58.js +40 -0
- package/dist/models/oidc4ida.common.model.d.ts +33 -0
- package/dist/models/oidc4ida.common.model.js +3 -0
- package/dist/models/oidc4ida.document.model.d.ts +50 -0
- package/dist/models/oidc4ida.document.model.js +3 -0
- package/{src/models/oidc4ida.electronicRecord.model.ts → dist/models/oidc4ida.electronicRecord.model.d.ts} +18 -37
- package/dist/models/oidc4ida.electronicRecord.model.js +3 -0
- package/{src/models/oidc4ida.evidence.model.ts → dist/models/oidc4ida.evidence.model.d.ts} +17 -35
- package/dist/models/oidc4ida.evidence.model.js +5 -0
- package/dist/models/openid-device.d.ts +119 -0
- package/dist/models/openid-device.js +3 -0
- package/dist/models/operation-outcome.d.ts +26 -0
- package/dist/models/operation-outcome.js +3 -0
- package/{src/models/params.ts → dist/models/params.d.ts} +20 -29
- package/dist/models/params.js +3 -0
- package/dist/models/resource-document.d.ts +14 -0
- package/dist/models/resource-document.js +3 -0
- package/dist/models/response.d.ts +1 -0
- package/dist/models/response.js +3 -0
- package/dist/models/urlPath.d.ts +58 -0
- package/dist/models/urlPath.js +76 -0
- package/dist/models/verifiable-credential.d.ts +45 -0
- package/dist/models/verifiable-credential.js +8 -0
- package/dist/utils/actor.d.ts +18 -0
- package/dist/utils/actor.js +36 -0
- package/dist/utils/base-convert.d.ts +20 -0
- package/{src/utils/base-convert.ts → dist/utils/base-convert.js} +23 -36
- package/dist/utils/baseN.d.ts +35 -0
- package/dist/utils/baseN.js +174 -0
- package/dist/utils/bundle.d.ts +6 -0
- package/dist/utils/bundle.js +32 -0
- package/dist/utils/content.d.ts +55 -0
- package/{src/utils/content.ts → dist/utils/content.js} +4 -10
- package/dist/utils/did.d.ts +67 -0
- package/dist/utils/did.js +123 -0
- package/dist/utils/format-converter.d.ts +21 -0
- package/dist/utils/format-converter.js +109 -0
- package/dist/utils/index.js +13 -0
- package/dist/utils/jwt.d.ts +52 -0
- package/dist/utils/jwt.js +153 -0
- package/dist/utils/manager-error.d.ts +15 -0
- package/dist/utils/manager-error.js +23 -0
- package/dist/utils/multibase58.d.ts +13 -0
- package/dist/utils/multibase58.js +40 -0
- package/dist/utils/multibasehash.d.ts +8 -0
- package/{src/utils/multibasehash.ts → dist/utils/multibasehash.js} +8 -13
- package/dist/utils/normalize.d.ts +16 -0
- package/{src/utils/normalize.ts → dist/utils/normalize.js} +15 -18
- package/dist/utils/object-convert.d.ts +20 -0
- package/{src/utils/object-convert.ts → dist/utils/object-convert.js} +10 -16
- package/dist/utils/string-convert.d.ts +24 -0
- package/{src/utils/string-convert.ts → dist/utils/string-convert.js} +5 -14
- package/dist/utils/string-utils.d.ts +25 -0
- package/{src/utils/string-utils.ts → dist/utils/string-utils.js} +12 -16
- package/dist/utils/url.d.ts +27 -0
- package/{src/utils/url.ts → dist/utils/url.js} +6 -7
- package/package.json +56 -14
- package/PUBLISHING.md +0 -33
- package/__tests__/AesManager.test.ts +0 -53
- package/__tests__/CryptographyService.test.ts +0 -194
- package/__tests__/bundle.test.ts +0 -29
- package/__tests__/content.test.ts +0 -72
- package/__tests__/crypto-encode-decode.test.ts +0 -52
- package/__tests__/crypto-hmac.test.ts +0 -21
- package/__tests__/did-generateServiceId.errors.test.ts +0 -8
- package/__tests__/did-generateServiceId.test.ts +0 -18
- package/__tests__/models-clinical-sections.test.ts +0 -32
- package/__tests__/models-multibase58.test.ts +0 -33
- package/__tests__/multibase58.errors.test.ts +0 -7
- package/__tests__/multibase58.test.ts +0 -28
- package/__tests__/multibasehash.test.ts +0 -25
- package/__tests__/utils-actor.test.ts +0 -46
- package/__tests__/utils-base-convert.test.ts +0 -57
- package/__tests__/utils-baseN.test.ts +0 -40
- package/__tests__/utils-did-extra.test.ts +0 -33
- package/__tests__/utils-format-converter.test.ts +0 -87
- package/__tests__/utils-jwt.test.ts +0 -57
- package/__tests__/utils-manager-error.test.ts +0 -11
- package/__tests__/utils-normalize.test.ts +0 -15
- package/__tests__/utils-object-convert.test.ts +0 -38
- package/__tests__/utils-string-convert.test.ts +0 -20
- package/__tests__/utils-string-utils.test.ts +0 -25
- package/__tests__/utils-url.test.ts +0 -21
- package/babel.config.cjs +0 -5
- package/jest.config.ts +0 -47
- package/src/AesManager.ts +0 -82
- package/src/CryptographyService.ts +0 -461
- package/src/JweManager.ts.txt +0 -365
- package/src/KmsService.txt +0 -493
- package/src/constants/Schemas.ts +0 -61
- package/src/cryptoDecode.ts +0 -104
- package/src/cryptoEncode.ts +0 -36
- package/src/interfaces/ICryptoHelper.ts +0 -33
- package/src/interfaces/ICryptography.ts +0 -177
- package/src/interfaces/IWallet.ts +0 -62
- package/src/models/aes.ts +0 -93
- package/src/models/auth.ts +0 -38
- package/src/models/bundle.txt +0 -93
- package/src/models/clinical-sections.en.ts +0 -82
- package/src/models/clinical-sections.ts +0 -64
- package/src/models/comm.ts +0 -63
- package/src/models/confidential-message.ts +0 -137
- package/src/models/device-license.ts +0 -161
- package/src/models/indexing.ts +0 -20
- package/src/models/issue.ts +0 -85
- package/src/models/jsonapi.ts +0 -19
- package/src/models/jwt.ts +0 -15
- package/src/models/multibase58.ts +0 -46
- package/src/models/oidc4ida.common.model.ts +0 -39
- package/src/models/oidc4ida.document.model.ts +0 -61
- package/src/models/openid-device.ts +0 -146
- package/src/models/operation-outcome.ts +0 -34
- package/src/models/resource-document.ts +0 -21
- package/src/models/response.ts +0 -5
- package/src/models/urlPath.ts +0 -76
- package/src/models/verifiable-credential.ts +0 -52
- package/src/types/noble-hashes.d.ts +0 -4
- package/src/utils/actor.ts +0 -56
- package/src/utils/baseN.ts +0 -203
- package/src/utils/bundle.ts +0 -30
- package/src/utils/did.ts +0 -155
- package/src/utils/format-converter.ts +0 -119
- package/src/utils/jwt.ts +0 -165
- package/src/utils/manager-error.ts +0 -27
- package/src/utils/multibase58.ts +0 -46
- package/tsconfig.json +0 -15
- /package/{src/constants/index.ts → dist/constants/index.d.ts} +0 -0
- /package/{src/index.ts → dist/index.d.ts} +0 -0
- /package/{src/models/index.ts → dist/models/index.d.ts} +0 -0
- /package/{src/utils/index.ts → dist/utils/index.d.ts} +0 -0
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canonical registry of supported clinical document sections (e.g., IPS Composition sections).
|
|
3
|
-
*
|
|
4
|
-
* Design goals:
|
|
5
|
-
* - Use stable codes (LOINC) for interoperability.
|
|
6
|
-
* - Provide a reverse-DNS i18n key for consistent UI translations across apps.
|
|
7
|
-
* - Keep this in `gdc-common-utils-ts` so both backend and frontend can share it.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { clinicalSectionTitleEn } from './clinical-sections.en';
|
|
11
|
-
|
|
12
|
-
export const LOINC_SYSTEM_URL = 'http://loinc.org' as const;
|
|
13
|
-
export const LOINC_SYSTEM_REVERSE_DNS = 'org.loinc' as const;
|
|
14
|
-
|
|
15
|
-
export type ClinicalSectionDescriptor = {
|
|
16
|
-
/** Canonical coding system URL (FHIR-style). */
|
|
17
|
-
system: string;
|
|
18
|
-
/** Code within the coding system (e.g., a LOINC code). */
|
|
19
|
-
code: string;
|
|
20
|
-
/**
|
|
21
|
-
* Reverse-DNS translation key, intended for i18n resources.
|
|
22
|
-
* Example: `org.loinc.48765-2`.
|
|
23
|
-
*/
|
|
24
|
-
i18nKey: string;
|
|
25
|
-
/**
|
|
26
|
-
* English fallback label (documentation/UI fallback).
|
|
27
|
-
*
|
|
28
|
-
* Prefer rendering a UI label via `i18nKey` (e.g., `org.loinc.<CODE>`) rather than relying on this.
|
|
29
|
-
*/
|
|
30
|
-
titleEn?: string;
|
|
31
|
-
/** True when this is an IPS-aligned section code. */
|
|
32
|
-
ips?: boolean;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export function loincI18nKey(code: string): string {
|
|
36
|
-
return `${LOINC_SYSTEM_REVERSE_DNS}.${code}`;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type SupportedClinicalSectionCode = keyof typeof clinicalSectionTitleEn;
|
|
40
|
-
|
|
41
|
-
export const supportedClinicalSectionCodes = Object.freeze(
|
|
42
|
-
Object.keys(clinicalSectionTitleEn) as SupportedClinicalSectionCode[]
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
export const clinicalSectionRegistry: Readonly<Record<string, ClinicalSectionDescriptor>> = (() => {
|
|
46
|
-
const entries = Object.entries(clinicalSectionTitleEn).map(([code, titleEn]) => {
|
|
47
|
-
const descriptor: ClinicalSectionDescriptor = {
|
|
48
|
-
system: LOINC_SYSTEM_URL,
|
|
49
|
-
code,
|
|
50
|
-
i18nKey: loincI18nKey(code),
|
|
51
|
-
titleEn,
|
|
52
|
-
ips: true,
|
|
53
|
-
};
|
|
54
|
-
return [code, descriptor] as const;
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
return Object.freeze(Object.fromEntries(entries));
|
|
58
|
-
})();
|
|
59
|
-
|
|
60
|
-
export { clinicalSectionTitleEn };
|
|
61
|
-
|
|
62
|
-
export function getClinicalSectionByCode(code: string): ClinicalSectionDescriptor | undefined {
|
|
63
|
-
return clinicalSectionRegistry[code];
|
|
64
|
-
}
|
package/src/models/comm.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
// File: src/models/comm.ts
|
|
3
|
-
// Description: Defines the core communication and data structures based on DIDComm and FHIR.
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Represents the standard payload of a DIDComm v2 message.
|
|
7
|
-
* @see https://identity.foundation/didcomm-messaging/spec/v2.0/#plaintext-message-structure
|
|
8
|
-
*/
|
|
9
|
-
export interface DidCommPayload {
|
|
10
|
-
id: string; // Message ID, required.
|
|
11
|
-
type: string; // Message Type URI, required.
|
|
12
|
-
from?: string; // Sender DID
|
|
13
|
-
to?: string[]; // Recipient DIDs
|
|
14
|
-
thid?: string; // Thread ID
|
|
15
|
-
pthid?: string; // Parent Thread ID
|
|
16
|
-
created_time?: number;
|
|
17
|
-
expires_time?: number;
|
|
18
|
-
body: { [key: string]: any };
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Represents a data entry in the `body` of a CommMsgExtended,
|
|
23
|
-
* following a hybrid JSON:API and FHIR structure.
|
|
24
|
-
*/
|
|
25
|
-
export interface DataEntry {
|
|
26
|
-
id: string;
|
|
27
|
-
type: 'Annotation' | 'Reference' | 'Attachment' | 'CodeableConcept' | string;
|
|
28
|
-
resource: { [key: string]: any };
|
|
29
|
-
meta?: {
|
|
30
|
-
claims: any;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The canonical, internal representation of a secure message, extending
|
|
36
|
-
* the standard DIDComm payload with FHIR-specific, flattened metadata.
|
|
37
|
-
*/
|
|
38
|
-
export interface CommMsgExtended extends DidCommPayload {
|
|
39
|
-
// Overriding body for a more specific structure
|
|
40
|
-
body: {
|
|
41
|
-
data: DataEntry[];
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
// FHIR Communication resource fields, flattened for use as metadata or search parameters.
|
|
45
|
-
// These are derived from the source FHIR resource during conversion.
|
|
46
|
-
|
|
47
|
-
// 'status'?: string; // e.g., 'completed', 'in-progress'
|
|
48
|
-
// 'statusReason'?: string; // Flattened from CodeableConcept
|
|
49
|
-
// 'partOf'?: string; // Comma-separated list of URNs/URLs
|
|
50
|
-
// 'basedOn'?: string; // Comma-separated list of URNs/URLs
|
|
51
|
-
// 'inResponseTo'?: string; // Comma-separated list of URNs/URLs
|
|
52
|
-
// 'priority'?: string; // e.g., 'routine', 'urgent'
|
|
53
|
-
// 'topic'?: string; // Flattened from CodeableConcept
|
|
54
|
-
// 'medium'?: string; // Flattened from CodeableConcept
|
|
55
|
-
// 'about'?: string; // Comma-separated list of URNs/URLs
|
|
56
|
-
// 'encounter'?: string; // URN or URL
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* A type placeholder for a FHIR Communication resource.
|
|
61
|
-
*/
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
-
export type FhirCommunication = any;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
// File: crypto-ts/models/confidential-message.ts
|
|
3
|
-
// Description: Defines the core communication and data structures based on DIDComm and FHIR.
|
|
4
|
-
|
|
5
|
-
import { ProtectedHeadersJWE } from "./jwe";
|
|
6
|
-
import { JwsHeader } from "./jws";
|
|
7
|
-
|
|
8
|
-
export type { DataEntry } from "./comm";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Defines the structure of the cryptographic metadata associated with a job request.
|
|
12
|
-
*/
|
|
13
|
-
export interface DidCommDecodedMetadata {
|
|
14
|
-
jws?: {
|
|
15
|
-
protected?: JwsHeader;
|
|
16
|
-
/** Detached signature of the request JWS (when available). */
|
|
17
|
-
signature?: string;
|
|
18
|
-
};
|
|
19
|
-
jwe?: {
|
|
20
|
-
header?: ProtectedHeadersJWE;
|
|
21
|
-
};
|
|
22
|
-
bearer?: {
|
|
23
|
-
compact?: string,
|
|
24
|
-
jwt: {
|
|
25
|
-
header?: JwsHeader;
|
|
26
|
-
payload?: Record<string, any>;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Represents the standard payload of a DIDComm v2 message.
|
|
33
|
-
* @see https://identity.foundation/didcomm-messaging/spec/v2.0/#plaintext-message-structure
|
|
34
|
-
*/
|
|
35
|
-
/**
|
|
36
|
-
* Represents the plaintext of a decoded DIDComm message.
|
|
37
|
-
* This is the core business-level "input" for a job.
|
|
38
|
-
* For FAPI compliance, this entire object is typically the payload of a signed JWS.
|
|
39
|
-
*/
|
|
40
|
-
export interface IDecodedDidcommPayload {
|
|
41
|
-
|
|
42
|
-
/** Relevant information available through the decryption and verification process */
|
|
43
|
-
meta?: DidCommDecodedMetadata;
|
|
44
|
-
|
|
45
|
-
// --- FAPI & JWT Core Claims ---
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* (Issuer) The DID of the entity that issued the message.
|
|
49
|
-
* REQUIRED for FAPI. MUST match the signer of the enclosing JWS.
|
|
50
|
-
*/
|
|
51
|
-
iss: string;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* (Audience) The URL of the backend endpoint that will process this message.
|
|
55
|
-
* REQUIRED for FAPI. The backend MUST validate that this value matches its own URL.
|
|
56
|
-
*/
|
|
57
|
-
aud: string;
|
|
58
|
-
|
|
59
|
-
/** (Expiration Time) Timestamp after which the message is considered invalid. REQUIRED for FAPI (instead of expires_time). */
|
|
60
|
-
exp?: number;
|
|
61
|
-
|
|
62
|
-
/** (Not Before) Timestamp before which the message must not be processed. REQUIRED for FAPI (instead of created_time). */
|
|
63
|
-
nbf?: number;
|
|
64
|
-
|
|
65
|
-
/** (Issued At) Timestamp when the message was issued. REQUIRED for FAPI. */
|
|
66
|
-
iat?: number;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* (JWT ID) A unique identifier for this message/token. Can be used to prevent replay attacks.
|
|
70
|
-
* In our architecture, this can also serve as the version hash of the data content.
|
|
71
|
-
*/
|
|
72
|
-
jti: string;
|
|
73
|
-
|
|
74
|
-
// --- DIDComm Core Fields ---
|
|
75
|
-
|
|
76
|
-
/** Optional. The `jti` identifies both the message and job for processing */
|
|
77
|
-
id?: string;
|
|
78
|
-
|
|
79
|
-
/** The Transaction ID / Thread ID for message correlation across an interaction. */
|
|
80
|
-
thid: string;
|
|
81
|
-
|
|
82
|
-
/** Parent Thread ID */
|
|
83
|
-
pthid?: string;
|
|
84
|
-
|
|
85
|
-
/** The DID of the intended recipient. Used for P2P messaging, informational in client-server requests. */
|
|
86
|
-
to?: string[];
|
|
87
|
-
|
|
88
|
-
/** The DID of the sender. Used for P2P messaging, but `iss` is the authoritative value for FAPI. */
|
|
89
|
-
from?: string;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* The Message Type URI, identifying the type of data in the body or protocol used.
|
|
93
|
-
* (e.g. 'application/json')
|
|
94
|
-
*/
|
|
95
|
-
type: string;
|
|
96
|
-
|
|
97
|
-
/** The main business payload of the message. The structure is defined by the 'type' protocol. */
|
|
98
|
-
body: any;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Represents a data entry in the `body` of a CommMsgExtended,
|
|
103
|
-
* following a hybrid JSON:API and FHIR structure.
|
|
104
|
-
*/
|
|
105
|
-
export interface CommDataEntry {
|
|
106
|
-
id: string;
|
|
107
|
-
type: 'Annotation' | 'Reference' | 'Attachment' | 'CodeableConcept' | string;
|
|
108
|
-
resource: { [key: string]: any };
|
|
109
|
-
meta?: {
|
|
110
|
-
claims: any;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* The canonical, internal representation of a secure message, extending
|
|
116
|
-
* the standard DIDComm payload with FHIR-specific, flattened metadata.
|
|
117
|
-
*/
|
|
118
|
-
export interface ICommPayloadExtended extends IDecodedDidcommPayload {
|
|
119
|
-
// Overriding body for a more specific structure
|
|
120
|
-
body: {
|
|
121
|
-
data: CommDataEntry[];
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
// FHIR Communication resource fields, flattened for use as metadata or search parameters.
|
|
125
|
-
// These are derived from the source FHIR resource during conversion.
|
|
126
|
-
|
|
127
|
-
// 'status'?: string; // e.g., 'completed', 'in-progress'
|
|
128
|
-
// 'statusReason'?: string; // Flattened from CodeableConcept
|
|
129
|
-
// 'partOf'?: string; // Comma-separated list of URNs/URLs
|
|
130
|
-
// 'basedOn'?: string; // Comma-separated list of URNs/URLs
|
|
131
|
-
// 'inResponseTo'?: string; // Comma-separated list of URNs/URLs
|
|
132
|
-
// 'priority'?: string; // e.g., 'routine', 'urgent'
|
|
133
|
-
// 'topic'?: string; // Flattened from CodeableConcept
|
|
134
|
-
// 'medium'?: string; // Flattened from CodeableConcept
|
|
135
|
-
// 'about'?: string; // Comma-separated list of URNs/URLs
|
|
136
|
-
// 'encounter'?: string; // URN or URL
|
|
137
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
// src/models/device-license.ts
|
|
2
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A fingerprint of a specific device, used for binding a license to it.
|
|
6
|
-
*/
|
|
7
|
-
export interface DeviceInfo {
|
|
8
|
-
/**
|
|
9
|
-
* A stable, unique identifier for the specific app installation, generated by the client.
|
|
10
|
-
* This is the primary key for device binding.
|
|
11
|
-
*/
|
|
12
|
-
clientInstanceId: string;
|
|
13
|
-
|
|
14
|
-
/** The operating system of the device (e.g., "iOS", "Android", "Windows"). */
|
|
15
|
-
os?: string;
|
|
16
|
-
|
|
17
|
-
/** The specific OS version. */
|
|
18
|
-
osVersion?: string;
|
|
19
|
-
|
|
20
|
-
/** The manufacturer of the device (e.g., "Apple", "Samsung"). */
|
|
21
|
-
manufacturer?: string;
|
|
22
|
-
|
|
23
|
-
/** The model of the device (e.g., "iPhone14,6"). */
|
|
24
|
-
model?: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* A set of rules that a device must match to be eligible to activate a license.
|
|
29
|
-
*/
|
|
30
|
-
export interface DeviceRestrictions {
|
|
31
|
-
/** A regex pattern for the allowed manufacturer(s). */
|
|
32
|
-
manufacturer?: string;
|
|
33
|
-
|
|
34
|
-
/** A regex pattern for the allowed model(s). */
|
|
35
|
-
model?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Represents a single device activation license, enabling a user to register a specific device
|
|
40
|
-
* for a tenant's service. It governs access based on user class, platform, and subscription terms.
|
|
41
|
-
* Timestamps are stored as Unix epoch seconds (numeric).
|
|
42
|
-
* All property names follow the camelCase convention.
|
|
43
|
-
*/
|
|
44
|
-
export interface DeviceLicense {
|
|
45
|
-
/**
|
|
46
|
-
* The unique identifier for this license document in the vault.
|
|
47
|
-
*/
|
|
48
|
-
id: string;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The logical identifier of the tenant organization that owns this license.
|
|
52
|
-
* @example "acme"
|
|
53
|
-
*/
|
|
54
|
-
tenantId: string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Identifier for the purchase order or invoice that generated this license.
|
|
58
|
-
* All licenses created from the same purchase will share the same orderId.
|
|
59
|
-
* @example "inv_12345"
|
|
60
|
-
*/
|
|
61
|
-
orderId: string;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* A secure, single-use code given to a user to activate a device.
|
|
65
|
-
* This is generated when the license status becomes 'issued'.
|
|
66
|
-
*/
|
|
67
|
-
activationCode?: string;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* **CRITICAL:** Defines the class of user this license is intended for.
|
|
71
|
-
* This allows for stratified licensing (e.g., selling "professional seats"
|
|
72
|
-
* separately from "individual access").
|
|
73
|
-
*/
|
|
74
|
-
userClass: 'employee' | 'individual';
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* **Specifies the functional category for an 'employee' license.**
|
|
78
|
-
* This determines the set of roles the user is permitted to have.
|
|
79
|
-
* This field MUST be present if userClass is 'employee'.
|
|
80
|
-
* It is typically undefined for 'individual' licenses.
|
|
81
|
-
* @example "medicalStaff", "firstResponder", "admin"
|
|
82
|
-
*/
|
|
83
|
-
userCategory?: string;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Defines the platform this license is for.
|
|
88
|
-
*/
|
|
89
|
-
type: 'mobile' | 'web';
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* The current lifecycle status of the license.
|
|
93
|
-
* - 'available': Fresh license, ready to be assigned to a user.
|
|
94
|
-
* - 'issued': Assigned to a user and an activation code has been generated.
|
|
95
|
-
* - 'active': The user has successfully used the activation code to register a device.
|
|
96
|
-
* - 'inactive': Deactivated by an administrator or user, or has expired.
|
|
97
|
-
*/
|
|
98
|
-
status: 'available' | 'issued' | 'active' | 'inactive';
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* The subscription or purchase plan associated with this license.
|
|
102
|
-
* @example "premium_annual" | "standard_monthly" | "trial"
|
|
103
|
-
*/
|
|
104
|
-
plan: string;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Defines the renewal period for the license.
|
|
108
|
-
* '1m' for one month, '12m' for one year.
|
|
109
|
-
* A null value indicates the license does not auto-renew.
|
|
110
|
-
*/
|
|
111
|
-
renewalCycle: '1m' | '12m' | null;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* If true, the license can be reactivated after being made inactive
|
|
115
|
-
* (e.g., after a user clicks "Log out everywhere"). If false, an inactive
|
|
116
|
-
* license cannot be used again.
|
|
117
|
-
*/
|
|
118
|
-
reactivationEnabled: boolean;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* "Issued At" timestamp. The time the license was assigned to a user, as a Unix epoch in seconds.
|
|
122
|
-
* Set when status moves to 'issued'.
|
|
123
|
-
*/
|
|
124
|
-
issuedAt?: number;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* "Activation Time" timestamp. The time the license was successfully used to register a device,
|
|
128
|
-
* as a Unix epoch in seconds. Set when status moves to 'active'.
|
|
129
|
-
*/
|
|
130
|
-
activatedAt?: number;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* "Expiration Time" timestamp. The time at which the license and the device's authorization
|
|
134
|
-
* expire, as a Unix epoch in seconds.
|
|
135
|
-
*/
|
|
136
|
-
exp: number;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* The unique identifier of the user (e.g., employeeId or customerId) to whom the license is issued.
|
|
140
|
-
* Populated when the status becomes 'issued'.
|
|
141
|
-
*/
|
|
142
|
-
subjectId?: string;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* The unique identifier (`client_id`) of the device registered with this license.
|
|
146
|
-
* Populated when the status becomes 'active'.
|
|
147
|
-
*/
|
|
148
|
-
deviceId?: string;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Optional, pre-defined restrictions on which devices are allowed to activate this license.
|
|
152
|
-
* Set at the time of license creation.
|
|
153
|
-
*/
|
|
154
|
-
deviceRestrictions?: DeviceRestrictions;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* A fingerprint of the device that successfully activated this license.
|
|
158
|
-
* This is captured upon activation and is used to lock the license to that specific device.
|
|
159
|
-
*/
|
|
160
|
-
deviceInfo?: DeviceInfo;
|
|
161
|
-
}
|
package/src/models/indexing.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
// File: src/models/indexing.ts
|
|
3
|
-
|
|
4
|
-
import { ClaimsOrganizationSchemaorg } from "../constants/schemaorg";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Defines which claims are allowed to be indexed for different resource types.
|
|
8
|
-
* This provides a single, strongly-typed source of truth for indexing strategies.
|
|
9
|
-
*/
|
|
10
|
-
export const AllowedIndexableClaims = {
|
|
11
|
-
/**
|
|
12
|
-
* Defines the claims that can be indexed in the central tenant registry for an Organization.
|
|
13
|
-
*/
|
|
14
|
-
organizationRegistry: [
|
|
15
|
-
ClaimsOrganizationSchemaorg.alternateName,
|
|
16
|
-
ClaimsOrganizationSchemaorg.identifierValue,
|
|
17
|
-
ClaimsOrganizationSchemaorg.identifierType,
|
|
18
|
-
ClaimsOrganizationSchemaorg.addressCountry,
|
|
19
|
-
] as const, // Use 'as const' to provide strong typing for the array elements
|
|
20
|
-
};
|
package/src/models/issue.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// src/models/issue.ts
|
|
2
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
3
|
-
// Source: https://www.hl7.org/fhir/valueset-issue-severity.html
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Defines the level of an issue.
|
|
7
|
-
*/
|
|
8
|
-
export enum IssueLevel {
|
|
9
|
-
/** The issue is fatal and the system is in an unstable state. */
|
|
10
|
-
Fatal = 'fatal',
|
|
11
|
-
/** The issue is an error that prevents the action from completing. */
|
|
12
|
-
Error = 'error',
|
|
13
|
-
/** The issue is a warning that does not prevent the action from completing. */
|
|
14
|
-
Warning = 'warning',
|
|
15
|
-
/** The issue is informational and requires no action. */
|
|
16
|
-
Information = 'information',
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Source: https://www.hl7.org/fhir/valueset-issue-type.html
|
|
20
|
-
/**
|
|
21
|
-
* Defines the code for the type of issue.
|
|
22
|
-
* This is a subset of the full FHIR value set, focused on common API scenarios.
|
|
23
|
-
*/
|
|
24
|
-
export const IssueType = {
|
|
25
|
-
// --- Category: Invalid Content ---
|
|
26
|
-
/** Content invalid against the specification. */
|
|
27
|
-
Invalid: 'invalid',
|
|
28
|
-
/** A required element is missing. */
|
|
29
|
-
Required: 'required',
|
|
30
|
-
/** An element value is invalid. */
|
|
31
|
-
Value: 'value',
|
|
32
|
-
/** A business rule has been violated. */
|
|
33
|
-
BusinessRule: 'business-rule',
|
|
34
|
-
|
|
35
|
-
// --- Category: Security ---
|
|
36
|
-
/** An authentication/authorization error has occurred. */
|
|
37
|
-
Login: 'login',
|
|
38
|
-
/** The user is not authorized for the requested action. */
|
|
39
|
-
Forbidden: 'forbidden',
|
|
40
|
-
/** A security-related issue has been detected. */
|
|
41
|
-
Security: 'security',
|
|
42
|
-
|
|
43
|
-
// --- Category: Processing ---
|
|
44
|
-
/** The resource was not found. */
|
|
45
|
-
NotFound: 'not-found',
|
|
46
|
-
/** The operation led to a conflict. */
|
|
47
|
-
Conflict: 'conflict',
|
|
48
|
-
/** A duplicate record was detected. */
|
|
49
|
-
Duplicate: 'duplicate',
|
|
50
|
-
/** The operation is not supported. */
|
|
51
|
-
NotSupported: 'not-supported',
|
|
52
|
-
/** An internal processing exception occurred. */
|
|
53
|
-
Exception: 'exception',
|
|
54
|
-
/** The operation has timed out. */
|
|
55
|
-
Timeout: 'timeout',
|
|
56
|
-
/** The operation was throttled. */
|
|
57
|
-
Throttled: 'throttled',
|
|
58
|
-
} as const;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* A union type derived from the keys of the IssueType object.
|
|
62
|
-
* This ensures that only defined issue type codes can be used.
|
|
63
|
-
*/
|
|
64
|
-
export type IssueTypeCode = typeof IssueType[keyof typeof IssueType];
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Maps our internal IssueType codes to the appropriate HTTP status code strings.
|
|
68
|
-
* This provides a single source of truth for error responses.
|
|
69
|
-
*/
|
|
70
|
-
export const IssueTypeToHttpStatus: Record<IssueTypeCode, string> = {
|
|
71
|
-
[IssueType.Invalid]: '400',
|
|
72
|
-
[IssueType.Required]: '400',
|
|
73
|
-
[IssueType.Value]: '400',
|
|
74
|
-
[IssueType.BusinessRule]: '400',
|
|
75
|
-
[IssueType.Login]: '401',
|
|
76
|
-
[IssueType.Forbidden]: '403',
|
|
77
|
-
[IssueType.Security]: '403',
|
|
78
|
-
[IssueType.NotFound]: '404',
|
|
79
|
-
[IssueType.Conflict]: '409',
|
|
80
|
-
[IssueType.Duplicate]: '409',
|
|
81
|
-
[IssueType.NotSupported]: '501',
|
|
82
|
-
[IssueType.Exception]: '500',
|
|
83
|
-
[IssueType.Timeout]: '503',
|
|
84
|
-
[IssueType.Throttled]: '429',
|
|
85
|
-
};
|
package/src/models/jsonapi.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
// File: src/models/jsonapi.ts
|
|
3
|
-
|
|
4
|
-
import { RecordBase } from "./resource-document";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Represents a resource object in a JSON:API 'included' array.
|
|
8
|
-
* The type is made "open" with an index signature to allow for additional properties.
|
|
9
|
-
*/
|
|
10
|
-
export interface IncludedResource extends RecordBase {
|
|
11
|
-
// 'id' is inherited from RecordBase
|
|
12
|
-
type: string;
|
|
13
|
-
meta: {
|
|
14
|
-
claims: Record<string, any>; // The worker will create always claims (even if empty)
|
|
15
|
-
[key: string]: any; // Make meta open
|
|
16
|
-
};
|
|
17
|
-
[key: string]: any; // Make the top-level resource open
|
|
18
|
-
}
|
|
19
|
-
|
package/src/models/jwt.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
// File: crypto-ts/models/jwt.ts
|
|
3
|
-
|
|
4
|
-
import { JwsDetachedSignParts } from "./jws";
|
|
5
|
-
|
|
6
|
-
export interface JwtCompactParts extends JwsDetachedSignParts {
|
|
7
|
-
payload: string,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface DataCompactJWT {
|
|
11
|
-
protected: object, // header protected by the signature (compact does not have unprotected header but JSON JWT does)
|
|
12
|
-
payload: object,
|
|
13
|
-
signature?: Uint8Array,
|
|
14
|
-
}
|
|
15
|
-
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
// File: crypto-ts/multibase58.ts
|
|
3
|
-
|
|
4
|
-
import baseX from "base-x";
|
|
5
|
-
|
|
6
|
-
const BASE58_BTC_ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
7
|
-
const base58btc = baseX(BASE58_BTC_ALPHABET);
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Encode bytes into multibase base58btc string (prefixed with 'z').
|
|
11
|
-
* Equivalent to multiformats base58btc.encode.
|
|
12
|
-
*/
|
|
13
|
-
export function encodeMultibase58btc(data: Uint8Array): string {
|
|
14
|
-
return "z" + base58btc.encode(Buffer.from(data));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Decode a multibase base58btc string (must start with 'z').
|
|
19
|
-
* Equivalent to multiformats base58btc.decode.
|
|
20
|
-
*/
|
|
21
|
-
export function decodeMultibase58btc(multibaseStr: string): Uint8Array {
|
|
22
|
-
if (!multibaseStr.startsWith("z")) {
|
|
23
|
-
throw new Error("Invalid multibase58btc string: missing 'z' prefix");
|
|
24
|
-
}
|
|
25
|
-
return new Uint8Array(base58btc.decode(multibaseStr.slice(1)));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// HEX ➜ multibase base58btc (quita guiones si los hay)
|
|
29
|
-
export function encodeHexToMultibase58btc(hexStr: string): string {
|
|
30
|
-
const hexClean = hexStr.replace(/-/g, "").toLowerCase();
|
|
31
|
-
if (!/^[0-9a-f]{32}$/i.test(hexClean)) throw new Error("Invalid 16-byte hex string");
|
|
32
|
-
const bytes = new Uint8Array(hexClean.match(/.{1,2}/g)!.map(b => parseInt(b, 16)));
|
|
33
|
-
return encodeMultibase58btc(bytes);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// multibase base58btc ➜ hex (no hyppens)
|
|
37
|
-
export function decodeMultibase58btcToHex(b58str: string): string {
|
|
38
|
-
const bytes = decodeMultibase58btc(b58str);
|
|
39
|
-
return Array.from(bytes).map(b => b.toString(16).padStart(2, "0")).join("");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// multibase base58btc ➜ UUID (with hyppens)
|
|
43
|
-
export function decodeMultibase58btcToUUID(b58str: string): string {
|
|
44
|
-
const hex = decodeMultibase58btcToHex(b58str);
|
|
45
|
-
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
46
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Copyright 2025 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
-
// File: crypto-ts/models/oidc4ida.common.model.ts
|
|
3
|
-
|
|
4
|
-
/** Digest object represents a cryptographic hash of some bytes (e.g.: the content of a document).
|
|
5
|
-
* It has 'alg' and 'value' (Base64 encoded, not hexadecimal such as in W3C format).
|
|
6
|
-
*/
|
|
7
|
-
export interface DigestResultOpenIdData {
|
|
8
|
-
alg: string; // REQUIRED. Specifies the algorithm used for the calculation of the cryptographic hash. The algorithm has been negotiated previously between RP and OP during Client Registration or Management.
|
|
9
|
-
value: string; // REQUIRED. Base64 encoded representation of the cryptographic hash.
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** Attachment OpenID
|
|
13
|
-
* The "digest" is REQUIRED: digest.alg and digest.value (Base64 encoded, not Base64Url).
|
|
14
|
-
* The "url" is REQUIRED to be "urn:uuid:<uuidv4>" for the resource/record (same as the FHIR "fullUrl" property with urn:uuid:<uuidv4>).
|
|
15
|
-
*/
|
|
16
|
-
export interface AttachmentExternalDLT {
|
|
17
|
-
digest: DigestResultOpenIdData; // REQUIRED. JSON object representing a cryptographic hash of the document content.
|
|
18
|
-
url?: string; // URI where the content can be recovered (NOTE: do not store on blockchain personal identifiers, just the URN with the UUID of the record/resoruce)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** CheckDetails is a JSON array representing the checks done in relation to the evidence.
|
|
22
|
-
* The "check_method" is REQUIRED (see https://bitbucket.org/openid/ekyc-ida/wiki/identifiers#check_methods):
|
|
23
|
-
* - check_method: REQUIRED. String representing the check done, this includes processes such as checking the authenticity of the document, or verifying the user's biometric against an identity document (e.g.: vcrypt, vdig, vpip, vpvp...)
|
|
24
|
-
* - organization: OPTIONAL. String denoting the legal entity that performed the check. This SHOULD be included if the OP did not perform the check itself.
|
|
25
|
-
* - txn: OPTIONAL. Identifier referring to the identity verification transaction. The OP MUST ensure that this is present when evidence_ref element is used. The OP MUST ensure that the transaction identifier can be resolved into transaction details during an audit.
|
|
26
|
-
* - time: OPTIONAL. Time stamp in ISO 8601 [ISO8601] YYYY-MM-DDThh:mm[:ss]TZD format representing the date when the check was completed.
|
|
27
|
-
*/
|
|
28
|
-
export interface CheckDetails {
|
|
29
|
-
check_method: string; // REQUIRED. String representing the check done, this includes processes such as checking the authenticity of the document, or verifying the user's biometric against an identity document. For information on predefined check_details values see Section 14.
|
|
30
|
-
organization?: string; // OPTIONAL. String (did:web or URN) denoting the legal entity that performed the check. This SHOULD be included if the OP did not perform the check itself.
|
|
31
|
-
txn?: string; // OPTIONAL. Identifier referring to the identity verification transaction. The OP MUST ensure that this is present when evidence_ref element is used. The OP MUST ensure that the transaction identifier can be resolved into transaction details during an audit.
|
|
32
|
-
time?: string; // OPTIONAL. Time stamp in ISO 8601 [ISO8601] YYYY-MM-DDThh:mm[:ss]TZD format representing the date when the check was completed.
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** 'organization' is the organization ID which performed the verification on behalf of the OP */
|
|
36
|
-
export interface VerifierDLT {
|
|
37
|
-
organization: string; // organization (did:web or URN) which performed the verification on behalf of the OP.
|
|
38
|
-
txn?: string; // evidence transaction ID (base58) for audit (added by SC)
|
|
39
|
-
}
|