antifraud-data-utils-ts 0.1.10 → 0.2.0

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +187 -134
  2. package/LICENSE +13 -13
  3. package/README.md +257 -243
  4. package/dist/cryptography/index.d.ts +1 -0
  5. package/dist/cryptography/index.d.ts.map +1 -1
  6. package/dist/cryptography/index.js +1 -0
  7. package/dist/cryptography/index.js.map +1 -1
  8. package/dist/cryptography/numeric-qr.d.ts +4 -0
  9. package/dist/cryptography/numeric-qr.d.ts.map +1 -0
  10. package/dist/cryptography/numeric-qr.js +22 -0
  11. package/dist/cryptography/numeric-qr.js.map +1 -0
  12. package/dist/cryptography/post-quantum-detached-qr.d.ts +14 -0
  13. package/dist/cryptography/post-quantum-detached-qr.d.ts.map +1 -0
  14. package/dist/cryptography/post-quantum-detached-qr.js +76 -0
  15. package/dist/cryptography/post-quantum-detached-qr.js.map +1 -0
  16. package/dist/encoding/base58btc.d.ts +3 -0
  17. package/dist/encoding/base58btc.d.ts.map +1 -0
  18. package/dist/encoding/base58btc.js +19 -0
  19. package/dist/encoding/base58btc.js.map +1 -0
  20. package/dist/identity-assurance/antifraud-data-card.d.ts +42 -0
  21. package/dist/identity-assurance/antifraud-data-card.d.ts.map +1 -0
  22. package/dist/identity-assurance/antifraud-data-card.js +120 -0
  23. package/dist/identity-assurance/antifraud-data-card.js.map +1 -0
  24. package/dist/identity-assurance/didcomm-binary-attachment.d.ts.map +1 -1
  25. package/dist/identity-assurance/didcomm-binary-attachment.js +1 -18
  26. package/dist/identity-assurance/didcomm-binary-attachment.js.map +1 -1
  27. package/dist/identity-assurance/identity-evidence.d.ts.map +1 -1
  28. package/dist/identity-assurance/identity-evidence.js +1 -16
  29. package/dist/identity-assurance/identity-evidence.js.map +1 -1
  30. package/dist/identity-assurance/index.d.ts +1 -0
  31. package/dist/identity-assurance/index.d.ts.map +1 -1
  32. package/dist/identity-assurance/index.js +1 -0
  33. package/dist/identity-assurance/index.js.map +1 -1
  34. package/dist/index.d.ts +3 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +3 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/organization-credentials.d.ts +75 -0
  39. package/dist/organization-credentials.d.ts.map +1 -0
  40. package/dist/organization-credentials.js +162 -0
  41. package/dist/organization-credentials.js.map +1 -0
  42. package/dist/organization-identity.d.ts +21 -0
  43. package/dist/organization-identity.d.ts.map +1 -0
  44. package/dist/organization-identity.js +47 -0
  45. package/dist/organization-identity.js.map +1 -0
  46. package/dist/service-conversation.d.ts +40 -0
  47. package/dist/service-conversation.d.ts.map +1 -0
  48. package/dist/service-conversation.js +58 -0
  49. package/dist/service-conversation.js.map +1 -0
  50. package/docs/ANTIFRAUD_DATA_CARD_V1.md +47 -0
  51. package/docs/DC4EU_EDUCATION_AND_MEDICAL_CREDENTIALS.md +93 -0
  52. package/docs/DIDCOMM_SCHEMA_ORG_ATTACHMENTS.md +73 -0
  53. package/docs/EDUCATION_ADMINISTRATIVE_ASSISTANT_IDENTITY_EVIDENCE.md +90 -0
  54. package/docs/IDENTITY_VERIFICATION_AND_ATTESTATION.md +354 -0
  55. package/docs/ORGANIZATION_CONTACT_IDENTITY.md +113 -0
  56. package/package.json +69 -55
