@credo-ts/core 0.6.0-pr-2100-20241125134343 → 0.6.0-pr-2094-20241125134525

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 (63) hide show
  1. package/build/agent/AgentModules.d.ts +0 -2
  2. package/build/agent/AgentModules.js +0 -2
  3. package/build/agent/AgentModules.js.map +1 -1
  4. package/build/index.d.ts +0 -1
  5. package/build/index.js +0 -1
  6. package/build/index.js.map +1 -1
  7. package/build/modules/dif-presentation-exchange/utils/transform.d.ts +2 -4
  8. package/build/modules/dif-presentation-exchange/utils/transform.js +19 -2
  9. package/build/modules/dif-presentation-exchange/utils/transform.js.map +1 -1
  10. package/build/modules/mdoc/Mdoc.d.ts +0 -14
  11. package/build/modules/mdoc/Mdoc.js +0 -23
  12. package/build/modules/mdoc/Mdoc.js.map +1 -1
  13. package/build/modules/mdoc/MdocDeviceResponse.d.ts +1 -14
  14. package/build/modules/mdoc/MdocDeviceResponse.js +4 -31
  15. package/build/modules/mdoc/MdocDeviceResponse.js.map +1 -1
  16. package/build/modules/mdoc/MdocOptions.d.ts +0 -12
  17. package/build/modules/mdoc/repository/MdocRecord.d.ts +0 -8
  18. package/build/modules/mdoc/repository/MdocRecord.js +0 -12
  19. package/build/modules/mdoc/repository/MdocRecord.js.map +1 -1
  20. package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts +0 -2
  21. package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts +0 -12
  22. package/build/modules/sd-jwt-vc/SdJwtVcService.js +0 -29
  23. package/build/modules/sd-jwt-vc/SdJwtVcService.js.map +1 -1
  24. package/build/modules/sd-jwt-vc/decodeSdJwtVc.d.ts +7 -2
  25. package/build/modules/sd-jwt-vc/decodeSdJwtVc.js +0 -3
  26. package/build/modules/sd-jwt-vc/decodeSdJwtVc.js.map +1 -1
  27. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts +1 -8
  28. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.js +1 -10
  29. package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.js.map +1 -1
  30. package/build/modules/vc/repository/W3cCredentialRecord.d.ts +0 -4
  31. package/build/modules/vc/repository/W3cCredentialRecord.js +0 -6
  32. package/build/modules/vc/repository/W3cCredentialRecord.js.map +1 -1
  33. package/package.json +1 -3
  34. package/build/modules/dcql/DcqlError.d.ts +0 -8
  35. package/build/modules/dcql/DcqlError.js +0 -12
  36. package/build/modules/dcql/DcqlError.js.map +0 -1
  37. package/build/modules/dcql/DcqlModule.d.ts +0 -10
  38. package/build/modules/dcql/DcqlModule.js +0 -23
  39. package/build/modules/dcql/DcqlModule.js.map +0 -1
  40. package/build/modules/dcql/DcqlService.d.ts +0 -140
  41. package/build/modules/dcql/DcqlService.js +0 -253
  42. package/build/modules/dcql/DcqlService.js.map +0 -1
  43. package/build/modules/dcql/index.d.ts +0 -5
  44. package/build/modules/dcql/index.js +0 -22
  45. package/build/modules/dcql/index.js.map +0 -1
  46. package/build/modules/dcql/models/DcqlCredentialsForRequest.d.ts +0 -20
  47. package/build/modules/dcql/models/DcqlCredentialsForRequest.js +0 -3
  48. package/build/modules/dcql/models/DcqlCredentialsForRequest.js.map +0 -1
  49. package/build/modules/dcql/models/index.d.ts +0 -20
  50. package/build/modules/dcql/models/index.js +0 -18
  51. package/build/modules/dcql/models/index.js.map +0 -1
  52. package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.ts +0 -31
  53. package/build/modules/dcql/utils/DcqlPresentationsToCreate.js +0 -36
  54. package/build/modules/dcql/utils/DcqlPresentationsToCreate.js.map +0 -1
  55. package/build/modules/dcql/utils/index.d.ts +0 -1
  56. package/build/modules/dcql/utils/index.js +0 -18
  57. package/build/modules/dcql/utils/index.js.map +0 -1
  58. package/build/modules/mdoc/mdocUtil.d.ts +0 -1
  59. package/build/modules/mdoc/mdocUtil.js +0 -7
  60. package/build/modules/mdoc/mdocUtil.js.map +0 -1
  61. package/build/modules/sd-jwt-vc/disclosureFrame.d.ts +0 -5
  62. package/build/modules/sd-jwt-vc/disclosureFrame.js +0 -32
  63. package/build/modules/sd-jwt-vc/disclosureFrame.js.map +0 -1
