antifraud-data-utils-ts 0.0.0-stage → 0.1.1

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 +52 -0
  2. package/LICENSE +13 -0
  3. package/README.md +155 -2
  4. package/dist/identity-assurance/claim-proofs.d.ts +62 -0
  5. package/dist/identity-assurance/claim-proofs.d.ts.map +1 -0
  6. package/dist/identity-assurance/claim-proofs.js +50 -0
  7. package/dist/identity-assurance/claim-proofs.js.map +1 -0
  8. package/dist/identity-assurance/converters.d.ts +10 -0
  9. package/dist/identity-assurance/converters.d.ts.map +1 -0
  10. package/dist/identity-assurance/converters.js +47 -0
  11. package/dist/identity-assurance/converters.js.map +1 -0
  12. package/dist/identity-assurance/credential-issuance.d.ts +41 -0
  13. package/dist/identity-assurance/credential-issuance.d.ts.map +1 -0
  14. package/dist/identity-assurance/credential-issuance.js +93 -0
  15. package/dist/identity-assurance/credential-issuance.js.map +1 -0
  16. package/dist/identity-assurance/identity-evidence.d.ts +124 -0
  17. package/dist/identity-assurance/identity-evidence.d.ts.map +1 -0
  18. package/dist/identity-assurance/identity-evidence.js +247 -0
  19. package/dist/identity-assurance/identity-evidence.js.map +1 -0
  20. package/dist/identity-assurance/index.d.ts +12 -0
  21. package/dist/identity-assurance/index.d.ts.map +1 -0
  22. package/dist/identity-assurance/index.js +12 -0
  23. package/dist/identity-assurance/index.js.map +1 -0
  24. package/dist/identity-assurance/professional-qualification.d.ts +150 -0
  25. package/dist/identity-assurance/professional-qualification.d.ts.map +1 -0
  26. package/dist/identity-assurance/professional-qualification.js +234 -0
  27. package/dist/identity-assurance/professional-qualification.js.map +1 -0
  28. package/dist/identity-assurance/schema-org-evidence.d.ts +30 -0
  29. package/dist/identity-assurance/schema-org-evidence.d.ts.map +1 -0
  30. package/dist/identity-assurance/schema-org-evidence.js +50 -0
  31. package/dist/identity-assurance/schema-org-evidence.js.map +1 -0
  32. package/dist/identity-assurance/schemas.d.ts +256 -0
  33. package/dist/identity-assurance/schemas.d.ts.map +1 -0
  34. package/dist/identity-assurance/schemas.js +163 -0
  35. package/dist/identity-assurance/schemas.js.map +1 -0
  36. package/dist/identity-assurance/tenant-trust.d.ts +29 -0
  37. package/dist/identity-assurance/tenant-trust.d.ts.map +1 -0
  38. package/dist/identity-assurance/tenant-trust.js +37 -0
  39. package/dist/identity-assurance/tenant-trust.js.map +1 -0
  40. package/dist/identity-assurance/types.d.ts +35 -0
  41. package/dist/identity-assurance/types.d.ts.map +1 -0
  42. package/dist/identity-assurance/types.js +2 -0
  43. package/dist/identity-assurance/types.js.map +1 -0
  44. package/dist/identity-assurance/vocabulary.d.ts +52 -0
  45. package/dist/identity-assurance/vocabulary.d.ts.map +1 -0
  46. package/dist/identity-assurance/vocabulary.js +48 -0
  47. package/dist/identity-assurance/vocabulary.js.map +1 -0
  48. package/dist/identity-assurance/workforce-assignment.d.ts +47 -0
  49. package/dist/identity-assurance/workforce-assignment.d.ts.map +1 -0
  50. package/dist/identity-assurance/workforce-assignment.js +52 -0
  51. package/dist/identity-assurance/workforce-assignment.js.map +1 -0
  52. package/dist/index.d.ts +2 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +2 -0
  55. package/dist/index.js.map +1 -0
  56. package/package.json +38 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,52 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## Unreleased