package/CHANGELOG.md CHANGED
@@ -1,134 +1,187 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## Unreleased
6
-
7
- ## 0.1.10 - 2026-10-21
8
-
9
- - Add the Schema.org-first public organization service catalog: explicit
10
- Organization, department, Place and Service publication; flat claims; a DCAT
11
- discovery descriptor; and fail-closed cache refresh, withdrawal and rollback
12
- decisions. FHIR projection and scheduling remain outside this contract.
13
-
14
- ## 0.1.9 - 2026-10-19
15
-
16
- - Add the governed qualification-classification reference so portals and BFFs
17
- preserve canonical system, version, concept URI and code independently from
18
- localized presentation labels.
19
-
20
- ## 0.1.8 - 2026-10-18
21
-
22
- - Add the canonical synthetic social-publication manifest digest and Demo
23
- record. Public content must reproduce the signed SHA3-384 manifest, the
24
- managed-wallet proof must already be verified with ML-DSA-65, and the
25
- receipt remains explicitly bound to the simulated in-memory Fabric adapter.
26
- - Add the browser-neutral CIDv1 raw SHA3-384 builder for an already-computed
27
- 48-byte evidence digest so BFFs and services do not duplicate multicodec or
28
- base58btc construction.
29
-
30
- ## 0.1.7 - 2026-10-18
31
-
32
- - Add the canonical verified managed-signature proof projection. Manifest,
33
- operation, signer, relying party, purpose, algorithm and verification method
34
- are copied from the immutable request rather than accepted from wallet output.
35
- - Reject unverified, malformed, out-of-lifetime or authority-overriding proof
36
- material and harden the ciphertext-tampering test so it always changes a
37
- decoded byte rather than optional base64 padding bits.
38
-
39
- ## 0.1.6 - 2026-10-18
40
-
41
- - Add the canonical managed-signature request state, local user-presence method,
42
- ML-DSA-65 actor-signing key and immutable manifest-binding contracts.
43
- - Build pending requests from a browser-controlled manifest draft and separate
44
- trusted backend context for user, registered device, relying party, purpose,
45
- signer and verification method; reject browser-authored authority.
46
- - Export one reusable synthetic signing-request fixture for SDK, gateway and
47
- portal journey tests.
48
-
49
- ## 0.1.5 - 2026-10-18
50
-
51
- - Migrate the reviewed stateless `gdc-common-utils-ts` cryptography profile so
52
- Antifraud SDKs can share ML-KEM-768 key generation, random AES-256-GCM
53
- content keys, HKDF-derived per-recipient key encryption keys and the
54
- `gdc-mlkem-cek-wrap-v1` JWE envelope without duplicating algorithms.
55
- - Export ML-DSA-44/65/87 byte and JWS signing/verification primitives while
56
- leaving all private-key custody, persistence and user-presence authorization
57
- to the calling managed wallet or KMS.
58
- - Prove bidirectional JWE compatibility with `gdc-common-utils-ts@2.9.30`, PDF
59
- byte confidentiality, authenticated tamper rejection and ML-DSA-65 changed-
60
- payload rejection.
61
-
62
- ## 0.1.4 - 2026-10-18
63
-
64
- - Add product-neutral DIDComm binary-attachment contracts for inline base64 and
65
- protected `links + multihash` delivery without changing the canonical
66
- Schema.org `DigitalDocument`/`MediaObject` business graph.
67
- - Prove exact byte round-trip for a minimal synthetic PDF and reject empty or
68
- incomplete attachments. No FHIR `DocumentReference` is introduced.
69
-
70
- ## 0.1.3 - 2026-10-17
71
-
72
- - Export one product-neutral confidential-document fixture so gateways, SDKs
73
- and portals reuse the same valid CIDv1 raw SHA3-384 attachment instead of
74
- duplicating governed wire examples.
75
-
76
- ## 0.1.2 - 2026-10-17
77
-
78
- - Add the canonical strict JSON:API graph for Schema.org `DigitalDocument`
79
- manifests, component documents and their encoded `MediaObject` resources.
80
- - Require complete CIDv1 raw SHA3-384 content identifiers under
81
- `PropertyValue.propertyID` and `value`, with digest matching, unique resource
82
- identifiers and no embedded document bytes.
83
- - Normalize the historical `identifier.additionalType` input convention while
84
- emitting only canonical `identifier.propertyID`, and reject conflicting
85
- legacy and canonical profiles.
86
- - Export reusable CID-to-digest validation for downstream confidential-document
87
- boundaries.
88
-
89
- ## 0.1.1 - 2026-10-17
90
-
91
- - Add the canonical credential-issuance request, lifecycle, receipt wire
92
- conversion and synthetic fixture shared by SDK Core, SDK Node and ICA.
93
- - Add a validated, product-neutral flat-claim projection for subject identity,
94
- subject relationships and age-over evidence targets.
95
- - Publish the canonical flat-claim name that binds an evidence target to its
96
- verification check, so consumers do not invent product-local claim names.
97
-
98
- ### Added
99
-
100
- - Product-neutral identity verification and attestation capabilities.
101
- - Governed Schema.org-to-OpenID identity claim mappings.
102
- - Conflict-safe conversion between flat claims and OIDC4IDA verified claims.
103
- - JSON Schema 2020-12 contract for verified claims and evidence.
104
- - Normative identity verification and attestation contract.
105
- - Claim-to-proof bindings with multiple proof references and privacy-preserving
106
- age-over predicates.
107
- - Controller-governed workforce evidence statements requiring an authenticated
108
- assignment, active group membership, reusable group authorization and exact
109
- capability, without employee-specific Consent.
110
- - Non-authorizing invitation proposals for optional department and groups, plus
111
- Communication-required assignment-change notices.
112
- - Employer attestations for employee identity and qualifications, organization
113
- resolution by legal identifier and jurisdiction, and multiple issuer proofs
114
- for one claim.
115
- - Form-ready JSON Schema that excludes raw evidence documents and marks
116
- server-derived actor and authorization fields read-only.
117
- - Home-tenant-first Clearing House selection with explicit federation trust
118
- for employer and index-provider sources.
119
- - Explicit separation between EUDI PID data elements and OpenID Identity
120
- Assurance claim names.
121
- - Neutral professional-qualification contracts using Schema.org flat claims,
122
- independent employer, issuer and professional-body proofs, derived trust
123
- badges and privacy-minimized ledger anchors.
124
- - Document the DC4EU education and medical credential catalogue, including
125
- EUHED, Doctor ID, professional suitability, medical training, authority
126
- separation and draft-schema interoperability risks.
127
- - Extend digest-bound OpenID Identity Assurance attachment references with
128
- negotiated SHA3-384 and validated CIDv1 raw multibase identifiers.
129
- - Add product-neutral subject, relationship and configurable age-over evidence
130
- targets while reserving `age_over_18` as the EUDI PID projection.
131
- - Add canonical Schema.org `MediaObject` flat claims and projection for
132
- protected evidence artifacts identified by CIDv1(raw, SHA3-384).
133
- - Document the education administrative-assistant journey and its real local
134
- user-interface acceptance requirements.
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## Unreleased
6
+
7
+ ## 0.2.0 - 2026-11-08
8
+
9
+ - Group the additive contact identity and reviewed organization credential
10
+ APIs in one minor release. Source validation passes all 75 serial package
11
+ tests and the consuming Node SDK's 67 tests with real-format employee UUID
12
+ fixtures. These checks do not establish completed portal/gateway lifecycle
13
+ acceptance; registry publication is verified separately.
14
+
15
+ - Add contact-aware reviewed organization admission/domain credential drafts
16
+ and the existing proof-free canonicalization contract. Preserve normalized
17
+ email JSON/signing payloads while projecting a phone controller as telephone
18
+ and retaining stable actor hashes for both parties. Ambiguous contacts fail;
19
+ occupation and controller authority values come from the caller's governed
20
+ policy. Draft construction does not verify a signature, approve admission,
21
+ call ICA or complete gateway/SDK phone enrollment.
22
+ - Reviewed credential validation on Node 26.13.0: 9 focused cases, all 75
23
+ package cases without skips and typechecking pass. Email admission/domain
24
+ JSON and proof-free payload bytes match the published predecessor; fully
25
+ phone-only and independently selected party contacts remain distinct.
26
+
27
+ - Add the product-neutral `organization-identity` entry point for explicit
28
+ email/phone contact normalization, the existing SHA3-256 stable actor URN
29
+ and the existing organization employee DID with a separate role/device.
30
+ Preserve normalized email identity bytes and the established phone actor
31
+ representation; reject malformed or wrong-channel contacts. These data
32
+ operations grant no account, organization, employee or licence authority.
33
+ - Port the compatibility algorithm without a runtime dependency on frozen
34
+ common utilities; the published predecessor is a development-only test
35
+ oracle. Reuse one internal base58btc encoder for actor hashes, evidence
36
+ CIDs and DIDComm attachments. Complete phone-only admission/enrollment
37
+ remains a separate consumer and gateway migration.
38
+ - Keep test files serial by default. On Node 26.13.0, the focused identity and
39
+ evidence/attachment cases pass (22 tests), the complete package suite passes
40
+ (66 tests, no skips), and typechecking passes. The subsequent cumulative
41
+ credential/identity matrix passes 75 tests without skips.
42
+
43
+ ## 0.1.11 - 2026-11-06
44
+
45
+ - Clean generated output before every build so renamed ADC modules cannot ship
46
+ stale Smart Data Card artifacts.
47
+
48
+ - Add the neutral organization/service conversation event emitted after an
49
+ authorized EHR, CMS or other authoritative service updates a subject index.
50
+ The event carries governed HTTPS references only; it grants no access and
51
+ does not copy authoritative data into the index or UI.
52
+ - Extract the domain-neutral `pqc:/` transport for RFC 7797 detached ML-DSA
53
+ proofs, including deterministic numeric multi-QR encoding. The external
54
+ signed payload remains separate and may be a health credential or an
55
+ Antifraud JSON:API/Schema.org credential.
56
+ - Add the versioned non-health Antifraud Data Card profile and `afdc:/` transport.
57
+ Its VC subject is one canonical JSON:API primary document with Schema.org
58
+ resources; it never uses or masquerades as the SHC `fhirBundle` profile.
59
+
60
+ ## 0.1.10 - 2026-10-21
61
+
62
+ - Add the Schema.org-first public organization service catalog: explicit
63
+ Organization, department, Place and Service publication; flat claims; a DCAT
64
+ discovery descriptor; and fail-closed cache refresh, withdrawal and rollback
65
+ decisions. FHIR projection and scheduling remain outside this contract.
66
+
67
+ ## 0.1.9 - 2026-10-19
68
+
69
+ - Add the governed qualification-classification reference so portals and BFFs
70
+ preserve canonical system, version, concept URI and code independently from
71
+ localized presentation labels.
72
+
73
+ ## 0.1.8 - 2026-10-18
74
+
75
+ - Add the canonical synthetic social-publication manifest digest and Demo
76
+ record. Public content must reproduce the signed SHA3-384 manifest, the
77
+ managed-wallet proof must already be verified with ML-DSA-65, and the
78
+ receipt remains explicitly bound to the simulated in-memory Fabric adapter.
79
+ - Add the browser-neutral CIDv1 raw SHA3-384 builder for an already-computed
80
+ 48-byte evidence digest so BFFs and services do not duplicate multicodec or
81
+ base58btc construction.
82
+
83
+ ## 0.1.7 - 2026-10-18
84
+
85
+ - Add the canonical verified managed-signature proof projection. Manifest,
86
+ operation, signer, relying party, purpose, algorithm and verification method
87
+ are copied from the immutable request rather than accepted from wallet output.
88
+ - Reject unverified, malformed, out-of-lifetime or authority-overriding proof
89
+ material and harden the ciphertext-tampering test so it always changes a
90
+ decoded byte rather than optional base64 padding bits.
91
+
92
+ ## 0.1.6 - 2026-10-18
93
+
94
+ - Add the canonical managed-signature request state, local user-presence method,
95
+ ML-DSA-65 actor-signing key and immutable manifest-binding contracts.
96
+ - Build pending requests from a browser-controlled manifest draft and separate
97
+ trusted backend context for user, registered device, relying party, purpose,
98
+ signer and verification method; reject browser-authored authority.
99
+ - Export one reusable synthetic signing-request fixture for SDK, gateway and
100
+ portal journey tests.
101
+
102
+ ## 0.1.5 - 2026-10-18
103
+
104
+ - Migrate the reviewed stateless `gdc-common-utils-ts` cryptography profile so
105
+ Antifraud SDKs can share ML-KEM-768 key generation, random AES-256-GCM
106
+ content keys, HKDF-derived per-recipient key encryption keys and the
107
+ `gdc-mlkem-cek-wrap-v1` JWE envelope without duplicating algorithms.
108
+ - Export ML-DSA-44/65/87 byte and JWS signing/verification primitives while
109
+ leaving all private-key custody, persistence and user-presence authorization
110
+ to the calling managed wallet or KMS.
111
+ - Prove bidirectional JWE compatibility with `gdc-common-utils-ts@2.9.30`, PDF
112
+ byte confidentiality, authenticated tamper rejection and ML-DSA-65 changed-
113
+ payload rejection.
114
+
115
+ ## 0.1.4 - 2026-10-18
116
+
117
+ - Add product-neutral DIDComm binary-attachment contracts for inline base64 and
118
+ protected `links + multihash` delivery without changing the canonical
119
+ Schema.org `DigitalDocument`/`MediaObject` business graph.
120
+ - Prove exact byte round-trip for a minimal synthetic PDF and reject empty or
121
+ incomplete attachments. No FHIR `DocumentReference` is introduced.
122
+
123
+ ## 0.1.3 - 2026-10-17
124
+
125
+ - Export one product-neutral confidential-document fixture so gateways, SDKs
126
+ and portals reuse the same valid CIDv1 raw SHA3-384 attachment instead of
127
+ duplicating governed wire examples.
128
+
129
+ ## 0.1.2 - 2026-10-17
130
+
131
+ - Add the canonical strict JSON:API graph for Schema.org `DigitalDocument`
132
+ manifests, component documents and their encoded `MediaObject` resources.
133
+ - Require complete CIDv1 raw SHA3-384 content identifiers under
134
+ `PropertyValue.propertyID` and `value`, with digest matching, unique resource
135
+ identifiers and no embedded document bytes.
136
+ - Normalize the historical `identifier.additionalType` input convention while
137
+ emitting only canonical `identifier.propertyID`, and reject conflicting
138
+ legacy and canonical profiles.
139
+ - Export reusable CID-to-digest validation for downstream confidential-document
140
+ boundaries.
141
+
142
+ ## 0.1.1 - 2026-10-17
143
+
144
+ - Add the canonical credential-issuance request, lifecycle, receipt wire
145
+ conversion and synthetic fixture shared by SDK Core, SDK Node and ICA.
146
+ - Add a validated, product-neutral flat-claim projection for subject identity,
147
+ subject relationships and age-over evidence targets.
148
+ - Publish the canonical flat-claim name that binds an evidence target to its
149
+ verification check, so consumers do not invent product-local claim names.
150
+
151
+ ### Added
152
+
153
+ - Product-neutral identity verification and attestation capabilities.
154
+ - Governed Schema.org-to-OpenID identity claim mappings.
155
+ - Conflict-safe conversion between flat claims and OIDC4IDA verified claims.
156
+ - JSON Schema 2020-12 contract for verified claims and evidence.
157
+ - Normative identity verification and attestation contract.
158
+ - Claim-to-proof bindings with multiple proof references and privacy-preserving
159
+ age-over predicates.
160
+ - Controller-governed workforce evidence statements requiring an authenticated
161
+ assignment, active group membership, reusable group authorization and exact
162
+ capability, without employee-specific Consent.
163
+ - Non-authorizing invitation proposals for optional department and groups, plus
164
+ Communication-required assignment-change notices.
165
+ - Employer attestations for employee identity and qualifications, organization
166
+ resolution by legal identifier and jurisdiction, and multiple issuer proofs
167
+ for one claim.
168
+ - Form-ready JSON Schema that excludes raw evidence documents and marks
169
+ server-derived actor and authorization fields read-only.
170
+ - Home-tenant-first Clearing House selection with explicit federation trust
171
+ for employer and index-provider sources.
172
+ - Explicit separation between EUDI PID data elements and OpenID Identity
173
+ Assurance claim names.
174
+ - Neutral professional-qualification contracts using Schema.org flat claims,
175
+ independent employer, issuer and professional-body proofs, derived trust
176
+ badges and privacy-minimized ledger anchors.
177
+ - Document the DC4EU education and medical credential catalogue, including
178
+ EUHED, Doctor ID, professional suitability, medical training, authority
179
+ separation and draft-schema interoperability risks.
180
+ - Extend digest-bound OpenID Identity Assurance attachment references with
181
+ negotiated SHA3-384 and validated CIDv1 raw multibase identifiers.
182
+ - Add product-neutral subject, relationship and configurable age-over evidence
183
+ targets while reserving `age_over_18` as the EUDI PID projection.
184
+ - Add canonical Schema.org `MediaObject` flat claims and projection for
185
+ protected evidence artifacts identified by CIDv1(raw, SHA3-384).
186
+ - Document the education administrative-assistant journey and its real local
187
+ user-interface acceptance requirements.
package/LICENSE CHANGED
@@ -1,13 +1,13 @@
1
- Copyright 2026 Antifraud Services Inc.
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
1
+ Copyright 2026 Antifraud Services Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.