@@ -1,253 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.DcqlService = void 0;
10
- const dcql_1 = require("dcql");
11
- const tsyringe_1 = require("tsyringe");
12
- const mdoc_1 = require("../mdoc");
13
- const sd_jwt_vc_1 = require("../sd-jwt-vc");
14
- const vc_1 = require("../vc");
15
- const DcqlError_1 = require("./DcqlError");
16
- const utils_1 = require("./utils");
17
- /**
18
- * @todo create a public api for using dif presentation exchange
19
- */
20
- let DcqlService = class DcqlService {
21
- /**
22
- * Queries the wallet for credentials that match the given presentation definition. This only does an initial query based on the
23
- * schema of the input descriptors. It does not do any further filtering based on the constraints in the input descriptors.
24
- */
25
- async queryCredentialsForDcqlQuery(agentContext, dcqlQuery) {
26
- const w3cCredentialRepository = agentContext.dependencyManager.resolve(vc_1.W3cCredentialRepository);
27
- const formats = new Set(dcqlQuery.credentials.map((c) => c.format));
28
- for (const format of formats) {
29
- if (format !== 'vc+sd-jwt' && format !== 'jwt_vc_json' && format !== 'jwt_vc_json-ld' && format !== 'mso_mdoc') {
30
- throw new DcqlError_1.DcqlError(`Unsupported credential format ${format}.`);
31
- }
32
- }
33
- const allRecords = [];
34
- const w3cCredentialRecords = formats.has('jwt_vc_json') || formats.has('jwt_vc_json-ld')
35
- ? await w3cCredentialRepository.getAll(agentContext)
36
- : [];
37
- allRecords.push(...w3cCredentialRecords);
38
- // query the wallet ourselves first to avoid the need to query the pex library for all
39
- // credentials for every proof request
40
- const mdocDoctypes = dcqlQuery.credentials
41
- .filter((credentialQuery) => credentialQuery.format === 'mso_mdoc')
42
- .map((c) => { var _a; return (_a = c.meta) === null || _a === void 0 ? void 0 : _a.doctype_value; });
43
- const allMdocCredentialQueriesSpecifyDoctype = mdocDoctypes.every((doctype) => doctype);
44
- const mdocApi = this.getMdocApi(agentContext);
45
- if (allMdocCredentialQueriesSpecifyDoctype) {
46
- const mdocRecords = await mdocApi.findAllByQuery({
47
- $or: mdocDoctypes.map((docType) => ({
48
- docType: docType,
49
- })),
50
- });
51
- allRecords.push(...mdocRecords);
52
- }
53
- else {
54
- const mdocRecords = await mdocApi.getAll();
55
- allRecords.push(...mdocRecords);
56
- }
57
- // query the wallet ourselves first to avoid the need to query the pex library for all
58
- // credentials for every proof request
59
- const sdJwtVctValues = dcqlQuery.credentials
60
- .filter((credentialQuery) => credentialQuery.format === 'vc+sd-jwt')
61
- .flatMap((c) => { var _a; return (_a = c.meta) === null || _a === void 0 ? void 0 : _a.vct_values; });
62
- const allSdJwtVcQueriesSpecifyDoctype = sdJwtVctValues.every((vct) => vct);
63
- const sdJwtVcApi = this.getSdJwtVcApi(agentContext);
64
- if (allSdJwtVcQueriesSpecifyDoctype) {
65
- const sdjwtVcRecords = await sdJwtVcApi.findAllByQuery({
66
- $or: sdJwtVctValues.map((vct) => ({
67
- vct: vct,
68
- })),
69
- });
70
- allRecords.push(...sdjwtVcRecords);
71
- }
72
- else {
73
- const sdJwtVcRecords = await sdJwtVcApi.getAll();
74
- allRecords.push(...sdJwtVcRecords);
75
- }
76
- return allRecords;
77
- }
78
- async getCredentialsForRequest(agentContext, dcqlQuery) {
79
- const credentialRecords = await this.queryCredentialsForDcqlQuery(agentContext, dcqlQuery);
80
- const dcqlCredentials = credentialRecords.map((record) => {
81
- if (record.type === 'MdocRecord') {
82
- return {
83
- credentialFormat: 'mso_mdoc',
84
- doctype: record.getTags().docType,
85
- namespaces: mdoc_1.Mdoc.fromBase64Url(record.base64Url).issuerSignedNamespaces,
86
- };
87
- }
88
- else if (record.type === 'SdJwtVcRecord') {
89
- return {
90
- credentialFormat: 'vc+sd-jwt',
91
- vct: record.getTags().vct,
92
- claims: this.getSdJwtVcApi(agentContext).fromCompact(record.compactSdJwtVc)
93
- .prettyClaims,
94
- };
95
- }
96
- else {
97
- // TODO:
98
- throw new DcqlError_1.DcqlError('W3C credentials are not supported yet');
99
- }
100
- });
101
- const queryResult = dcql_1.DcqlQuery.query(dcql_1.DcqlQuery.parse(dcqlQuery), dcqlCredentials);
102
- const matchesWithRecord = Object.fromEntries(Object.entries(queryResult.credential_matches).map(([credential_query_id, result]) => {
103
- return [credential_query_id, Object.assign(Object.assign({}, result), { record: credentialRecords[result.credential_index] })];
104
- }));
105
- return Object.assign(Object.assign({}, queryResult), { credential_matches: matchesWithRecord });
106
- }
107
- /**
108
- * Selects the credentials to use based on the output from `getCredentialsForRequest`
109
- * Use this method if you don't want to manually select the credentials yourself.
110
- */
111
- selectCredentialsForRequest(dcqlQueryResult) {
112
- if (!dcqlQueryResult.canBeSatisfied) {
113
- throw new DcqlError_1.DcqlError('Cannot select the credentials for the dcql query presentation if the request cannot be satisfied');
114
- }
115
- const credentials = {};
116
- if (dcqlQueryResult.credential_sets) {
117
- for (const credentialSet of dcqlQueryResult.credential_sets) {
118
- // undefined defaults to true
119
- if (credentialSet.required === false)
120
- continue;
121
- const firstFullFillableOption = credentialSet.options.find((option) => option.every((credential_id) => dcqlQueryResult.credential_matches[credential_id].success));
122
- if (!firstFullFillableOption) {
123
- throw new DcqlError_1.DcqlError('Invalid dcql query result. No option is fullfillable');
124
- }
125
- for (const credentialQueryId of firstFullFillableOption) {
126
- const credential = dcqlQueryResult.credential_matches[credentialQueryId];
127
- if (credential.success && credential.record.type === 'MdocRecord' && 'namespaces' in credential.output) {
128
- credentials[credentialQueryId] = {
129
- claimFormat: vc_1.ClaimFormat.MsoMdoc,
130
- credentialRecord: credential.record,
131
- disclosedPayload: credential.output.namespaces,
132
- };
133
- }
134
- else if (credential.success &&
135
- credential.record.type === 'SdJwtVcRecord' &&
136
- 'claims' in credential.output) {
137
- credentials[credentialQueryId] = {
138
- claimFormat: vc_1.ClaimFormat.SdJwtVc,
139
- credentialRecord: credential.record,
140
- disclosedPayload: credential.output.claims,
141
- };
142
- }
143
- else {
144
- throw new DcqlError_1.DcqlError('Invalid dcql query result. Cannot auto-select credentials');
145
- }
146
- }
147
- }
148
- }
149
- else {
150
- for (const credentialQuery of dcqlQueryResult.credentials) {
151
- const credential = dcqlQueryResult.credential_matches[credentialQuery.id];
152
- if (credential.success && credential.record.type === 'MdocRecord' && 'namespaces' in credential.output) {
153
- credentials[credentialQuery.id] = {
154
- claimFormat: vc_1.ClaimFormat.MsoMdoc,
155
- credentialRecord: credential.record,
156
- disclosedPayload: credential.output.namespaces,
157
- };
158
- }
159
- else if (credential.success && credential.record.type === 'SdJwtVcRecord' && 'claims' in credential.output) {
160
- credentials[credentialQuery.id] = {
161
- claimFormat: vc_1.ClaimFormat.SdJwtVc,
162
- credentialRecord: credential.record,
163
- disclosedPayload: credential.output.claims,
164
- };
165
- }
166
- else {
167
- throw new DcqlError_1.DcqlError('Invalid dcql query result. Cannot auto-select credentials');
168
- }
169
- }
170
- }
171
- return credentials;
172
- }
173
- validateDcqlQuery(dcqlQuery) {
174
- return dcql_1.DcqlQuery.parse(dcqlQuery);
175
- }
176
- // TODO: this IS WRONG
177
- createPresentationFrame(obj) {
178
- const frame = {};
179
- for (const [key, value] of Object.entries(obj)) {
180
- if (typeof value === 'object' && value !== null) {
181
- frame[key] = true;
182
- }
183
- else {
184
- frame[key] = !!value;
185
- }
186
- }
187
- return frame;
188
- }
189
- async createPresentation(agentContext, options) {
190
- const { domain, challenge, openid4vp } = options;
191
- const dcqlPresentation = {};
192
- const vcPresentationsToCreate = (0, utils_1.dcqlGetPresentationsToCreate)(options.credentialQueryToCredential);
193
- for (const [credentialQueryId, presentationToCreate] of Object.entries(vcPresentationsToCreate)) {
194
- if (presentationToCreate.claimFormat === vc_1.ClaimFormat.MsoMdoc) {
195
- const mdocRecord = presentationToCreate.credentialRecord;
196
- if (!openid4vp) {
197
- throw new DcqlError_1.DcqlError('Missing openid4vp options for creating MDOC presentation.');
198
- }
199
- if (!domain) {
200
- throw new DcqlError_1.DcqlError('Missing domain property for creating MDOC presentation.');
201
- }
202
- const { deviceResponseBase64Url } = await mdoc_1.MdocDeviceResponse.createOpenId4VpDcqlDeviceResponse(agentContext, {
203
- mdoc: mdoc_1.Mdoc.fromBase64Url(mdocRecord.base64Url),
204
- docRequest: {
205
- itemsRequestData: {
206
- docType: mdocRecord.getTags().docType,
207
- nameSpaces: Object.fromEntries(Object.entries(presentationToCreate.disclosedPayload).map(([key, value]) => {
208
- return [key, Object.fromEntries(Object.entries(value).map(([key]) => [key, true]))];
209
- })),
210
- },
211
- },
212
- sessionTranscriptOptions: Object.assign(Object.assign({}, openid4vp), { clientId: domain, verifierGeneratedNonce: challenge }),
213
- });
214
- dcqlPresentation[credentialQueryId] = mdoc_1.MdocDeviceResponse.fromBase64Url(deviceResponseBase64Url);
215
- }
216
- else if (presentationToCreate.claimFormat === vc_1.ClaimFormat.SdJwtVc) {
217
- const presentationFrame = this.createPresentationFrame(presentationToCreate.disclosedPayload);
218
- if (!domain) {
219
- throw new DcqlError_1.DcqlError('Missing domain property for creating SdJwtVc presentation.');
220
- }
221
- const sdJwtVcApi = this.getSdJwtVcApi(agentContext);
222
- const presentation = await sdJwtVcApi.present({
223
- compactSdJwtVc: presentationToCreate.credentialRecord.compactSdJwtVc,
224
- presentationFrame,
225
- verifierMetadata: {
226
- audience: domain,
227
- nonce: challenge,
228
- issuedAt: Math.floor(Date.now() / 1000),
229
- },
230
- });
231
- dcqlPresentation[credentialQueryId] = sdJwtVcApi.fromCompact(presentation);
232
- }
233
- else {
234
- throw new DcqlError_1.DcqlError('W3c Presentation are not yet supported in combination with DCQL.');
235
- }
236
- }
237
- return dcqlPresentation;
238
- }
239
- getEncodedPresentations(dcqlPresentation) {
240
- return Object.fromEntries(Object.entries(dcqlPresentation).map(([key, value]) => [key, value.encoded]));
241
- }
242
- getSdJwtVcApi(agentContext) {
243
- return agentContext.dependencyManager.resolve(sd_jwt_vc_1.SdJwtVcApi);
244
- }
245
- getMdocApi(agentContext) {
246
- return agentContext.dependencyManager.resolve(mdoc_1.MdocApi);
247
- }
248
- };
249
- exports.DcqlService = DcqlService;
250
- exports.DcqlService = DcqlService = __decorate([
251
- (0, tsyringe_1.injectable)()
252
- ], DcqlService);
253
- //# sourceMappingURL=DcqlService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DcqlService.js","sourceRoot":"","sources":["../../../src/modules/dcql/DcqlService.ts"],"names":[],"mappings":";;;;;;;;;AAEA,+BAA2F;AAC3F,uCAAqC;AAGrC,kCAA8G;AAC9G,4CAA4E;AAC5E,8BAAiF;AAEjF,2CAAuC;AAOvC,mCAAwF;AAExF;;GAEG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB;;;OAGG;IACK,KAAK,CAAC,4BAA4B,CACxC,YAA0B,EAC1B,SAA0B;QAE1B,MAAM,uBAAuB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,4BAAuB,CAAC,CAAA;QAE/F,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;QACnE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,aAAa,IAAI,MAAM,KAAK,gBAAgB,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;gBAC/G,MAAM,IAAI,qBAAS,CAAC,iCAAiC,MAA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AK,EAAE,SAAS;wBAChB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;qBACxC;iBACF,CAAC,CAAA;gBAEF,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;YAC5E,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,qBAAS,CAAC,kEAAkE,CAAC,CAAA;YACzF,CAAC;QACH,CAAC;QAED,OAAO,gBAAgB,CAAA;IACzB,CAAC;IAEM,uBAAuB,CAAC,gBAAkC;QAC/D,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACzG,CAAC;IAEO,aAAa,CAAC,YAA0B;QAC9C,OAAO,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,sBAAU,CAAC,CAAA;IAC3D,CAAC;IAEO,UAAU,CAAC,YAA0B;QAC3C,OAAO,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,cAAO,CAAC,CAAA;IACxD,CAAC;CACF,CAAA;AA5RY,kCAAW;sBAAX,WAAW;IADvB,IAAA,qBAAU,GAAE;GACA,WAAW,CA4RvB"}
@@ -1,5 +0,0 @@
1
- export * from './DcqlError';
2
- export * from './DcqlModule';
3
- export * from './DcqlService';
4
- export * from './utils';
5
- export * from './models';
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./DcqlError"), exports);
18
- __exportStar(require("./DcqlModule"), exports);
19
- __exportStar(require("./DcqlService"), exports);
20
- __exportStar(require("./utils"), exports);
21
- __exportStar(require("./models"), exports);
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/dcql/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,+CAA4B;AAC5B,gDAA6B;AAC7B,0CAAuB;AACvB,2CAAwB"}
@@ -1,20 +0,0 @@
1
- import type { JsonObject } from '../../../types';
2
- import type { MdocNameSpaces, MdocRecord } from '../../mdoc';
3
- import type { SdJwtVcRecord } from '../../sd-jwt-vc';
4
- import type { ClaimFormat, W3cCredentialRecord } from '../../vc';
5
- /**
6
- * Mapping of credential query IDs to the selected credential record and the disclosed payload.
7
- */
8
- export type DcqlCredentialsForRequest = Record<string, {
9
- claimFormat: ClaimFormat.MsoMdoc;
10
- credentialRecord: MdocRecord;
11
- disclosedPayload: MdocNameSpaces;
12
- } | {
13
- claimFormat: ClaimFormat.SdJwtVc;
14
- credentialRecord: SdJwtVcRecord;
15
- disclosedPayload: JsonObject;
16
- } | {
17
- claimFormat: ClaimFormat.JwtVc | ClaimFormat.LdpVc;
18
- credentialRecord: W3cCredentialRecord;
19
- disclosedPayload: JsonObject;
20
- }>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=DcqlCredentialsForRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DcqlCredentialsForRequest.js","sourceRoot":"","sources":["../../../../src/modules/dcql/models/DcqlCredentialsForRequest.ts"],"names":[],"mappings":""}
@@ -1,20 +0,0 @@
1
- export * from './DcqlCredentialsForRequest';
2
- import type { VerifiablePresentation } from '../../dif-presentation-exchange';
3
- import type { MdocRecord } from '../../mdoc';
4
- import type { SdJwtVcRecord } from '../../sd-jwt-vc';
5
- import type { W3cCredentialRecord } from '../../vc';
6
- import type { DcqlQueryResult as _DcqlQueryResult, DcqlQuery as _DcqlQuery, DcqlCredential as _DcqlCredential, DcqlMdocCredential as _DcqlMdocCredential, DcqlW3cVcCredential as _DcqlW3cVcCredential, DcqlSdJwtVcCredential as _DcqlSdJwtVcCredential, DcqlPresentation as _DcqlPresentation, DcqlPresentationResult as _DcqlPresentationResult } from 'dcql';
7
- export type DcqlQuery = _DcqlQuery.Input;
8
- export type DcqlCredential = _DcqlCredential.Model['Input'];
9
- export type DcqlMdocCredential = _DcqlMdocCredential.Model['Input'];
10
- export type DcqlSdJwtVcCredential = _DcqlSdJwtVcCredential.Model['Input'];
11
- export type DcqlW3cVcCredential = _DcqlW3cVcCredential.Model['Input'];
12
- export type DcqlMatchWithRecord = {
13
- record: W3cCredentialRecord | SdJwtVcRecord | MdocRecord;
14
- } & _DcqlQueryResult['credential_matches'][number];
15
- export type DcqlQueryResult = Omit<_DcqlQueryResult.Input, 'credential_matches'> & {
16
- credential_matches: Record<string, DcqlMatchWithRecord>;
17
- };
18
- export type DcqlEncodedPresentations = _DcqlPresentation.Input;
19
- export type DcqlPresentation = Record<string, VerifiablePresentation>;
20
- export type DcqlPresentationResult = _DcqlPresentationResult.Input;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./DcqlCredentialsForRequest"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dcql/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C"}
@@ -1,31 +0,0 @@
1
- import type { SdJwtVcRecord } from '../../sd-jwt-vc';
2
- import type { DcqlCredentialsForRequest } from '../models';
3
- import type { DcqlSdJwtVcCredential, DcqlMdocCredential, DcqlW3cVcCredential } from 'dcql';
4
- import { MdocRecord } from '../../mdoc';
5
- import { W3cCredentialRecord, ClaimFormat } from '../../vc';
6
- export interface DcqlSdJwtVcPresentationToCreate {
7
- claimFormat: ClaimFormat.SdJwtVc;
8
- subjectIds: [];
9
- credentialRecord: SdJwtVcRecord;
10
- disclosedPayload: DcqlSdJwtVcCredential.Claims;
11
- }
12
- export interface DcqlJwtVpPresentationToCreate {
13
- claimFormat: ClaimFormat.JwtVp;
14
- subjectIds: [string];
15
- credentialRecord: W3cCredentialRecord;
16
- disclosedPayload: DcqlW3cVcCredential.Claims;
17
- }
18
- export interface DcqlLdpVpPresentationToCreate {
19
- claimFormat: ClaimFormat.LdpVp;
20
- subjectIds: undefined | [string];
21
- credentialRecord: W3cCredentialRecord;
22
- disclosedPayload: DcqlW3cVcCredential.Claims;
23
- }
24
- export interface DcqlMdocPresentationToCreate {
25
- claimFormat: ClaimFormat.MsoMdoc;
26
- subjectIds: [];
27
- credentialRecord: MdocRecord;
28
- disclosedPayload: DcqlMdocCredential.NameSpaces;
29
- }
30
- export type DcqlPresentationToCreate = Record<string, DcqlSdJwtVcPresentationToCreate | DcqlJwtVpPresentationToCreate | DcqlLdpVpPresentationToCreate | DcqlMdocPresentationToCreate>;
31
- export declare function dcqlGetPresentationsToCreate(credentialsForInputDescriptor: DcqlCredentialsForRequest): DcqlPresentationToCreate;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dcqlGetPresentationsToCreate = dcqlGetPresentationsToCreate;
4
- const mdoc_1 = require("../../mdoc");
5
- const vc_1 = require("../../vc");
6
- function dcqlGetPresentationsToCreate(credentialsForInputDescriptor) {
7
- const presentationsToCreate = {};
8
- for (const [credentialQueryId, match] of Object.entries(credentialsForInputDescriptor)) {
9
- if (match.credentialRecord instanceof vc_1.W3cCredentialRecord) {
10
- presentationsToCreate[credentialQueryId] = {
11
- claimFormat: match.credentialRecord.credential.claimFormat === vc_1.ClaimFormat.JwtVc ? vc_1.ClaimFormat.JwtVp : vc_1.ClaimFormat.LdpVp,
12
- subjectIds: [match.credentialRecord.credential.credentialSubjectIds[0]],
13
- credentialRecord: match.credentialRecord,
14
- disclosedPayload: match.disclosedPayload,
15
- };
16
- }
17
- else if (match.credentialRecord instanceof mdoc_1.MdocRecord) {
18
- presentationsToCreate[credentialQueryId] = {
19
- claimFormat: vc_1.ClaimFormat.MsoMdoc,
20
- subjectIds: [],
21
- credentialRecord: match.credentialRecord,
22
- disclosedPayload: match.disclosedPayload,
23
- };
24
- }
25
- else {
26
- presentationsToCreate[credentialQueryId] = {
27
- claimFormat: vc_1.ClaimFormat.SdJwtVc,
28
- subjectIds: [],
29
- credentialRecord: match.credentialRecord,
30
- disclosedPayload: match.disclosedPayload,
31
- };
32
- }
33
- }
34
- return presentationsToCreate;
35
- }
36
- //# sourceMappingURL=DcqlPresentationsToCreate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DcqlPresentationsToCreate.js","sourceRoot":"","sources":["../../../../src/modules/dc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;IACH,CAAC;IAED,OAAO,qBAAqB,CAAA;AAC9B,CAAC"}
@@ -1 +0,0 @@
1
- export * from './DcqlPresentationsToCreate';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./DcqlPresentationsToCreate"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dcql/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C"}
@@ -1 +0,0 @@
1
- export declare function nameSpacesRecordToMap<NamespaceValue extends unknown, NameSpaces extends Record<string, Record<string, NamespaceValue>>>(nameSpaces: NameSpaces): Map<string, Map<string, NamespaceValue>>;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nameSpacesRecordToMap = nameSpacesRecordToMap;
4
- function nameSpacesRecordToMap(nameSpaces) {
5
- return new Map(Object.entries(nameSpaces).map(([key, value]) => [key, new Map(Object.entries(value))]));
6
- }
7
- //# sourceMappingURL=mdocUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mdocUtil.js","sourceRoot":"","sources":["../../../src/modules/mdoc/mdocUtil.ts"],"names":[],"mappings":";;AAAA,sDAMC;AAND,SAAgB,qBAAqB,CAInC,UAAsB;IACtB,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAU,CAAC,CAAC,CAAA;AAClH,CAAC"}
@@ -1,5 +0,0 @@
1
- type DisclosureFrame = {
2
- [key: string]: boolean | DisclosureFrame;
3
- };
4
- export declare function buildDisclosureFrameFromPayload(input: Record<string, unknown>): DisclosureFrame | null;
5
- export {};
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildDisclosureFrameFromPayload = buildDisclosureFrameFromPayload;
4
- function buildDisclosureFrameFromPayload(input) {
5
- var _a;
6
- // Handle objects recursively
7
- const result = {};
8
- // Base case: input is null or undefined
9
- if (input === null || input === undefined) {
10
- return result;
11
- }
12
- for (const [key, value] of Object.entries(input)) {
13
- // Ignore non-value values
14
- if (value === null || value === undefined)
15
- continue;
16
- if (typeof value === 'object') {
17
- if (Array.isArray(value)) {
18
- // TODO: Array disclosure frames are not yet supported - treating entire array as disclosed
19
- result[key] = true;
20
- }
21
- else {
22
- result[key] = (_a = buildDisclosureFrameFromPayload(value)) !== null && _a !== void 0 ? _a : false;
23
- }
24
- }
25
- else {
26
- // Handle primitive values
27
- result[key] = true;
28
- }
29
- }
30
- return Object.keys(result).length > 0 ? result : null;
31
- }
32
- //# sourceMappingURL=disclosureFrame.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"disclosureFrame.js","sourceRoot":"","sources":["../../../src/modules/sd-jwt-vc/disclosureFrame.ts"],"names":[],"mappings":";;AAIA,0EA2BC;AA3BD,SAAgB,+BAA+B,CAAC,KAA8B;;IAC5E,6BAA6B;IAC7B,MAAM,MAAM,GAAoB,EAAE,CAAA;IAElC,wCAAwC;IACxC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,0BAA0B;QAC1B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;YAAE,SAAQ;QAEnD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,2FAA2F;gBAC3F,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;YACpB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,CAAC,GAAG,MAAA,+BAA+B,CAAC,KAAgC,CAAC,mCAAI,KAAK,CAAA;YAC1F,CAAC;QACH,CAAC;aAAM,CAAC;YACN,0BAA0B;YAC1B,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;QACpB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;AACvD,CAAC"}