6
+
7
+ ## 0.1.1 - 2026-10-17
8
+
9
+ - Add the canonical credential-issuance request, lifecycle, receipt wire
10
+ conversion and synthetic fixture shared by SDK Core, SDK Node and ICA.
11
+ - Add a validated, product-neutral flat-claim projection for subject identity,
12
+ subject relationships and age-over evidence targets.
13
+ - Publish the canonical flat-claim name that binds an evidence target to its
14
+ verification check, so consumers do not invent product-local claim names.
15
+
16
+ ### Added
17
+
18
+ - Product-neutral identity verification and attestation capabilities.
19
+ - Governed Schema.org-to-OpenID identity claim mappings.
20
+ - Conflict-safe conversion between flat claims and OIDC4IDA verified claims.
21
+ - JSON Schema 2020-12 contract for verified claims and evidence.
22
+ - Normative identity verification and attestation contract.
23
+ - Claim-to-proof bindings with multiple proof references and privacy-preserving
24
+ age-over predicates.
25
+ - Controller-governed workforce evidence statements requiring an authenticated
26
+ assignment, active group membership, reusable group authorization and exact
27
+ capability, without employee-specific Consent.
28
+ - Non-authorizing invitation proposals for optional department and groups, plus
29
+ Communication-required assignment-change notices.
30
+ - Employer attestations for employee identity and qualifications, organization
31
+ resolution by legal identifier and jurisdiction, and multiple issuer proofs
32
+ for one claim.
33
+ - Form-ready JSON Schema that excludes raw evidence documents and marks
34
+ server-derived actor and authorization fields read-only.
35
+ - Home-tenant-first Clearing House selection with explicit federation trust
36
+ for employer and index-provider sources.
37
+ - Explicit separation between EUDI PID data elements and OpenID Identity
38
+ Assurance claim names.
39
+ - Neutral professional-qualification contracts using Schema.org flat claims,
40
+ independent employer, issuer and professional-body proofs, derived trust
41
+ badges and privacy-minimized ledger anchors.
42
+ - Document the DC4EU education and medical credential catalogue, including
43
+ EUHED, Doctor ID, professional suitability, medical training, authority
44
+ separation and draft-schema interoperability risks.
45
+ - Extend digest-bound OpenID Identity Assurance attachment references with
46
+ negotiated SHA3-384 and validated CIDv1 raw multibase identifiers.
47
+ - Add product-neutral subject, relationship and configurable age-over evidence
48
+ targets while reserving `age_over_18` as the EUDI PID projection.
49
+ - Add canonical Schema.org `MediaObject` flat claims and projection for
50
+ protected evidence artifacts identified by CIDv1(raw, SHA3-384).
51
+ - Document the education administrative-assistant journey and its real local
52
+ user-interface acceptance requirements.
package/LICENSE ADDED
@@ -0,0 +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.
package/README.md CHANGED
@@ -1,3 +1,156 @@
1
- # Temporary Holding Version
1
+ # Antifraud Data Utilities
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Product-neutral TypeScript contracts for identity verification, evidence and
4
+ attestations.
5
+
6
+ The central trust rule is provenance without authority substitution: every
7
+ identity or qualification claim keeps who asserted it, under which authority
8
+ and jurisdiction, from which evidence, at what time, with which proof and
9
+ current status. Employer, university, licensing authority, verifier and subject
10
+ are separate actors even when they support the same claim.
11
+
12
+ The package keeps three concerns separate:
13
+
14
+ 1. Canonical business data uses governed Schema.org flat claims.
15
+ 2. OpenID Identity Assurance `verified_claims` is an exchange projection.
16
+ 3. An attestation records that an authorized actor assessed a subject, claim
17
+ or relationship; it never silently rewrites the assessed source data.
18
+
19
+ ## Current API
20
+
21
+ ```ts
22
+ import {
23
+ ClearingHouseTenantCapability,
24
+ ClaimProofFormat,
25
+ EudiPidClaim,
26
+ IdentityAttestationCapability,
27
+ IdentityEvidenceType,
28
+ QualificationAuthorityKind,
29
+ QualificationVerificationStatus,
30
+ SchemaOrgIdentityClaim,
31
+ SchemaOrgQualificationClaim,
32
+ buildQualificationLedgerAnchor,
33
+ defineProfessionalQualification,
34
+ defineAuthorizedWorkforceIdentityEvidenceStatement,
35
+ defineClaimProofBinding,
36
+ importOidc4IdaToSchemaOrgFlatClaims,
37
+ projectSchemaOrgFlatClaimsToOidc4Ida,
38
+ selectAuthoritativeTenantEndpoint,
39
+ toSchemaOrgQualificationFlatClaims,
40
+ verifiedClaimsJsonSchema,
41
+ workforceIdentityEvidenceStatementJsonSchema,
42
+ } from 'antifraud-data-utils-ts/identity-assurance'
43
+ ```
44
+
45
+ `ClaimProofBinding` connects one canonical claim or derived predicate to one or
46
+ more credential-level proof references. For example, an `age-over` predicate
47
+ can disclose `age_over_18=true` without disclosing the source birth date. An
48
+ SD-JWT VC signs disclosure digests at credential level; the package does not
49
+ misrepresent that mechanism as an independent signature embedded in every
50
+ flat claim.
51
+
52
+ The initial governed projection covers the registered OpenID identity claims
53
+ that have direct Schema.org equivalents. An unknown mapping fails on export.
54
+ Import reports unsupported claims and conflicting existing values instead of
55
+ discarding or overwriting them.
56
+
57
+ An authorized workforce member may record identity evidence only when trusted
58
+ server context supplies the active employee assignment, active membership in a
59
+ controller-governed work group, that group's reusable authorization and
60
+ `identity.evidence.record`. The employee has no separate Consent. A subject or
61
+ lawful representative authorization remains a distinct optional gate when the
62
+ use case requires it. The form collects the evidence observation; it does not
63
+ select the actor, grant permission or sign a credential. Raw identity documents
64
+ are excluded from the statement. Attachments are referenced by digest.
65
+ Schema.org `MediaObject` flat claims describe a scanned artifact and bind its
66
+ protected URL, media type and size to a CIDv1(raw, SHA3-384) identifier encoded
67
+ with multibase base58btc. OpenID Identity Assurance attachment metadata is a
68
+ projection of that same artifact; it is not the canonical store.
69
+
70
+ A controller or authorized human-resources employee may use the same governed
71
+ flow to record evidence about an employee's identity or qualifications. When a
72
+ qualification refers to a university or another awarding organization, that
73
+ organization must be resolved by its legal identifier and jurisdiction, not by
74
+ display name alone. If no credential from the awarding organization exists,
75
+ the result is an employer attestation about evidence the employer reviewed; it
76
+ must not be represented as a university-issued credential. The employer's
77
+ signature is its own proof. A later university credential or confirmation is
78
+ added as a separate proof for the same claim instead of replacing the employer
79
+ proof.
80
+
81
+ This separation is essential in health and other regulated sectors. Evidence
82
+ of a qualification is not by itself an active professional licence, an active
83
+ employment assignment, or authority to perform an operation. A downstream
84
+ policy evaluates each applicable status independently and fails closed on
85
+ suspension, revocation, expiry, or an authority mismatch.
86
+
87
+ An invitation may propose an optional department and zero or more groups. The
88
+ proposal grants nothing before employee activation. Invitation acceptance and
89
+ later department or group changes require a Communication notice, while the
90
+ shared group authorization remains unchanged for the other active members.
91
+
92
+ The home tenant is the initial trust root. An employer or index-provider tenant
93
+ publishes its own authoritative endpoint. A different source tenant is usable
94
+ only after the home tenant explicitly trusts it and the source advertises the
95
+ required capability. The source tenant reads its stored record before issuing
96
+ an attestation; caller-authored claims are never signed as authoritative data.
97
+
98
+ Professional qualifications use product-neutral Schema.org
99
+ `EducationalOccupationalCredential` flat claims. Employer, awarding body and
100
+ professional-body proofs remain independent. The package does not expose a
101
+ health-specific model or a native FHIR projection. Health applications may
102
+ project this neutral contract to their FHIR version in their own data-utility
103
+ layer. `buildQualificationLedgerAnchor` deliberately excludes personal claims,
104
+ qualification values, legal identifiers, credentials, documents and
105
+ signatures; a shared ledger receives only opaque links, a content hash and
106
+ lifecycle metadata.
107
+
108
+ EUDI Person Identification Data and OpenID Identity Assurance are related but
109
+ different contracts. For example, EUDI PID defines `birth_date` and
110
+ `age_over_18`, while the OpenID `verified_claims.claims` projection uses the
111
+ registered `birthdate` claim. OpenID4VP presents credentials and OpenID4VCI
112
+ issues them; OpenID Identity Assurance describes verified claims and evidence.
113
+
114
+ ## Repository boundary
115
+
116
+ This package contains pure types, vocabulary, JSON Schemas, converters,
117
+ validators and synthetic fixtures. It contains no user interface, role policy,
118
+ HTTP client, persistence adapter, signing key, credential issuer, ledger
119
+ connection or deployment configuration.
120
+
121
+ See [Identity verification and attestation contract](docs/IDENTITY_VERIFICATION_AND_ATTESTATION.md)
122
+ for the normative model and downstream acceptance requirements.
123
+
124
+ See [DC4EU education and medical credential reference](docs/DC4EU_EDUCATION_AND_MEDICAL_CREDENTIALS.md)
125
+ for the upstream European Higher Education Diploma, Doctor ID, professional
126
+ suitability and medical-training credential boundaries and their current draft
127
+ status.
128
+
129
+ See [Education administrative assistant identity-evidence journey](docs/EDUCATION_ADMINISTRATIVE_ASSISTANT_IDENTITY_EVIDENCE.md)
130
+ for the controller-governed employee flow, age predicates and the local
131
+ user-interface acceptance boundary.
132
+
133
+ ## Standards
134
+
135
+ - [OpenID Identity Assurance Schema Definition 1.0](https://openid.net/specs/openid-ida-verified-claims-1_0-final.html)
136
+ - [OpenID Connect for Identity Assurance 1.0](https://openid.net/specs/openid-connect-4-identity-assurance-1_0-final.html)
137
+ - [Schema.org Person](https://schema.org/Person)
138
+ - [Schema.org Action](https://schema.org/Action)
139
+ - [Schema.org AssessAction](https://schema.org/AssessAction)
140
+ - [Schema.org EducationalOccupationalCredential](https://schema.org/EducationalOccupationalCredential)
141
+ - [DC4EU EUDI Wallet large-scale pilot](https://ec.europa.eu/digital-building-blocks/sites/spaces/EUDIGITALIDENTITYWALLET/pages/920064520/LSP-DC4EU)
142
+
143
+ ## Development
144
+
145
+ Node.js 24 is required.
146
+
147
+ ```bash
148
+ npm ci
149
+ npm test
150
+ npm run typecheck
151
+ npm pack --dry-run
152
+ ```
153
+
154
+ ## License
155
+
156
+ Apache-2.0.
@@ -0,0 +1,62 @@
1
+ import { SchemaOrgIdentityClaim, type SchemaOrgIdentityClaimValue } from './vocabulary.js';
2
+ export declare const ClaimProofFormat: Readonly<{
3
+ readonly IetfSdJwtVc: "ietf-sd-jwt-vc";
4
+ readonly IsoMdoc: "iso-18013-5-mdoc";
5
+ readonly W3cVcDataIntegrity: "w3c-vc-data-integrity";
6
+ readonly W3cVcJoseCose: "w3c-vc-jose-cose";
7
+ readonly OidcVerifiedClaims: "oidc-verified-claims";
8
+ readonly ExternalSignedEvidence: "external-signed-evidence";
9
+ }>;
10
+ export type ClaimProofFormatValue = typeof ClaimProofFormat[keyof typeof ClaimProofFormat];
11
+ export declare const ClaimCryptographicBinding: Readonly<{
12
+ readonly IssuerSignatureWithDisclosureDigests: "issuer-signature-with-disclosure-digests";
13
+ readonly IssuerSignedDataElement: "issuer-signed-data-element";
14
+ readonly CredentialProof: "credential-proof";
15
+ readonly ExternalVerificationResult: "external-verification-result";
16
+ readonly SignedEvidence: "signed-evidence";
17
+ }>;
18
+ export type ClaimCryptographicBindingValue = typeof ClaimCryptographicBinding[keyof typeof ClaimCryptographicBinding];
19
+ export declare const ClaimProofStatus: Readonly<{
20
+ readonly Active: "active";
21
+ readonly Suspended: "suspended";
22
+ readonly Revoked: "revoked";
23
+ readonly Expired: "expired";
24
+ }>;
25
+ export type ClaimProofStatusValue = typeof ClaimProofStatus[keyof typeof ClaimProofStatus];
26
+ export declare const IdentityPredicateKind: Readonly<{
27
+ readonly AgeOver: "age-over";
28
+ }>;
29
+ export type ClaimProofReference = Readonly<{
30
+ id: string;
31
+ format: ClaimProofFormatValue;
32
+ issuer: string;
33
+ credentialReference: string;
34
+ cryptographicBinding: ClaimCryptographicBindingValue;
35
+ status: ClaimProofStatusValue;
36
+ disclosureDigest?: string;
37
+ verificationMethod?: string;
38
+ issuedAt?: string;
39
+ expiresAt?: string;
40
+ }>;
41
+ export type DirectClaimProofTarget = Readonly<{
42
+ kind: 'claim';
43
+ claimPath: SchemaOrgIdentityClaimValue;
44
+ }>;
45
+ export type AgeOverPredicateProofTarget = Readonly<{
46
+ kind: 'predicate';
47
+ predicate: typeof IdentityPredicateKind.AgeOver;
48
+ sourceClaimPath: typeof SchemaOrgIdentityClaim.PersonBirthDate;
49
+ threshold: number;
50
+ result: boolean;
51
+ }>;
52
+ export type ClaimProofTarget = DirectClaimProofTarget | AgeOverPredicateProofTarget;
53
+ export type ClaimProofBinding = Readonly<{
54
+ target: ClaimProofTarget;
55
+ proofs: readonly [ClaimProofReference, ...ClaimProofReference[]];
56
+ }>;
57
+ export declare function eudiPidAgeOverClaimName(threshold: number): `age_over_${number}`;
58
+ export declare function defineClaimProofBinding(input: Readonly<{
59
+ target: ClaimProofTarget;
60
+ proofs: readonly ClaimProofReference[];
61
+ }>): ClaimProofBinding;
62
+ //# sourceMappingURL=claim-proofs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claim-proofs.d.ts","sourceRoot":"","sources":["../../src/identity-assurance/claim-proofs.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,sBAAsB,EACtB,KAAK,2BAA2B,EACjC,MAAM,iBAAiB,CAAA;AAExB,eA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M,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,2BAA2B,CAAA;AAEnF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,MAAM,EAAE,gBAAgB,CAAA;IACxB,MAAM,EAAE,SAAS,CAAC,mBAAmB,EAAE,GAAG,mBAAmB,EAAE,CAAC,CAAA;CACjE,CAAC,CAAA;AAQF,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,MAAM,EAAE,CAM/E;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,CAAC;IACtD,MAAM,EAAE,gBAAgB,CAAA;IACxB,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAA;CACvC,CAAC,GAAG,iBAAiB,CAWrB"}
@@ -0,0 +1,50 @@
1
+ import { EudiPidClaim, SchemaOrgIdentityClaim, } from './vocabulary.js';
2
+ export const ClaimProofFormat = Object.freeze({
3
+ IetfSdJwtVc: 'ietf-sd-jwt-vc',
4
+ IsoMdoc: 'iso-18013-5-mdoc',
5
+ W3cVcDataIntegrity: 'w3c-vc-data-integrity',
6
+ W3cVcJoseCose: 'w3c-vc-jose-cose',
7
+ OidcVerifiedClaims: 'oidc-verified-claims',
8
+ ExternalSignedEvidence: 'external-signed-evidence',
9
+ });
10
+ export const ClaimCryptographicBinding = Object.freeze({
11
+ IssuerSignatureWithDisclosureDigests: 'issuer-signature-with-disclosure-digests',
12
+ IssuerSignedDataElement: 'issuer-signed-data-element',
13
+ CredentialProof: 'credential-proof',
14
+ ExternalVerificationResult: 'external-verification-result',
15
+ SignedEvidence: 'signed-evidence',
16
+ });
17
+ export const ClaimProofStatus = Object.freeze({
18
+ Active: 'active',
19
+ Suspended: 'suspended',
20
+ Revoked: 'revoked',
21
+ Expired: 'expired',
22
+ });
23
+ export const IdentityPredicateKind = Object.freeze({
24
+ AgeOver: 'age-over',
25
+ });
26
+ function assertAgeThreshold(threshold) {
27
+ if (!Number.isInteger(threshold) || threshold < 1 || threshold > 150) {
28
+ throw new TypeError('Age-over threshold must be an integer between 1 and 150');
29
+ }
30
+ }
31
+ export function eudiPidAgeOverClaimName(threshold) {
32
+ assertAgeThreshold(threshold);
33
+ if (threshold !== 18) {
34
+ throw new TypeError('The EUDI PID profile only standardizes age_over_18');
35
+ }
36
+ return EudiPidClaim.AgeOver18;
37
+ }
38
+ export function defineClaimProofBinding(input) {
39
+ if (input.proofs.length === 0) {
40
+ throw new TypeError('A claim or predicate must have at least one proof');
41
+ }
42
+ if (input.target.kind === 'predicate') {
43
+ assertAgeThreshold(input.target.threshold);
44
+ }
45
+ return Object.freeze({
46
+ target: Object.freeze({ ...input.target }),
47
+ proofs: Object.freeze([...input.proofs]),
48
+ });
49
+ }
50
+ //# sourceMappingURL=claim-proofs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claim-proofs.js","sourceRoot":"","sources":["../../src/identity-assurance/claim-proofs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,sBAAsB,GAEvB,MAAM,iBAAiB,CAAA;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,kBAAkB;IAC3B,kBAAkB,EAAE,uBAAuB;IAC3C,aAAa,EAAE,kBAAkB;IACjC,kBAAkB,EAAE,sBAAsB;IAC1C,sBAAsB,EAAE,0BAA0B;CAC1C,CAAC,CAAA;AAKX,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC;IACrD,oCAAoC,EAAE,0CAA0C;IAChF,uBAAuB,EAAE,4BAA4B;IACrD,eAAe,EAAE,kBAAkB;IACnC,0BAA0B,EAAE,8BAA8B;IAC1D,cAAc,EAAE,iBAAiB;CACzB,CAAC,CAAA;AAKX,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;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aVerification, Oidc4IdaVerifiedClaims } from './types.js';
2
+ export declare function projectSchemaOrgFlatClaimsToOidc4Ida(input: Readonly<{
3
+ claims: FlatClaims;
4
+ verification: Oidc4IdaVerification;
5
+ }>): Oidc4IdaVerifiedClaims;
6
+ export declare function importOidc4IdaToSchemaOrgFlatClaims(input: Readonly<{
7
+ verifiedClaims: Oidc4IdaVerifiedClaims;
8
+ existingClaims?: FlatClaims;
9
+ }>): ImportedIdentityAssurance;
10
+ //# sourceMappingURL=converters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"converters.d.ts","sourceRoot":"","sources":["../../src/identity-assurance/converters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,yBAAyB,EAEzB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,YAAY,CAAA;AAenB,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,QAAQ,CAAC;IACnE,MAAM,EAAE,UAAU,CAAA;IAClB,YAAY,EAAE,oBAAoB,CAAA;CACnC,CAAC,GAAG,sBAAsB,CAa1B;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,QAAQ,CAAC;IAClE,cAAc,EAAE,sBAAsB,CAAA;IACtC,cAAc,CAAC,EAAE,UAAU,CAAA;CAC5B,CAAC,GAAG,yBAAyB,CA4B7B"}
@@ -0,0 +1,47 @@
1
+ import { SchemaOrgToOidcIdentityClaim, } from './vocabulary.js';
2
+ const OidcToSchemaOrgIdentityClaim = Object.freeze(Object.fromEntries(Object.entries(SchemaOrgToOidcIdentityClaim).map(([schemaOrgClaim, oidcClaim]) => [oidcClaim, schemaOrgClaim])));
3
+ function valuesEqual(left, right) {
4
+ return JSON.stringify(left) === JSON.stringify(right);
5
+ }
6
+ export function projectSchemaOrgFlatClaimsToOidc4Ida(input) {
7
+ const claims = {};
8
+ for (const [claim, value] of Object.entries(input.claims)) {
9
+ const oidcClaim = SchemaOrgToOidcIdentityClaim[claim];
10
+ if (!oidcClaim) {
11
+ throw new TypeError(`No governed OIDC4IDA mapping exists for Schema.org flat claim: ${claim}`);
12
+ }
13
+ claims[oidcClaim] = value;
14
+ }
15
+ return Object.freeze({
16
+ claims: Object.freeze(claims),
17
+ verification: input.verification,
18
+ });
19
+ }
20
+ export function importOidc4IdaToSchemaOrgFlatClaims(input) {
21
+ const existingClaims = input.existingClaims ?? {};
22
+ const claims = {};
23
+ const conflicts = [];
24
+ const unmappedClaims = [];
25
+ for (const [oidcClaim, importedValue] of Object.entries(input.verifiedClaims.claims)) {
26
+ const schemaOrgClaim = OidcToSchemaOrgIdentityClaim[oidcClaim];
27
+ if (!schemaOrgClaim) {
28
+ unmappedClaims.push(oidcClaim);
29
+ continue;
30
+ }
31
+ const existingValue = existingClaims[schemaOrgClaim];
32
+ if (existingValue !== undefined) {
33
+ if (!valuesEqual(existingValue, importedValue)) {
34
+ conflicts.push({ claim: schemaOrgClaim, existingValue, importedValue });
35
+ }
36
+ continue;
37
+ }
38
+ claims[schemaOrgClaim] = importedValue;
39
+ }
40
+ return Object.freeze({
41
+ claims: Object.freeze(claims),
42
+ verification: input.verifiedClaims.verification,
43
+ conflicts: Object.freeze(conflicts),
44
+ unmappedClaims: Object.freeze(unmappedClaims),
45
+ });
46
+ }
47
+ //# sourceMappingURL=converters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../src/identity-assurance/converters.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,4BAA4B,GAG7B,MAAM,iBAAiB,CAAA;AAExB,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CACnE,MAAM,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CACtC,CAAC,CAAA;AAE3E,SAAS,WAAW,CAAC,IAAe,EAAE,KAAgB;IACpD,OAAO,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D,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAChC,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,aAAa,CAAC,EAAE,CAAC;gBAC/C,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC,CAAA;YACzE,CAAC;YACD,SAAQ;QACV,CAAC;QACD,MAAM,CAAC,cAAc,CAAC,GAAG,aAAa,CAAA;IACxC,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;QAC7B,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY;QAC/C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;QACnC,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;KAC9C,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { type IdentityAttestationCapabilityValue } from './vocabulary.js';
2
+ export declare const CredentialIssuanceStatus: Readonly<{
3
+ readonly Pending: "pending";
4
+ readonly Issued: "issued";
5
+ readonly Denied: "denied";
6
+ readonly Failed: "failed";
7
+ }>;
8
+ export type CredentialIssuanceStatusValue = typeof CredentialIssuanceStatus[keyof typeof CredentialIssuanceStatus];
9
+ export type CredentialIssuanceRequest = Readonly<{
10
+ subjectReference: string;
11
+ capability: IdentityAttestationCapabilityValue;
12
+ verificationTransactionId: string;
13
+ }>;
14
+ export type CredentialIssuanceRequestWire = Readonly<{
15
+ subject_reference: string;
16
+ capability: IdentityAttestationCapabilityValue;
17
+ verification_transaction_id: string;
18
+ }>;
19
+ export type CredentialIssuanceReceipt = Readonly<{
20
+ issuanceId: string;
21
+ status: CredentialIssuanceStatusValue;
22
+ credential?: unknown;
23
+ credentialReference?: string;
24
+ reason?: string;
25
+ }>;
26
+ export type CredentialIssuanceReceiptWire = Readonly<{
27
+ issuance_id: string;
28
+ status: CredentialIssuanceStatusValue;
29
+ credential?: unknown;
30
+ credential_reference?: string;
31
+ reason?: string;
32
+ }>;
33
+ export declare function defineCredentialIssuanceRequest(input: CredentialIssuanceRequest & Record<string, unknown>): CredentialIssuanceRequest;
34
+ export declare function toCredentialIssuanceRequestWire(input: CredentialIssuanceRequest & Record<string, unknown>): CredentialIssuanceRequestWire;
35
+ export declare function parseCredentialIssuanceReceiptWire(value: unknown): CredentialIssuanceReceipt;
36
+ export declare const credentialIssuanceRequestFixture: Readonly<{
37
+ subjectReference: "urn:subject:synthetic";
38
+ capability: "identity.relationship.attest";
39
+ verificationTransactionId: "verification-synthetic-001";
40
+ }>;
41
+ //# sourceMappingURL=credential-issuance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-issuance.d.ts","sourceRoot":"","sources":["../../src/identity-assurance/credential-issuance.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,iBAAiB,CAAA;AAExB,eAAO,MAAM,wBAAwB;;;;;EAK1B,CAAA;AAEX,MAAM,MAAM,6BAA6B,GACvC,OAAO,wBAAwB,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAA;AAExE,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,kCAAkC,CAAA;IAC9C,yBAAyB,EAAE,MAAM,CAAA;CAClC,CAAC,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACnD,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,EAAE,kCAAkC,CAAA;IAC9C,2BAA2B,EAAE,MAAM,CAAA;CACpC,CAAC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,6BAA6B,CAAA;IACrC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACnD,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,6BAA6B,CAAA;IACrC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC,CAAA;AAkBF,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzD,yBAAyB,CAmB3B;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzD,6BAA6B,CAO/B;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,GACb,yBAAyB,CAgD3B;AAED,eAAO,MAAM,gCAAgC;;;;EAIP,CAAA"}
@@ -0,0 +1,93 @@
1
+ import { IdentityAttestationCapability, } from './vocabulary.js';
2
+ export const CredentialIssuanceStatus = Object.freeze({
3
+ Pending: 'pending',
4
+ Issued: 'issued',
5
+ Denied: 'denied',
6
+ Failed: 'failed',
7
+ });
8
+ function requireText(value, name) {
9
+ if (typeof value !== 'string' || value.trim().length === 0) {
10
+ throw new TypeError(`${name} must be a non-empty string`);
11
+ }
12
+ return value.trim();
13
+ }
14
+ function isCapability(value) {
15
+ return Object.values(IdentityAttestationCapability).includes(value);
16
+ }
17
+ function isStatus(value) {
18
+ return typeof value === 'string'
19
+ && Object.values(CredentialIssuanceStatus).includes(value);
20
+ }
21
+ export function defineCredentialIssuanceRequest(input) {
22
+ if ('claims' in input) {
23
+ throw new TypeError('Caller-supplied claims are not accepted; the provider must perform authoritative readback');
24
+ }
25
+ const subjectReference = requireText(input.subjectReference, 'subjectReference');
26
+ const capability = requireText(input.capability, 'capability');
27
+ if (!isCapability(capability)) {
28
+ throw new TypeError('capability must be a governed identity-attestation capability');
29
+ }
30
+ return Object.freeze({
31
+ subjectReference,
32
+ capability,
33
+ verificationTransactionId: requireText(input.verificationTransactionId, 'verificationTransactionId'),
34
+ });
35
+ }
36
+ export function toCredentialIssuanceRequestWire(input) {
37
+ const request = defineCredentialIssuanceRequest(input);
38
+ return Object.freeze({
39
+ subject_reference: request.subjectReference,
40
+ capability: request.capability,
41
+ verification_transaction_id: request.verificationTransactionId,
42
+ });
43
+ }
44
+ export function parseCredentialIssuanceReceiptWire(value) {
45
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
46
+ throw new TypeError('Invalid credential-provider response');
47
+ }
48
+ const input = value;
49
+ let issuanceId;
50
+ try {
51
+ issuanceId = requireText(input.issuance_id, 'issuance_id');
52
+ }
53
+ catch {
54
+ throw new TypeError('Invalid credential-provider response');
55
+ }
56
+ if (!isStatus(input.status)) {
57
+ throw new TypeError('Invalid credential-provider response');
58
+ }
59
+ const credentialReference = typeof input.credential_reference === 'string'
60
+ && input.credential_reference.trim().length > 0
61
+ ? input.credential_reference.trim()
62
+ : undefined;
63
+ const reason = typeof input.reason === 'string' && input.reason.trim().length > 0
64
+ ? input.reason.trim()
65
+ : undefined;
66
+ const hasCredential = Object.prototype.hasOwnProperty.call(input, 'credential');
67
+ if (input.status === CredentialIssuanceStatus.Issued && !hasCredential && !credentialReference) {
68
+ throw new TypeError('An issued credential receipt requires a credential or credential reference');
69
+ }
70
+ if ((input.status === CredentialIssuanceStatus.Denied
71
+ || input.status === CredentialIssuanceStatus.Failed)
72
+ && hasCredential) {
73
+ throw new TypeError(`${input.status} credential receipt must not include a credential`);
74
+ }
75
+ if ((input.status === CredentialIssuanceStatus.Denied
76
+ || input.status === CredentialIssuanceStatus.Failed)
77
+ && !reason) {
78
+ throw new TypeError(`${input.status} credential receipt requires a reason`);
79
+ }
80
+ return Object.freeze({
81
+ issuanceId,
82
+ status: input.status,
83
+ ...(hasCredential ? { credential: input.credential } : {}),
84
+ ...(credentialReference ? { credentialReference } : {}),
85
+ ...(reason ? { reason } : {}),
86
+ });
87
+ }
88
+ export const credentialIssuanceRequestFixture = Object.freeze({
89
+ subjectReference: 'urn:subject:synthetic',
90
+ capability: IdentityAttestationCapability.AttestRelationship,
91
+ verificationTransactionId: 'verification-synthetic-001',
92
+ });
93
+ //# sourceMappingURL=credential-issuance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-issuance.js","sourceRoot":"","sources":["../../src/identity-assurance/credential-issuance.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,GAE9B,MAAM,iBAAiB,CAAA;AAExB,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC;IACpD,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC,CAAA;AAiCX,SAAS,WAAW,CAAC,KAAc,EAAE,IAAY;IAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,SAAS,CAAC,GAAG,IAAI,6BAA6B,CAAC,CAAA;IAC3D,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,EAAE,CAAA;AACrB,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,OAAQ,MAAM,CAAC,MAAM,CAAC,6BAA6B,CAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC5F,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ;WAC1B,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AACrF,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,KAA0D;IAE1D,IAAI,QAAQ,IAAI,KAAK,EAA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