antifraud-data-utils-ts 0.2.0 → 0.3.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.
- package/CHANGELOG.md +74 -0
- package/README.md +15 -0
- package/dist/actor-kinds.d.ts +13 -0
- package/dist/actor-kinds.d.ts.map +1 -0
- package/dist/actor-kinds.js +15 -0
- package/dist/actor-kinds.js.map +1 -0
- package/dist/credential-contracts.d.ts +58 -0
- package/dist/credential-contracts.d.ts.map +1 -0
- package/dist/credential-contracts.js +10 -0
- package/dist/credential-contracts.js.map +1 -0
- package/dist/credential-decoding.d.ts +11 -0
- package/dist/credential-decoding.d.ts.map +1 -0
- package/dist/credential-decoding.js +84 -0
- package/dist/credential-decoding.js.map +1 -0
- package/dist/cryptography/cryptography-contract.d.ts +39 -0
- package/dist/cryptography/cryptography-contract.d.ts.map +1 -0
- package/dist/cryptography/cryptography-contract.js +2 -0
- package/dist/cryptography/cryptography-contract.js.map +1 -0
- package/dist/cryptography/cryptography-service.d.ts +2 -1
- package/dist/cryptography/cryptography-service.d.ts.map +1 -1
- package/dist/cryptography/cryptography-service.js.map +1 -1
- package/dist/cryptography/index.d.ts +2 -0
- package/dist/cryptography/index.d.ts.map +1 -1
- package/dist/cryptography/index.js +2 -0
- package/dist/cryptography/index.js.map +1 -1
- package/dist/cryptography/jws-types.d.ts +20 -0
- package/dist/cryptography/jws-types.d.ts.map +1 -0
- package/dist/cryptography/jws-types.js +2 -0
- package/dist/cryptography/jws-types.js.map +1 -0
- package/dist/cryptography/types.d.ts +36 -0
- package/dist/cryptography/types.d.ts.map +1 -1
- package/dist/did-document.d.ts +35 -0
- package/dist/did-document.d.ts.map +1 -0
- package/dist/did-document.js +2 -0
- package/dist/did-document.js.map +1 -0
- package/dist/didcomm-contracts.d.ts +32 -0
- package/dist/didcomm-contracts.d.ts.map +1 -0
- package/dist/didcomm-contracts.js +2 -0
- package/dist/didcomm-contracts.js.map +1 -0
- package/dist/encoding/base58btc.d.ts +2 -0
- package/dist/encoding/base58btc.d.ts.map +1 -1
- package/dist/encoding/base58btc.js +24 -0
- package/dist/encoding/base58btc.js.map +1 -1
- package/dist/encoding.d.ts +28 -0
- package/dist/encoding.d.ts.map +1 -0
- package/dist/encoding.js +31 -0
- package/dist/encoding.js.map +1 -0
- package/dist/identity-assurance/index.d.ts +1 -0
- package/dist/identity-assurance/index.d.ts.map +1 -1
- package/dist/identity-assurance/index.js +1 -0
- package/dist/identity-assurance/index.js.map +1 -1
- package/dist/identity-assurance/review-methods.d.ts +9 -0
- package/dist/identity-assurance/review-methods.d.ts.map +1 -0
- package/dist/identity-assurance/review-methods.js +8 -0
- package/dist/identity-assurance/review-methods.js.map +1 -0
- package/dist/identity-assurance/vocabulary.d.ts.map +1 -1
- package/dist/identity-assurance/vocabulary.js +8 -7
- package/dist/identity-assurance/vocabulary.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/isco-08.d.ts +149 -0
- package/dist/isco-08.d.ts.map +1 -0
- package/dist/isco-08.js +74 -0
- package/dist/isco-08.js.map +1 -0
- package/dist/openid-contracts.d.ts +59 -0
- package/dist/openid-contracts.d.ts.map +1 -0
- package/dist/openid-contracts.js +2 -0
- package/dist/openid-contracts.js.map +1 -0
- package/dist/organization-credentials.d.ts.map +1 -1
- package/dist/organization-credentials.js +3 -2
- package/dist/organization-credentials.js.map +1 -1
- package/dist/organization-identity.d.ts +8 -0
- package/dist/organization-identity.d.ts.map +1 -1
- package/dist/organization-identity.js +37 -1
- package/dist/organization-identity.js.map +1 -1
- package/dist/organization-service-catalog.d.ts +1 -28
- package/dist/organization-service-catalog.d.ts.map +1 -1
- package/dist/organization-service-catalog.js +2 -28
- package/dist/organization-service-catalog.js.map +1 -1
- package/dist/schema-org-claims.d.ts +145 -0
- package/dist/schema-org-claims.d.ts.map +1 -0
- package/dist/schema-org-claims.js +137 -0
- package/dist/schema-org-claims.js.map +1 -0
- package/dist/vault-repository.d.ts +29 -0
- package/dist/vault-repository.d.ts.map +1 -0
- package/dist/vault-repository.js +2 -0
- package/dist/vault-repository.js.map +1 -0
- package/docs/CREDENTIAL_CONSUMER_PROFILES.md +55 -0
- package/docs/DIDCOMM_AND_ACTOR_SYNTAX.md +51 -0
- package/docs/DID_AND_JWS_DATA_CONTRACTS.md +20 -0
- package/docs/NEUTRAL_IDENTITY_CONTRACTS.md +79 -0
- package/docs/NEUTRAL_VAULT_CONTRACTS.md +49 -0
- package/docs/ORGANIZATION_CONTACT_IDENTITY.md +3 -2
- package/docs/UNVERIFIED_CREDENTIAL_DECODING.md +63 -0
- package/package.json +41 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/** Product-neutral flat claim identities. These describe data, not roles or authorization. */
|
|
2
|
+
export const SchemaOrgOrganizationClaim = Object.freeze({
|
|
3
|
+
/** Existing public-catalog key: the PropertyValue value, not its containing reference. */
|
|
4
|
+
Identifier: 'org.schema.Organization.identifier.value',
|
|
5
|
+
IdentifierValue: 'org.schema.Organization.identifier.value',
|
|
6
|
+
IdentifierReference: 'org.schema.Organization.identifier',
|
|
7
|
+
IdentifierType: 'org.schema.Organization.identifier.additionalType',
|
|
8
|
+
Name: 'org.schema.Organization.name',
|
|
9
|
+
ParentOrganization: 'org.schema.Organization.parentOrganization.identifier',
|
|
10
|
+
AdditionalType: 'org.schema.Organization.additionalType',
|
|
11
|
+
SameAs: 'org.schema.Organization.sameAs',
|
|
12
|
+
AddressCountry: 'org.schema.Organization.address.addressCountry',
|
|
13
|
+
AddressRegion: 'org.schema.Organization.address.addressRegion',
|
|
14
|
+
AddressLocality: 'org.schema.Organization.address.addressLocality',
|
|
15
|
+
PostalCode: 'org.schema.Organization.address.postalCode',
|
|
16
|
+
StreetAddress: 'org.schema.Organization.address.streetAddress',
|
|
17
|
+
LegalName: 'org.schema.Organization.legalName',
|
|
18
|
+
AlternateName: 'org.schema.Organization.alternateName',
|
|
19
|
+
TaxId: 'org.schema.Organization.taxID',
|
|
20
|
+
Url: 'org.schema.Organization.url',
|
|
21
|
+
Duns: 'org.schema.Organization.duns',
|
|
22
|
+
Email: 'org.schema.Organization.email',
|
|
23
|
+
Telephone: 'org.schema.Organization.telephone',
|
|
24
|
+
HasCredentialMaterial: 'org.schema.Organization.hasCredential.material',
|
|
25
|
+
OwnerAlternateName: 'org.schema.Organization.owner.alternateName',
|
|
26
|
+
OwnerEmail: 'org.schema.Organization.owner.email',
|
|
27
|
+
OwnerTelephone: 'org.schema.Organization.owner.telephone',
|
|
28
|
+
OwnerIdentifierValue: 'org.schema.Organization.owner.identifier.value',
|
|
29
|
+
MemberAlternateName: 'org.schema.Organization.member.alternateName',
|
|
30
|
+
MemberName: 'org.schema.Organization.member.name',
|
|
31
|
+
MemberAdditionalType: 'org.schema.Organization.member.additionalType',
|
|
32
|
+
MemberGivenName: 'org.schema.Organization.member.givenName',
|
|
33
|
+
MemberFamilyName: 'org.schema.Organization.member.familyName',
|
|
34
|
+
MemberBirthDate: 'org.schema.Organization.member.birthDate',
|
|
35
|
+
MemberGender: 'org.schema.Organization.member.gender',
|
|
36
|
+
MemberEmail: 'org.schema.Organization.member.email',
|
|
37
|
+
MemberTelephone: 'org.schema.Organization.member.telephone',
|
|
38
|
+
MemberIdentifierType: 'org.schema.Organization.member.identifier.additionalType',
|
|
39
|
+
MemberIdentifierValue: 'org.schema.Organization.member.identifier.value',
|
|
40
|
+
MemberRole: 'org.schema.Organization.member.role',
|
|
41
|
+
NumberOfEmployees: 'org.schema.Organization.numberOfEmployees.value',
|
|
42
|
+
});
|
|
43
|
+
export const SchemaOrgPersonClaim = Object.freeze({
|
|
44
|
+
AdditionalType: 'org.schema.Person.additionalType',
|
|
45
|
+
AdditionalName: 'org.schema.Person.additionalName',
|
|
46
|
+
AlternateName: 'org.schema.Person.alternateName',
|
|
47
|
+
AddressCountry: 'org.schema.Person.address.addressCountry',
|
|
48
|
+
AddressRegion: 'org.schema.Person.address.addressRegion',
|
|
49
|
+
BirthDate: 'org.schema.Person.birthDate',
|
|
50
|
+
Email: 'org.schema.Person.email',
|
|
51
|
+
FamilyName: 'org.schema.Person.familyName',
|
|
52
|
+
Gender: 'org.schema.Person.gender',
|
|
53
|
+
GivenName: 'org.schema.Person.givenName',
|
|
54
|
+
HasOccupation: 'org.schema.Person.hasOccupation',
|
|
55
|
+
OccupationalCategory: 'org.schema.Person.hasOccupation.occupationalCategory',
|
|
56
|
+
OccupationIdentifierValue: 'org.schema.Person.hasOccupation.identifier.value',
|
|
57
|
+
OccupationIdentifierSystem: 'org.schema.Person.hasOccupation.identifier.additionalType',
|
|
58
|
+
HasCredentialMaterial: 'org.schema.Person.hasCredential.material',
|
|
59
|
+
Identifier: 'org.schema.Person.identifier',
|
|
60
|
+
IdentifierType: 'org.schema.Person.identifier.additionalType',
|
|
61
|
+
IdentifierValue: 'org.schema.Person.identifier.value',
|
|
62
|
+
SameAs: 'org.schema.Person.sameAs',
|
|
63
|
+
Name: 'org.schema.Person.name',
|
|
64
|
+
MemberOf: 'org.schema.Person.memberOf',
|
|
65
|
+
MemberOfTaxId: 'org.schema.Person.memberOf.taxID',
|
|
66
|
+
Telephone: 'org.schema.Person.telephone',
|
|
67
|
+
WorksFor: 'org.schema.Person.worksFor',
|
|
68
|
+
});
|
|
69
|
+
export const SchemaOrgActionClaim = Object.freeze({
|
|
70
|
+
AgentIdentifier: 'org.schema.Action.agent.identifier',
|
|
71
|
+
AgentLegalName: 'org.schema.Action.agent.legalName',
|
|
72
|
+
ParticipantIdentifier: 'org.schema.Action.participant.identifier',
|
|
73
|
+
ProviderIdentifier: 'org.schema.Action.provider.identifier',
|
|
74
|
+
ProviderName: 'org.schema.Action.provider.name',
|
|
75
|
+
StartTime: 'org.schema.Action.startTime',
|
|
76
|
+
});
|
|
77
|
+
export const SchemaOrgPlaceClaim = Object.freeze({
|
|
78
|
+
Identifier: 'org.schema.Place.identifier.value',
|
|
79
|
+
Name: 'org.schema.Place.name',
|
|
80
|
+
Department: 'org.schema.Place.department.identifier',
|
|
81
|
+
ContainedInPlace: 'org.schema.Place.containedInPlace.identifier',
|
|
82
|
+
Latitude: 'org.schema.Place.geo.latitude',
|
|
83
|
+
Longitude: 'org.schema.Place.geo.longitude',
|
|
84
|
+
Elevation: 'org.schema.Place.geo.elevation',
|
|
85
|
+
AddressCountry: 'org.schema.Place.address.addressCountry',
|
|
86
|
+
AddressRegion: 'org.schema.Place.address.addressRegion',
|
|
87
|
+
AddressLocality: 'org.schema.Place.address.addressLocality',
|
|
88
|
+
PostalCode: 'org.schema.Place.address.postalCode',
|
|
89
|
+
StreetAddress: 'org.schema.Place.address.streetAddress',
|
|
90
|
+
});
|
|
91
|
+
export const SchemaOrgServiceClaim = Object.freeze({
|
|
92
|
+
Category: 'org.schema.Service.category',
|
|
93
|
+
/** Existing public-catalog key retains its exact wire value. */
|
|
94
|
+
Identifier: 'org.schema.Service.identifier.value',
|
|
95
|
+
IdentifierValue: 'org.schema.Service.identifier.value',
|
|
96
|
+
IdentifierReference: 'org.schema.Service.identifier',
|
|
97
|
+
Name: 'org.schema.Service.name',
|
|
98
|
+
Description: 'org.schema.Service.description',
|
|
99
|
+
ServiceType: 'org.schema.Service.serviceType',
|
|
100
|
+
Provider: 'org.schema.Service.provider.identifier',
|
|
101
|
+
Department: 'org.schema.Service.department.identifier',
|
|
102
|
+
AvailableAtOrFrom: 'org.schema.Service.availableAtOrFrom.identifier',
|
|
103
|
+
AreaServed: 'org.schema.Service.areaServed',
|
|
104
|
+
AdditionalType: 'org.schema.Service.additionalType',
|
|
105
|
+
TermsOfService: 'org.schema.Service.termsOfService',
|
|
106
|
+
Url: 'org.schema.Service.url',
|
|
107
|
+
});
|
|
108
|
+
/** Offer data only. Eligibility and payment fields are assertions, not an entitlement decision. */
|
|
109
|
+
export const SchemaOrgOfferClaim = Object.freeze({
|
|
110
|
+
AcceptedPaymentMethod: 'org.schema.Offer.acceptedPaymentMethod',
|
|
111
|
+
Category: 'org.schema.Offer.category',
|
|
112
|
+
CheckoutPageUrlTemplate: 'org.schema.Offer.checkoutPageURLTemplate',
|
|
113
|
+
EligibleCustomerType: 'org.schema.Offer.eligibleCustomerType',
|
|
114
|
+
EligibleQuantityValue: 'org.schema.Offer.eligibleQuantity.value',
|
|
115
|
+
Identifier: 'org.schema.Offer.identifier',
|
|
116
|
+
ItemOfferedName: 'org.schema.Offer.itemOffered.name',
|
|
117
|
+
ItemOfferedSku: 'org.schema.Offer.itemOffered.sku',
|
|
118
|
+
OfferedBy: 'org.schema.Offer.offeredBy',
|
|
119
|
+
Price: 'org.schema.Offer.price',
|
|
120
|
+
PriceCurrency: 'org.schema.Offer.priceCurrency',
|
|
121
|
+
SerialNumber: 'org.schema.Offer.serialNumber',
|
|
122
|
+
});
|
|
123
|
+
export const SchemaOrgOrderClaim = Object.freeze({
|
|
124
|
+
AcceptedOfferIdentifier: 'org.schema.Order.acceptedOffer.identifier',
|
|
125
|
+
ConfirmationNumber: 'org.schema.Order.confirmationNumber',
|
|
126
|
+
PartOfInvoice: 'org.schema.Order.partOfInvoice',
|
|
127
|
+
PaymentMethod: 'org.schema.Order.paymentMethod',
|
|
128
|
+
PaymentUrl: 'org.schema.Order.paymentUrl',
|
|
129
|
+
OrderedItemServiceType: 'org.schema.Order.orderedItem.serviceType',
|
|
130
|
+
});
|
|
131
|
+
/** An individual product's declared category or serial does not establish a software licence. */
|
|
132
|
+
export const SchemaOrgIndividualProductClaim = Object.freeze({
|
|
133
|
+
AdditionalType: 'org.schema.IndividualProduct.additionalType',
|
|
134
|
+
Category: 'org.schema.IndividualProduct.category',
|
|
135
|
+
SerialNumber: 'org.schema.IndividualProduct.serialNumber',
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=schema-org-claims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-org-claims.js","sourceRoot":"","sources":["../src/schema-org-claims.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9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,iGAAiG;AACjG,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,cAAc,EAAE,6CAA6C;IAC7D,QAAQ,EAAE,uCAAuC;IACjD,YAAY,EAAE,2CAA2C;CACjD,CAAC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Storage identity only; a record or collection identifier does not establish authority. */
|
|
2
|
+
export interface RecordBase {
|
|
3
|
+
id: string;
|
|
4
|
+
}
|
|
5
|
+
export type VaultRecord = RecordBase;
|
|
6
|
+
/** Existing exact record-field condition, not an implicit protected-index or nested-path selector. */
|
|
7
|
+
export interface VaultQueryCondition {
|
|
8
|
+
attribute: string;
|
|
9
|
+
equals?: unknown;
|
|
10
|
+
in?: unknown[];
|
|
11
|
+
}
|
|
12
|
+
/** Portable input profile. EAV/HMAC query capabilities require a separate explicit contract. */
|
|
13
|
+
export interface VaultQuery {
|
|
14
|
+
where?: VaultQueryCondition[];
|
|
15
|
+
orderBy?: {
|
|
16
|
+
attribute: string;
|
|
17
|
+
direction: 'asc' | 'desc';
|
|
18
|
+
};
|
|
19
|
+
limit?: number;
|
|
20
|
+
offset?: number;
|
|
21
|
+
}
|
|
22
|
+
/** Abstract data port only. Hosts own authentication, scope, transactions and backend selection. */
|
|
23
|
+
export interface IVaultRepository {
|
|
24
|
+
put<T extends VaultRecord>(collectionName: string, records: T | T[]): Promise<boolean>;
|
|
25
|
+
get<T extends VaultRecord>(collectionName: string, id: string): Promise<T | undefined>;
|
|
26
|
+
query<T extends VaultRecord>(collectionName: string, query: VaultQuery): Promise<T[]>;
|
|
27
|
+
delete(collectionName: string, id: string): Promise<boolean>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=vault-repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-repository.d.ts","sourceRoot":"","sources":["../src/vault-repository.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,MAAM,WAAW,UAAU;IAAG,EAAE,EAAE,MAAM,CAAA;CAAE;AAC1C,MAAM,MAAM,WAAW,GAAG,UAAU,CAAA;AAEpC,sGAAsG;AACtG,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,EAAE,CAAC,EAAE,OAAO,EAAE,CAAA;CACf;AAED,gGAAgG;AAChG,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAC7B,OAAO,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,CAAA;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,oGAAoG;AACpG,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,CAAC,SAAS,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACtF,GAAG,CAAC,CAAC,SAAS,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAA;IACtF,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;IACrF,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault-repository.js","sourceRoot":"","sources":["../src/vault-repository.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Neutral credential and presentation consumer profiles
|
|
2
|
+
|
|
3
|
+
The `credential-contracts` subpath supplies data contracts shared by current
|
|
4
|
+
credential, registration and presentation consumers across sectors. It does not
|
|
5
|
+
issue, decode, authenticate or verify a credential. A populated `issuer`, `proof`
|
|
6
|
+
or presentation field does not establish a signature, trusted issuer, replay
|
|
7
|
+
binding, recipient or authorization decision.
|
|
8
|
+
|
|
9
|
+
`W3cCredentialContexts` contains the existing V1 and V2 context identities.
|
|
10
|
+
`W3cCredentialTypes` contains the base credential and presentation type names.
|
|
11
|
+
`VC_CONTEXT_V2` aliases the V2 context. Existing organization credential builders
|
|
12
|
+
reuse these constants without changing their serialized values.
|
|
13
|
+
|
|
14
|
+
`VerifiableCredentialV2<Subject, Evidence>` preserves the current supported
|
|
15
|
+
consumer profile: an array of context strings, an array of type strings, one
|
|
16
|
+
object subject, a string issuer and required `validFrom`. ID, expiry, proof and
|
|
17
|
+
evidence remain optional. These are application constraints; the type is not a
|
|
18
|
+
claim to cover every W3C credential form. A consumer with a known education or
|
|
19
|
+
other sector subject can supply that object interface directly. Default subject
|
|
20
|
+
and evidence values remain unvalidated `unknown` data that callers must narrow.
|
|
21
|
+
|
|
22
|
+
`CredentialProof` projects the current required proof type and optional created,
|
|
23
|
+
JWS, purpose and verification-method fields, with unknown extension members.
|
|
24
|
+
The Gateway may retain its historical `ProofEBSIv2` spelling as a local type
|
|
25
|
+
alias; this does not claim EBSI compliance or a verified proof. The existing
|
|
26
|
+
`ReviewedOrganizationCredential` remains a separate readonly organization
|
|
27
|
+
projection with required ID and expiry and JSON-shaped proof/evidence. Its
|
|
28
|
+
different constraints are preserved rather than forced into an incompatible
|
|
29
|
+
universal alias.
|
|
30
|
+
|
|
31
|
+
`VpCredentialInput` represents a credential string or an unvalidated decoded
|
|
32
|
+
object. `VpTokenPayload` is the supported decoded JWT presentation profile: a
|
|
33
|
+
required issuer and a `vp` object containing credential inputs, plus supported
|
|
34
|
+
optional token/holder metadata. It is distinct from both an encoded JWT string
|
|
35
|
+
and the complete native W3C presentation data model. `VpTokenHeader` reuses the
|
|
36
|
+
compatible JOSE header field types while keeping key ID optional. A declared
|
|
37
|
+
algorithm string is not cryptographic algorithm validation.
|
|
38
|
+
|
|
39
|
+
## Existing consumers and validation boundary
|
|
40
|
+
|
|
41
|
+
Current consumers are the Gateway credential manager, tenant/organization
|
|
42
|
+
configuration, host activation/reconciliation and credential data fixtures in
|
|
43
|
+
<https://github.com/soschain/sos-gw-node-ts>. The original compatibility source is
|
|
44
|
+
<https://github.com/Global-DataCare/gdc-common-utils-ts>, specifically the reviewed
|
|
45
|
+
[credential data profile](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/f4031b221216cacd9917d1d20c5ff0b03bed7045/src/models/verifiable-credential.ts)
|
|
46
|
+
and [JWT-presentation data](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/f4031b221216cacd9917d1d20c5ff0b03bed7045/src/utils/vp-token.ts).
|
|
47
|
+
Those links identify source evidence, not runtime dependencies. The broader
|
|
48
|
+
standard is the official [W3C Verifiable Credentials Data Model](https://www.w3.org/TR/vc-data-model-2.0/).
|
|
49
|
+
|
|
50
|
+
Public fixtures exercise typed sector subjects and reject missing required
|
|
51
|
+
profile fields, a subject array, missing proof type, unknown typed subject fields
|
|
52
|
+
and assigning decoded presentation data to an encoded token string. This is
|
|
53
|
+
compile-time contract evidence. Existing cryptography and identity tests verify
|
|
54
|
+
their own behavior; complete credential verification, service policy and real
|
|
55
|
+
sector journeys require their separate owning-service tests.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Plaintext DIDComm data and actor identifier syntax
|
|
2
|
+
|
|
3
|
+
`didcomm-contracts` exports the supported `DidCommPayload<Body>` plaintext
|
|
4
|
+
projection and `DidCommAttachment` attachment profile. These are neutral data
|
|
5
|
+
contracts for education and other sectors, independent of a business resource
|
|
6
|
+
type, SDK transport, persistence model, professional role or clinical policy.
|
|
7
|
+
|
|
8
|
+
The envelope retains the current consumer requirement for `id`, protocol `type`
|
|
9
|
+
and an object `body`; optional fields cover sender/recipients, parent/thread
|
|
10
|
+
identifiers, created/expiry times and attachments. A typed object interface can
|
|
11
|
+
serve as the body without adding an index signature. Arrays and primitive types
|
|
12
|
+
are rejected by the supported body profile. These compile-time checks do not
|
|
13
|
+
replace runtime JSON validation. A protocol `type` is not a business resource's
|
|
14
|
+
type or a FHIR `resourceType`.
|
|
15
|
+
|
|
16
|
+
The attachment profile requires `id`, `media_type` and `data`, preserving existing
|
|
17
|
+
consumers. Requiring those metadata members is a consumer constraint, not a
|
|
18
|
+
claim that every DIDComm attachment must have them. It accepts the existing
|
|
19
|
+
immutable inline/linked binary attachment builders directly, including readonly
|
|
20
|
+
link arrays, byte counts and linked hashes. Optional inline JSON uses the owned
|
|
21
|
+
`JsonValue` shape. The projection does not enforce every standard attachment
|
|
22
|
+
combination, content encoding or hash rule. Callers validate their selected
|
|
23
|
+
transport and content profile before processing attachments.
|
|
24
|
+
|
|
25
|
+
`DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE` identifies plaintext data. It grants no
|
|
26
|
+
confidentiality, authenticity or authorization. Default HTTP Accept negotiation
|
|
27
|
+
is caller policy and is not defined here. Reading or assigning a plaintext
|
|
28
|
+
envelope does not verify a signer, sender, recipient, replay binding or issuer.
|
|
29
|
+
|
|
30
|
+
Original compatibility source:
|
|
31
|
+
<https://github.com/Global-DataCare/gdc-common-utils-ts>, specifically the reviewed
|
|
32
|
+
[communication data](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/f4031b221216cacd9917d1d20c5ff0b03bed7045/src/models/comm.ts).
|
|
33
|
+
The [DIDComm specification](https://identity.foundation/didcomm-messaging/spec/v2.1/)
|
|
34
|
+
describes a broader protocol. This implementation is the explicitly supported
|
|
35
|
+
consumer projection, not a claim to implement or validate every feature.
|
|
36
|
+
|
|
37
|
+
## Stable actor syntax
|
|
38
|
+
|
|
39
|
+
`isStableActorIdentifier(value)` returns a boolean for a primitive string whose
|
|
40
|
+
trimmed value has the existing `urn:multibase:z` prefix followed by one or more
|
|
41
|
+
base58btc alphabet characters. Short strings such as `urn:multibase:z1` retain
|
|
42
|
+
their historical syntactic result. The helper does not decode a multihash,
|
|
43
|
+
validate its digest algorithm or length, prove contact possession or establish
|
|
44
|
+
actor identity. Use the actual authenticated identity and proof checks for that.
|
|
45
|
+
|
|
46
|
+
Objects are rejected without reading conversion hooks, including inherited
|
|
47
|
+
`toString` and `Symbol.toPrimitive` getters. This deliberately hardens the old
|
|
48
|
+
coercion behavior while preserving primitive string compatibility. The result
|
|
49
|
+
is boolean rather than a type predicate, so an invalid known string does not
|
|
50
|
+
become an impossible type in its false branch. Original source evidence is the
|
|
51
|
+
reviewed [actor identifier helper](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/f4031b221216cacd9917d1d20c5ff0b03bed7045/src/utils/actor-identifier.ts).
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Neutral identity and signature data contracts
|
|
2
|
+
|
|
3
|
+
`did-document` describes the key-bearing JSON-LD projection used by the engine,
|
|
4
|
+
with DID verification relationships and explicit public-key shapes. It follows
|
|
5
|
+
the [W3C DID Core vocabulary](https://www.w3.org/TR/did-core/), but is not a
|
|
6
|
+
schema validator, resolver, proof verifier or authorization decision.
|
|
7
|
+
|
|
8
|
+
String service endpoints and string or string-array contexts are compatibility
|
|
9
|
+
defaults. Generic service and context parameters let an exchange adapter model
|
|
10
|
+
other structured representations explicitly. Extension fields remain unknown
|
|
11
|
+
until a consuming adapter validates its own profile.
|
|
12
|
+
|
|
13
|
+
The cryptography entry point exports the engine's JWS signing profile based on
|
|
14
|
+
RFC 7515. Decoded headers require explicit algorithm and key selection; encoded
|
|
15
|
+
General JWS signature fields remain strings. This is a supported engine profile,
|
|
16
|
+
not every valid JOSE serialization. Embedded JWK import types do not enforce
|
|
17
|
+
public-only publication: the emitting host must validate or project the key.
|
|
18
|
+
|
|
19
|
+
These contracts contain no sector, controller policy, transport, persistence or
|
|
20
|
+
clinical catalog. SDK runtime layers own resolution and authenticated handling.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Neutral identity and registration contracts
|
|
2
|
+
|
|
3
|
+
Antifraud owns the reusable person, organization, action, place and service flat
|
|
4
|
+
claim vocabularies in `schema-org-claims`. These describe identity and catalog
|
|
5
|
+
data for education, administrative work and other sectors. They contain no
|
|
6
|
+
healthcare role selection, licence entitlement, clinical policy or portal code.
|
|
7
|
+
The flat keys are an application wire profile using Schema.org vocabulary;
|
|
8
|
+
they are not a declaration that Schema.org publishes these reverse-DNS keys.
|
|
9
|
+
|
|
10
|
+
`organization-service-catalog` re-exports the same organization, place and service
|
|
11
|
+
objects. Its existing `Organization.Identifier`, `Place.Identifier` and
|
|
12
|
+
`Service.Identifier` keys still address `identifier.value`. In the expanded
|
|
13
|
+
organization and service vocabularies, `IdentifierReference` addresses the
|
|
14
|
+
containing `identifier`; `IdentifierValue` is an explicit alias for the existing
|
|
15
|
+
value key. Consumers must select the required field explicitly. Changing an
|
|
16
|
+
import must not change stored claims, searches, proofs or signed payloads.
|
|
17
|
+
|
|
18
|
+
`SchemaOrgPersonClaim` retains the identity-assurance mapper's seven existing
|
|
19
|
+
person fields and adds the occupation, identity and organization-membership
|
|
20
|
+
fields already required by shared onboarding and employee consumers.
|
|
21
|
+
`SchemaOrgActionClaim` records the agent, participant, provider and start time of
|
|
22
|
+
an action. A field claiming an actor or credential material never establishes
|
|
23
|
+
that actor's authority. Verified sessions and proofs remain caller concerns.
|
|
24
|
+
|
|
25
|
+
## Registration and token data
|
|
26
|
+
|
|
27
|
+
The `openid-contracts` subpath exports data types only:
|
|
28
|
+
|
|
29
|
+
| Contract | Existing consumer need | Boundary |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `JwtRegisteredClaims` | Registered issuer, subject, audience, time and token identifiers | Optional registered members; no token validation |
|
|
32
|
+
| `ClientAccessTokenClaims` | Authorization managers require a client ID, scope, issuer, subject, single audience and issued/expiry times | A constrained application profile, not every OAuth access token |
|
|
33
|
+
| `OidcClientRegistrationRequest` | Device registration receives redirect URIs, application/software metadata, authentication method, grants and JWK metadata | The metadata subset currently supported by consumers, not every registered OIDC field or authentication method |
|
|
34
|
+
| `OidcClientRegistrationResponse` | Registration returns a client ID and optional issuance/secret/management metadata | Metadata only; issuance time remains optional in this neutral subset |
|
|
35
|
+
| `RegisteredDeviceInfo` | Registration distinguishes stable device identity from optional push delivery metadata | Application extension data, not standard OIDC metadata |
|
|
36
|
+
| `DeviceClientRegistrationRequest` | Existing device admission carries `ext_device_info` | Explicit extension of the neutral metadata subset |
|
|
37
|
+
| `DeviceClientRegistrationResponse` | Existing device admission always returns client issuance time | Constrained application response profile |
|
|
38
|
+
|
|
39
|
+
The existing source consumers are `DeviceRegistrationManager`,
|
|
40
|
+
`IAuthorizationManager`, `SmartAuthorizationManager` and `FhirController` in
|
|
41
|
+
<https://github.com/soschain/sos-gw-node-ts>. The flat claim consumers include
|
|
42
|
+
shared onboarding in <https://github.com/soschain/sos-data-utils-ts> and the
|
|
43
|
+
existing Antifraud public organization catalog. Original compatibility source:
|
|
44
|
+
<https://github.com/Global-DataCare/gdc-common-utils-ts>, specifically the reviewed
|
|
45
|
+
[flat claim catalog](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/f4031b221216cacd9917d1d20c5ff0b03bed7045/src/constants/schemaorg.ts),
|
|
46
|
+
[device registration data](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/f4031b221216cacd9917d1d20c5ff0b03bed7045/src/models/openid-device.ts)
|
|
47
|
+
and [access-token application profile](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/f4031b221216cacd9917d1d20c5ff0b03bed7045/src/models/auth.ts).
|
|
48
|
+
These links identify source evidence and add no runtime dependency.
|
|
49
|
+
|
|
50
|
+
Standards references are [OpenID Connect Dynamic Client Registration](https://openid.net/specs/openid-connect-registration-1_0.html),
|
|
51
|
+
[OAuth client metadata](https://www.rfc-editor.org/rfc/rfc7591.html#section-2)
|
|
52
|
+
and [JWT registered claims](https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1).
|
|
53
|
+
TypeScript does not enforce these protocols at runtime. JSON decoding, assigning
|
|
54
|
+
a type, accepting JWK import data or receiving device metadata does not verify a
|
|
55
|
+
signature, establish trust, enforce replay protection or grant a licence.
|
|
56
|
+
|
|
57
|
+
## Commerce data used by existing consumers
|
|
58
|
+
|
|
59
|
+
`SchemaOrgOfferClaim`, `SchemaOrgOrderClaim` and
|
|
60
|
+
`SchemaOrgIndividualProductClaim` contain the generic flat fields already read
|
|
61
|
+
by `HostingOfferOrderService`, `process-order-entry`, `payment-confirmation`,
|
|
62
|
+
`FamilyManager`, `license-search` and related hosting handlers in the Gateway
|
|
63
|
+
source linked above. These fields include offer quantity and price, accepted
|
|
64
|
+
offer references, order confirmation/payment references and product serials.
|
|
65
|
+
They preserve the exact existing indexed wire identities. Host-specific pricing,
|
|
66
|
+
payment verification, role entitlements, device limits and licence decisions
|
|
67
|
+
remain outside these neutral vocabularies. A product category or serial is data,
|
|
68
|
+
not authorization. No unused SoftwareApplication vocabulary is added merely to
|
|
69
|
+
reproduce a larger historical catalog.
|
|
70
|
+
|
|
71
|
+
## Validation
|
|
72
|
+
|
|
73
|
+
Public consumer fixtures compile the positive shapes and reject missing client
|
|
74
|
+
scope, missing device identity, string numeric dates, unknown claim keys and a
|
|
75
|
+
device extension accidentally placed in the standard metadata subset. Runtime
|
|
76
|
+
tests preserve the distinction between identifier references and values, the
|
|
77
|
+
existing public-catalog exports and identity-assurance mapping keys. Existing
|
|
78
|
+
catalog and cryptography tests continue to validate their own behavior. These
|
|
79
|
+
checks do not claim complete OpenID conformance or an education service journey.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Neutral record and vault contracts
|
|
2
|
+
|
|
3
|
+
The `vault-repository` subpath exports five type-only contracts:
|
|
4
|
+
`RecordBase`, `VaultRecord`, `VaultQueryCondition`, `VaultQuery` and
|
|
5
|
+
`IVaultRepository`. They provide one reusable abstract storage boundary for
|
|
6
|
+
education, administration and other sector consumers without importing a product
|
|
7
|
+
SDK, clinical vocabulary or a storage backend.
|
|
8
|
+
|
|
9
|
+
`RecordBase` requires `id: string`; `VaultRecord` aliases it. The repository
|
|
10
|
+
retains the existing four methods and results: write one or several records,
|
|
11
|
+
read an optional typed record, query typed records, and delete a record. Write
|
|
12
|
+
and delete results remain `Promise<boolean>`. An identifier does not establish
|
|
13
|
+
authority; host composition must enforce the authenticated account, tenant and
|
|
14
|
+
collection scope.
|
|
15
|
+
|
|
16
|
+
## Query profile and compatibility
|
|
17
|
+
|
|
18
|
+
`VaultQueryCondition` retains `attribute`, optional `equals` and optional `in`.
|
|
19
|
+
`VaultQuery` retains optional `where`, `orderBy`, `limit` and `offset`. This is the
|
|
20
|
+
existing exact record-field profile. In particular an attribute containing dots
|
|
21
|
+
is not automatically interpreted as a nested path, an EAV attribute name or a
|
|
22
|
+
protected HMAC index selector. This extraction adds no `extraIndex` capability
|
|
23
|
+
or implicit index dialect. Protected-index queries need a separately named and
|
|
24
|
+
tested profile/capability that retains vault, tenant and index namespaces.
|
|
25
|
+
|
|
26
|
+
Original contract source: <https://github.com/soschain/sos-sdk-core-ts>, reviewed
|
|
27
|
+
at the [four-method repository port](https://github.com/soschain/sos-sdk-core-ts/blob/53adaa88724560b728f9c6e5e897951c8da9550b/src/vault-repository.ts).
|
|
28
|
+
Compatibility consumers can retain their existing public subpaths through
|
|
29
|
+
type-only re-exports. Record metadata or a query input alone does not authorize
|
|
30
|
+
collection access or select a backend.
|
|
31
|
+
|
|
32
|
+
## What the abstract port does not implement
|
|
33
|
+
|
|
34
|
+
There is no memory, SQLite, IndexedDB, Firestore or other persistence adapter in
|
|
35
|
+
this module. There is no transaction implementation, driver, transport client,
|
|
36
|
+
cross-device synchronization or key-custody implementation. Those behaviors
|
|
37
|
+
belong to explicit runtime owners and require their own adapter and journey
|
|
38
|
+
proof. Antifraud Data must not import a product runtime to implement this port.
|
|
39
|
+
|
|
40
|
+
The richer Gateway repository class, with section/history/hydration operations
|
|
41
|
+
and a runtime DI token, is a separate contract. It must not be silently replaced
|
|
42
|
+
with this four-method type-only interface merely because the public names match.
|
|
43
|
+
|
|
44
|
+
Public consumer fixtures check typed record reads/queries, required IDs and
|
|
45
|
+
method results while rejecting an unsupported EAV condition shape. A scoped
|
|
46
|
+
source check rejects reverse product/clinical dependencies and runtime
|
|
47
|
+
implementations in the abstract module. These are contract/ownership checks,
|
|
48
|
+
not proof of native or browser persistence, encrypted key reopening or backend
|
|
49
|
+
query parity.
|
|
@@ -44,8 +44,9 @@ employee DID retains the existing organization `did:web` root followed by
|
|
|
44
44
|
is separate from the stable actor; two roles for one phone do not require two
|
|
45
45
|
phone accounts. Neither clear contact is embedded in the generated identifier.
|
|
46
46
|
|
|
47
|
-
The algorithm and representation
|
|
48
|
-
|
|
47
|
+
The algorithm and representation preserve the actor identifier and employee
|
|
48
|
+
DID helpers in [the original source repository](https://github.com/Global-DataCare/gdc-common-utils-ts).
|
|
49
|
+
Tests use
|
|
49
50
|
that existing **development dependency only** as a compatibility oracle for
|
|
50
51
|
email case, plus-addresses, URI/format normalization, phone hashes, employee
|
|
51
52
|
DIDs and device suffixes. Email DID compatibility is defined on normalized
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Unverified credential and presentation parsing
|
|
2
|
+
|
|
3
|
+
The `credential-decoding` subpath provides two product-neutral parsing
|
|
4
|
+
helpers: `decodeUnverifiedJsonOrJwtObject(input)` and
|
|
5
|
+
`extractUnverifiedPresentationCredentials(input)`. They read data, not trust.
|
|
6
|
+
Neither helper verifies JOSE headers, signatures, issuers, recipients, validity
|
|
7
|
+
periods, nonces, role types or any authorization policy. They do not replace the
|
|
8
|
+
cryptography engine's JWS/JWE processing or an application's token verifier.
|
|
9
|
+
|
|
10
|
+
## Supported input and raw-object boundary
|
|
11
|
+
|
|
12
|
+
The object decoder accepts a raw JSON object string, a three-part compact input
|
|
13
|
+
with a nonempty base64url JSON object payload, or an already decoded plain data
|
|
14
|
+
object. Compact inputs preserve the current parser's payload-only behavior:
|
|
15
|
+
their header and signature segments are not validated. Payload bytes use the
|
|
16
|
+
existing `Content` strict base64url decoding and fatal UTF-8 conversion.
|
|
17
|
+
|
|
18
|
+
Already decoded containers must have the ordinary object prototype or a null
|
|
19
|
+
prototype and only own string-keyed data properties. Own accessors, inherited
|
|
20
|
+
containers, arrays and class instances are excluded. The parser reads property
|
|
21
|
+
descriptors rather than calling conversion functions or property getters. It
|
|
22
|
+
returns a shallow copy of enumerable own data fields; nested values remain
|
|
23
|
+
opaque, unvalidated values. This is deliberately not a recursive JSON validator
|
|
24
|
+
or arbitrary JavaScript-object sandbox. Hostile Proxy reflection traps cannot
|
|
25
|
+
be guaranteed inert by a portable JavaScript helper; reflection errors are
|
|
26
|
+
handled as invalid input. Input strings and bytes are the preferred boundary.
|
|
27
|
+
|
|
28
|
+
The presentation collector reads only an own `vp` data container and an own
|
|
29
|
+
`verifiableCredential` array. It reads own array data entries through descriptors,
|
|
30
|
+
without using a caller-provided iterator or invoking array-entry getters.
|
|
31
|
+
Candidates can be plain decoded objects, raw JSON object strings or compact
|
|
32
|
+
credential payloads. Malformed candidates are omitted in their existing order.
|
|
33
|
+
There is no credential-type selection or profile admission policy in this layer.
|
|
34
|
+
|
|
35
|
+
Malformed input returns `undefined` from the object decoder or an empty array
|
|
36
|
+
from the collector. A valid empty JSON object can be parsed as data; it does not
|
|
37
|
+
become a valid credential or a successful authentication result. Public return
|
|
38
|
+
types retain unknown field values so callers must validate a selected schema.
|
|
39
|
+
|
|
40
|
+
## Compatibility and hardening
|
|
41
|
+
|
|
42
|
+
Current source consumers include `individual-controller-smart` and duplicated
|
|
43
|
+
activation parsing helpers in <https://github.com/soschain/sos-gw-node-ts>.
|
|
44
|
+
Original compatibility source:
|
|
45
|
+
<https://github.com/Global-DataCare/gdc-common-utils-ts>, specifically the reviewed
|
|
46
|
+
[presentation parsing helpers](https://github.com/Global-DataCare/gdc-common-utils-ts/blob/f4031b221216cacd9917d1d20c5ff0b03bed7045/src/utils/vp-token.ts).
|
|
47
|
+
Existing consumer wrappers may retain their old public spelling while importing
|
|
48
|
+
the explicitly unverified neutral implementation. Controller/representative
|
|
49
|
+
credential selection and activation policy remain in their owning product or
|
|
50
|
+
service; they do not become generic cryptographic verification.
|
|
51
|
+
|
|
52
|
+
Valid serialized object payloads preserve their data and order. The new boundary
|
|
53
|
+
explicitly rejects non-object JSON, invalid base64url/UTF-8, inherited fields,
|
|
54
|
+
nonplain containers and accessor/coercion-dependent objects that the older
|
|
55
|
+
permissive helpers could accept. It does not mutate a source object or assign
|
|
56
|
+
prototype keys through a prototype setter. Its own-container checks do not
|
|
57
|
+
validate nested subject values; callers must not infer recursive safety.
|
|
58
|
+
|
|
59
|
+
Tests cover exact Unicode data, supported input forms, mixed credential arrays,
|
|
60
|
+
malformed/scalar encodings, object/prototype/accessor boundaries, own array entries,
|
|
61
|
+
prototype-key preservation and unchanged unverified results under altered header
|
|
62
|
+
or signature segments. Those last cases prove the limit of parsing, not a
|
|
63
|
+
cryptographic success result.
|
package/package.json
CHANGED
|
@@ -1,11 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antifraud-data-utils-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Product-neutral identity, evidence and public organization catalog data contracts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
|
+
"./actor-kinds": {
|
|
10
|
+
"types": "./dist/actor-kinds.d.ts",
|
|
11
|
+
"default": "./dist/actor-kinds.js"
|
|
12
|
+
},
|
|
13
|
+
"./vault-repository": {
|
|
14
|
+
"types": "./dist/vault-repository.d.ts",
|
|
15
|
+
"default": "./dist/vault-repository.js"
|
|
16
|
+
},
|
|
17
|
+
"./credential-decoding": {
|
|
18
|
+
"types": "./dist/credential-decoding.d.ts",
|
|
19
|
+
"default": "./dist/credential-decoding.js"
|
|
20
|
+
},
|
|
21
|
+
"./credential-contracts": {
|
|
22
|
+
"types": "./dist/credential-contracts.d.ts",
|
|
23
|
+
"default": "./dist/credential-contracts.js"
|
|
24
|
+
},
|
|
25
|
+
"./didcomm-contracts": {
|
|
26
|
+
"types": "./dist/didcomm-contracts.d.ts",
|
|
27
|
+
"default": "./dist/didcomm-contracts.js"
|
|
28
|
+
},
|
|
29
|
+
"./schema-org-claims": {
|
|
30
|
+
"types": "./dist/schema-org-claims.d.ts",
|
|
31
|
+
"default": "./dist/schema-org-claims.js"
|
|
32
|
+
},
|
|
33
|
+
"./openid-contracts": {
|
|
34
|
+
"types": "./dist/openid-contracts.d.ts",
|
|
35
|
+
"default": "./dist/openid-contracts.js"
|
|
36
|
+
},
|
|
37
|
+
"./did-document": {
|
|
38
|
+
"types": "./dist/did-document.d.ts",
|
|
39
|
+
"default": "./dist/did-document.js"
|
|
40
|
+
},
|
|
41
|
+
"./encoding": {
|
|
42
|
+
"types": "./dist/encoding.d.ts",
|
|
43
|
+
"default": "./dist/encoding.js"
|
|
44
|
+
},
|
|
45
|
+
"./isco-08": {
|
|
46
|
+
"types": "./dist/isco-08.d.ts",
|
|
47
|
+
"default": "./dist/isco-08.js"
|
|
48
|
+
},
|
|
9
49
|
".": {
|
|
10
50
|
"types": "./dist/index.d.ts",
|
|
11
51
|
"default": "./dist/index.js"
|