@credo-ts/core 0.6.0-pr-2100-20241121224938 → 0.6.0-pr-2102-20241122194127

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 (46) 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/models/DifPexCredentialsForRequest.d.ts +2 -3
  8. package/build/modules/mdoc/Mdoc.d.ts +3 -5
  9. package/build/modules/mdoc/Mdoc.js +9 -7
  10. package/build/modules/mdoc/Mdoc.js.map +1 -1
  11. package/build/modules/mdoc/MdocDeviceResponse.d.ts +1 -7
  12. package/build/modules/mdoc/MdocDeviceResponse.js +6 -23
  13. package/build/modules/mdoc/MdocDeviceResponse.js.map +1 -1
  14. package/build/modules/mdoc/MdocOptions.d.ts +4 -18
  15. package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts +0 -1
  16. package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts +0 -3
  17. package/build/modules/sd-jwt-vc/SdJwtVcService.js +0 -3
  18. package/build/modules/sd-jwt-vc/SdJwtVcService.js.map +1 -1
  19. package/build/modules/sd-jwt-vc/decodeSdJwtVc.d.ts +7 -2
  20. package/build/modules/sd-jwt-vc/decodeSdJwtVc.js +0 -2
  21. package/build/modules/sd-jwt-vc/decodeSdJwtVc.js.map +1 -1
  22. package/package.json +2 -3
  23. package/build/modules/dcql/DcqlError.d.ts +0 -8
  24. package/build/modules/dcql/DcqlError.js +0 -12
  25. package/build/modules/dcql/DcqlError.js.map +0 -1
  26. package/build/modules/dcql/DcqlModule.d.ts +0 -10
  27. package/build/modules/dcql/DcqlModule.js +0 -23
  28. package/build/modules/dcql/DcqlModule.js.map +0 -1
  29. package/build/modules/dcql/DcqlService.d.ts +0 -140
  30. package/build/modules/dcql/DcqlService.js +0 -228
  31. package/build/modules/dcql/DcqlService.js.map +0 -1
  32. package/build/modules/dcql/index.d.ts +0 -5
  33. package/build/modules/dcql/index.js +0 -22
  34. package/build/modules/dcql/index.js.map +0 -1
  35. package/build/modules/dcql/models/DcqlCredentialsForRequest.d.ts +0 -15
  36. package/build/modules/dcql/models/DcqlCredentialsForRequest.js +0 -3
  37. package/build/modules/dcql/models/DcqlCredentialsForRequest.js.map +0 -1
  38. package/build/modules/dcql/models/index.d.ts +0 -15
  39. package/build/modules/dcql/models/index.js +0 -18
  40. package/build/modules/dcql/models/index.js.map +0 -1
  41. package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.ts +0 -31
  42. package/build/modules/dcql/utils/DcqlPresentationsToCreate.js +0 -36
  43. package/build/modules/dcql/utils/DcqlPresentationsToCreate.js.map +0 -1
  44. package/build/modules/dcql/utils/index.d.ts +0 -1
  45. package/build/modules/dcql/utils/index.js +0 -18
  46. package/build/modules/dcql/utils/index.js.map +0 -1
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DcqlModule = void 0;
4
- const AgentConfig_1 = require("../../agent/AgentConfig");
5
- const DcqlService_1 = require("./DcqlService");
6
- /**
7
- * @public
8
- */
9
- class DcqlModule {
10
- /**
11
- * Registers the dependencies of the presentation-exchange module on the dependency manager.
12
- */
13
- register(dependencyManager) {
14
- // Warn about experimental module
15
- dependencyManager
16
- .resolve(AgentConfig_1.AgentConfig)
17
- .logger.warn("The 'DcqlModule' module is experimental and could have unexpected breaking changes. When using this module, make sure to use strict versions for all @credo-ts packages.");
18
- // service
19
- dependencyManager.registerSingleton(DcqlService_1.DcqlService);
20
- }
21
- }
22
- exports.DcqlModule = DcqlModule;
23
- //# sourceMappingURL=DcqlModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DcqlModule.js","sourceRoot":"","sources":["../../../src/modules/dcql/DcqlModule.ts"],"names":[],"mappings":";;;AAEA,yDAAqD;AAErD,+CAA2C;AAE3C;;GAEG;AACH,MAAa,UAAU;IACrB;;OAEG;IACI,QAAQ,CAAC,iBAAoC;QAClD,iCAAiC;QACjC,iBAAiB;aACd,OAAO,CAAC,yBAAW,CAAC;aACpB,MAAM,CAAC,IAAI,CACV,0KAA0K,CAC3K,CAAA;QAEH,UAAU;QACV,iBAAiB,CAAC,iBAAiB,CAAC,yBAAW,CAAC,CAAA;IAClD,CAAC;CACF;AAfD,gCAeC"}
@@ -1,140 +0,0 @@
1
- import type { AgentContext } from '../../agent';
2
- import { DcqlQuery } from 'dcql';
3
- import { MdocOpenId4VpSessionTranscriptOptions } from '../mdoc';
4
- import { DcqlQueryResult, DcqlCredentialsForRequest, DcqlPresentationRecord } from './models';
5
- /**
6
- * @todo create a public api for using dif presentation exchange
7
- */
8
- export declare class DcqlService {
9
- /**
10
- * Queries the wallet for credentials that match the given presentation definition. This only does an initial query based on the
11
- * schema of the input descriptors. It does not do any further filtering based on the constraints in the input descriptors.
12
- */
13
- private queryCredentialForPresentationDefinition;
14
- getCredentialsForRequest(agentContext: AgentContext, dcqlQuery: DcqlQuery): Promise<DcqlQueryResult>;
15
- /**
16
- * Selects the credentials to use based on the output from `getCredentialsForRequest`
17
- * Use this method if you don't want to manually select the credentials yourself.
18
- */
19
- selectCredentialsForRequest(dcqlQueryResult: DcqlQueryResult): DcqlCredentialsForRequest;
20
- validateDcqlQuery(dcqlQuery: DcqlQuery.Input | DcqlQuery): {
21
- credentials: [{
22
- id: string;
23
- format: "mso_mdoc";
24
- claim_sets?: [string[], ...string[][]] | undefined;
25
- claims?: [{
26
- namespace: string;
27
- claim_name: string;
28
- values?: (string | number | boolean)[] | undefined;
29
- id?: string | undefined;
30
- }, ...{
31
- namespace: string;
32
- claim_name: string;
33
- values?: (string | number | boolean)[] | undefined;
34
- id?: string | undefined;
35
- }[]] | undefined;
36
- meta?: {
37
- doctype_value?: string | undefined;
38
- } | undefined;
39
- } | {
40
- id: string;
41
- format: "vc+sd-jwt";
42
- claim_sets?: [string[], ...string[][]] | undefined;
43
- claims?: [{
44
- path: (string | number | null)[];
45
- values?: (string | number | boolean)[] | undefined;
46
- id?: string | undefined;
47
- }, ...{
48
- path: (string | number | null)[];
49
- values?: (string | number | boolean)[] | undefined;
50
- id?: string | undefined;
51
- }[]] | undefined;
52
- meta?: {
53
- vct_values?: string[] | undefined;
54
- } | undefined;
55
- } | {
56
- id: string;
57
- format: "jwt_vc_json" | "jwt_vc_json-ld";
58
- claim_sets?: [string[], ...string[][]] | undefined;
59
- claims?: [{
60
- path: (string | number | null)[];
61
- values?: (string | number | boolean)[] | undefined;
62
- id?: string | undefined;
63
- }, ...{
64
- path: (string | number | null)[];
65
- values?: (string | number | boolean)[] | undefined;
66
- id?: string | undefined;
67
- }[]] | undefined;
68
- }, ...({
69
- id: string;
70
- format: "mso_mdoc";
71
- claim_sets?: [string[], ...string[][]] | undefined;
72
- claims?: [{
73
- namespace: string;
74
- claim_name: string;
75
- values?: (string | number | boolean)[] | undefined;
76
- id?: string | undefined;
77
- }, ...{
78
- namespace: string;
79
- claim_name: string;
80
- values?: (string | number | boolean)[] | undefined;
81
- id?: string | undefined;
82
- }[]] | undefined;
83
- meta?: {
84
- doctype_value?: string | undefined;
85
- } | undefined;
86
- } | {
87
- id: string;
88
- format: "vc+sd-jwt";
89
- claim_sets?: [string[], ...string[][]] | undefined;
90
- claims?: [{
91
- path: (string | number | null)[];
92
- values?: (string | number | boolean)[] | undefined;
93
- id?: string | undefined;
94
- }, ...{
95
- path: (string | number | null)[];
96
- values?: (string | number | boolean)[] | undefined;
97
- id?: string | undefined;
98
- }[]] | undefined;
99
- meta?: {
100
- vct_values?: string[] | undefined;
101
- } | undefined;
102
- } | {
103
- id: string;
104
- format: "jwt_vc_json" | "jwt_vc_json-ld";
105
- claim_sets?: [string[], ...string[][]] | undefined;
106
- claims?: [{
107
- path: (string | number | null)[];
108
- values?: (string | number | boolean)[] | undefined;
109
- id?: string | undefined;
110
- }, ...{
111
- path: (string | number | null)[];
112
- values?: (string | number | boolean)[] | undefined;
113
- id?: string | undefined;
114
- }[]] | undefined;
115
- })[]];
116
- credential_sets?: [{
117
- options: [string[], ...string[][]];
118
- required: boolean;
119
- purpose?: string | number | {
120
- [x: string]: unknown;
121
- } | undefined;
122
- }, ...{
123
- options: [string[], ...string[][]];
124
- required: boolean;
125
- purpose?: string | number | {
126
- [x: string]: unknown;
127
- } | undefined;
128
- }[]] | undefined;
129
- };
130
- private createPresentationFrame;
131
- createPresentationRecord(agentContext: AgentContext, options: {
132
- credentialQueryToCredential: DcqlCredentialsForRequest;
133
- challenge: string;
134
- domain?: string;
135
- openid4vp?: Omit<MdocOpenId4VpSessionTranscriptOptions, 'verifierGeneratedNonce' | 'clientId'>;
136
- }): Promise<DcqlPresentationRecord>;
137
- getEncodedPresentationRecord(presentationRecord: DcqlPresentationRecord): Promise<any>;
138
- private getSdJwtVcApi;
139
- private getMdocApi;
140
- }
@@ -1,228 +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 queryCredentialForPresentationDefinition(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
- // query the wallet ourselves first to avoid the need to query the pex library for all
35
- // credentials for every proof request
36
- const w3cCredentialRecords = formats.has('jwt_vc_json') || formats.has('jwt_vc_json-ld')
37
- ? await w3cCredentialRepository.getAll(agentContext)
38
- : [];
39
- allRecords.push(...w3cCredentialRecords);
40
- const sdJwtVcApi = this.getSdJwtVcApi(agentContext);
41
- const sdJwtVcRecords = formats.has('vc+sd-jwt') ? await sdJwtVcApi.getAll() : [];
42
- allRecords.push(...sdJwtVcRecords);
43
- const mdocApi = this.getMdocApi(agentContext);
44
- const mdocRecords = formats.has('mso_mdoc') ? await mdocApi.getAll() : [];
45
- allRecords.push(...mdocRecords);
46
- return allRecords;
47
- }
48
- async getCredentialsForRequest(agentContext, dcqlQuery) {
49
- const credentialRecords = await this.queryCredentialForPresentationDefinition(agentContext, dcqlQuery);
50
- const mappedCredentials = credentialRecords.map((record) => {
51
- if (record.type === 'MdocRecord') {
52
- return {
53
- docType: record.getTags().docType,
54
- namespaces: mdoc_1.Mdoc.fromBase64Url(record.base64Url).issuerSignedNamespaces,
55
- };
56
- }
57
- else if (record.type === 'SdJwtVcRecord') {
58
- return {
59
- vct: record.getTags().vct,
60
- claims: this.getSdJwtVcApi(agentContext).fromCompact(record.compactSdJwtVc)
61
- .prettyClaims,
62
- };
63
- }
64
- else {
65
- // TODO:
66
- throw new DcqlError_1.DcqlError('W3C credentials are not supported yet');
67
- }
68
- });
69
- const queryResult = dcql_1.DcqlQuery.query(dcqlQuery, mappedCredentials);
70
- const matchesWithRecord = Object.fromEntries(Object.entries(queryResult.credential_matches).map(([credential_query_id, result]) => {
71
- return [credential_query_id, Object.assign(Object.assign({}, result), { record: credentialRecords[result.credential_index] })];
72
- }));
73
- return Object.assign(Object.assign({}, queryResult), { credential_matches: matchesWithRecord });
74
- }
75
- /**
76
- * Selects the credentials to use based on the output from `getCredentialsForRequest`
77
- * Use this method if you don't want to manually select the credentials yourself.
78
- */
79
- selectCredentialsForRequest(dcqlQueryResult) {
80
- if (!dcqlQueryResult.canBeSatisfied) {
81
- throw new DcqlError_1.DcqlError('Cannot select the credentials for the dcql query presentation if the request cannot be satisfied');
82
- }
83
- const credentials = {};
84
- if (dcqlQueryResult.credential_sets) {
85
- for (const credentialSet of dcqlQueryResult.credential_sets) {
86
- // undefined defaults to true
87
- if (credentialSet.required === false)
88
- continue;
89
- const firstFullFillableOption = credentialSet.options.find((option) => option.every((credential_id) => dcqlQueryResult.credential_matches[credential_id].success));
90
- if (!firstFullFillableOption) {
91
- throw new DcqlError_1.DcqlError('Invalid dcql query result. No option is fullfillable');
92
- }
93
- for (const credentialQueryId of firstFullFillableOption) {
94
- const credential = dcqlQueryResult.credential_matches[credentialQueryId];
95
- if (credential.success && credential.record.type === 'MdocRecord' && 'namespaces' in credential.output) {
96
- credentials[credentialQueryId] = {
97
- credentialRecord: credential.record,
98
- disclosedPayload: credential.output.namespaces,
99
- };
100
- }
101
- else if (credential.success && credential.record.type !== 'MdocRecord' && 'claims' in credential.output) {
102
- credentials[credentialQueryId] = {
103
- credentialRecord: credential.record,
104
- disclosedPayload: credential.output.claims,
105
- };
106
- }
107
- else {
108
- throw new DcqlError_1.DcqlError('Invalid dcql query result. Cannot auto-select credentials');
109
- }
110
- }
111
- }
112
- }
113
- else {
114
- for (const credentialQuery of dcqlQueryResult.credentials) {
115
- const credential = dcqlQueryResult.credential_matches[credentialQuery.id];
116
- if (credential.success && credential.record.type === 'MdocRecord' && 'namespaces' in credential.output) {
117
- credentials[credentialQuery.id] = {
118
- credentialRecord: credential.record,
119
- disclosedPayload: credential.output.namespaces,
120
- };
121
- }
122
- else if (credential.success && credential.record.type !== 'MdocRecord' && 'claims' in credential.output) {
123
- credentials[credentialQuery.id] = {
124
- credentialRecord: credential.record,
125
- disclosedPayload: credential.output.claims,
126
- };
127
- }
128
- else {
129
- throw new DcqlError_1.DcqlError('Invalid dcql query result. Cannot auto-select credentials');
130
- }
131
- }
132
- }
133
- return credentials;
134
- }
135
- validateDcqlQuery(dcqlQuery) {
136
- return dcql_1.DcqlQuery.parse(dcqlQuery);
137
- }
138
- // TODO: this IS WRONG
139
- createPresentationFrame(obj) {
140
- const frame = {};
141
- for (const [key, value] of Object.entries(obj)) {
142
- if (typeof value === 'object' && value !== null) {
143
- frame[key] = true;
144
- }
145
- else {
146
- frame[key] = !!value;
147
- }
148
- }
149
- return frame;
150
- }
151
- async createPresentationRecord(agentContext, options) {
152
- const { domain, challenge, openid4vp } = options;
153
- const presentationRecord = {};
154
- const presentationsToCreate = (0, utils_1.dcqlGetPresentationsToCreate)(options.credentialQueryToCredential);
155
- for (const [credentialQueryId, presentationToCreate] of Object.entries(presentationsToCreate)) {
156
- if (presentationToCreate.claimFormat === vc_1.ClaimFormat.MsoMdoc) {
157
- const mdocRecord = presentationToCreate.credentialRecord;
158
- if (!openid4vp) {
159
- throw new DcqlError_1.DcqlError('Missing openid4vp options for creating MDOC presentation.');
160
- }
161
- if (!domain) {
162
- throw new DcqlError_1.DcqlError('Missing domain property for creating MDOC presentation.');
163
- }
164
- const { deviceResponseBase64Url } = await mdoc_1.MdocDeviceResponse.createOpenId4VpDcqlDeviceResponse(agentContext, {
165
- mdoc: mdoc_1.Mdoc.fromBase64Url(mdocRecord.base64Url),
166
- docRequest: {
167
- itemsRequestData: {
168
- docType: mdocRecord.getTags().docType,
169
- nameSpaces: Object.fromEntries(Object.entries(presentationToCreate.disclosedPayload).map(([key, value]) => {
170
- return [key, Object.fromEntries(Object.entries(value).map(([key]) => [key, true]))];
171
- })),
172
- },
173
- },
174
- sessionTranscriptOptions: Object.assign(Object.assign({}, openid4vp), { clientId: domain, verifierGeneratedNonce: challenge }),
175
- });
176
- presentationRecord[credentialQueryId] = mdoc_1.MdocDeviceResponse.fromBase64Url(deviceResponseBase64Url);
177
- }
178
- else if (presentationToCreate.claimFormat === vc_1.ClaimFormat.SdJwtVc) {
179
- const presentationFrame = this.createPresentationFrame(presentationToCreate.disclosedPayload);
180
- if (!domain) {
181
- throw new DcqlError_1.DcqlError('Missing domain property for creating SdJwtVc presentation.');
182
- }
183
- const sdJwtVcApi = this.getSdJwtVcApi(agentContext);
184
- const presentation = await sdJwtVcApi.present({
185
- compactSdJwtVc: presentationToCreate.credentialRecord.compactSdJwtVc,
186
- presentationFrame,
187
- verifierMetadata: {
188
- audience: domain,
189
- nonce: challenge,
190
- issuedAt: Math.floor(Date.now() / 1000),
191
- },
192
- });
193
- presentationRecord[credentialQueryId] = sdJwtVcApi.fromCompact(presentation);
194
- }
195
- else {
196
- throw new DcqlError_1.DcqlError('Only MDOC presentations are supported');
197
- }
198
- }
199
- return presentationRecord;
200
- }
201
- async getEncodedPresentationRecord(presentationRecord) {
202
- return Object.fromEntries(Object.entries(presentationRecord).map(([key, value]) => {
203
- if (value instanceof mdoc_1.MdocDeviceResponse) {
204
- return [key, value.base64Url];
205
- }
206
- else if (value instanceof vc_1.W3cJsonLdVerifiablePresentation) {
207
- return [key, value.toJson()];
208
- }
209
- else if (value instanceof vc_1.W3cJwtVerifiablePresentation) {
210
- return [key, value.encoded];
211
- }
212
- else {
213
- return [key, value.compact];
214
- }
215
- }));
216
- }
217
- getSdJwtVcApi(agentContext) {
218
- return agentContext.dependencyManager.resolve(sd_jwt_vc_1.SdJwtVcApi);
219
- }
220
- getMdocApi(agentContext) {
221
- return agentContext.dependencyManager.resolve(mdoc_1.MdocApi);
222
- }
223
- };
224
- exports.DcqlService = DcqlService;
225
- exports.DcqlService = DcqlService = __decorate([
226
- (0, tsyringe_1.injectable)()
227
- ], DcqlService);
228
- //# sourceMappingURL=DcqlService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DcqlService.js","sourceRoot":"","sources":["../../../src/modules/dcql/DcqlService.ts"],"names":[],"mappings":";;;;;;;;;AAEA,+BAAiH;AACjH,uCAAqC;AAGrC,kCAA8G;AAC9G,4CAA4E;AAC5E,8BAMc;AAEd,2CAAuC;AAEvC,mCAAsD;AAEtD;;GAEG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB;;;OAGG;IACK,KAAK,CAAC,wCAAwC,CACpD,YAA0B,EAC1B,SAAoB;QAEpB,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,MAAM,GAAG,CAAC,CAAA;YACjE,CAAC;QACH,CAAC;QAED,MAAM,UAAU,GAA4D,EAAE,CAAA;QAE9E,sFAAsF;QACtF,sCAAsC;QACtC,MAAM,oBAAoB,GACxB,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;YACzD,CAAC,CAAC,MAAM,uBAAuB,CAAC,MAAM,CAAC,YAAY,CAAC;YACpD,CAAC,CAAC,EAAE,CAAA;Q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AK,CAAC,EAAE,EAAE;YACtD,IAAI,KAAK,YAAY,yBAAkB,EAAE,CAAC;gBACxC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;YAC/B,CAAC;iBAAM,IAAI,KAAK,YAAY,oCAA+B,EAAE,CAAC;gBAC5D,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;YAC9B,CAAC;iBAAM,IAAI,KAAK,YAAY,iCAA4B,EAAE,CAAC;gBACzD,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;YAC7B,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;YAC7B,CAAC;QACH,CAAC,CAAC,CACH,CAAA;IACH,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;AA5PY,kCAAW;sBAAX,WAAW;IADvB,IAAA,qBAAU,GAAE;GACA,WAAW,CA4PvB"}
@@ -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,15 +0,0 @@
1
- import type { JsonObject } from '../../../types';
2
- import type { MdocRecord } from '../../mdoc';
3
- import type { SdJwtVcRecord } from '../../sd-jwt-vc';
4
- import type { W3cCredentialRecord } from '../../vc';
5
- import type { MdocNameSpaces } from '@animo-id/mdoc';
6
- /**
7
- * Mapping of credential query IDs to the selected credential record and the disclosed payload.
8
- */
9
- export type DcqlCredentialsForRequest = Record<string, {
10
- credentialRecord: MdocRecord;
11
- disclosedPayload: MdocNameSpaces;
12
- } | {
13
- credentialRecord: W3cCredentialRecord | SdJwtVcRecord;
14
- disclosedPayload: JsonObject;
15
- }>;
@@ -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,15 +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 InternalDcqlQueryResult, DcqlPresentationRecord as _DcqlPresentationRecord } from 'dcql';
7
- export type { DcqlQuery, DcqlCredentialRepresentation, DcqlMdocRepresentation, DcqlSdJwtVcRepresentation } from 'dcql';
8
- export type DcqlMatchWithRecord = InternalDcqlQueryResult.CredentialMatch & {
9
- record: W3cCredentialRecord | SdJwtVcRecord | MdocRecord;
10
- };
11
- export type DcqlQueryResult = Omit<InternalDcqlQueryResult, 'credential_matches'> & {
12
- credential_matches: Record<string, DcqlMatchWithRecord>;
13
- };
14
- export type DcqlEncodedPresentationRecord = _DcqlPresentationRecord;
15
- export type DcqlPresentationRecord = Record<string, VerifiablePresentation>;
@@ -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 { DcqlSdJwtVcRepresentation, DcqlW3cVcRepresentation, DcqlMdocRepresentation } 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: DcqlSdJwtVcRepresentation.Claims;
11
- }
12
- export interface DcqlJwtVpPresentationToCreate {
13
- claimFormat: ClaimFormat.JwtVp;
14
- subjectIds: [string];
15
- credentialRecord: W3cCredentialRecord;
16
- disclosedPayload: DcqlW3cVcRepresentation.Claims;
17
- }
18
- export interface DcqlLdpVpPresentationToCreate {
19
- claimFormat: ClaimFormat.LdpVp;
20
- subjectIds: undefined | [string];
21
- credentialRecord: W3cCredentialRecord;
22
- disclosedPayload: DcqlW3cVcRepresentation.Claims;
23
- }
24
- export interface DcqlMdocPresentationToCreate {
25
- claimFormat: ClaimFormat.MsoMdoc;
26
- subjectIds: [];
27
- credentialRecord: MdocRecord;
28
- disclosedPayload: DcqlMdocRepresentation.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/dcql/utils/DcqlPresentationsToCreate.ts"],"names":[],"mappings":";;AA8CA,oEA+BC;AAzED,qCAAuC;AACvC,iCAA2D;AAyC3D,SAAgB,4BAA4B,CAC1C,6BAAwD;IAExD,MAAM,qBAAqB,GAA6B,EAAE,CAAA;IAC1D,KAAK,MAAM,CAAC,iBAAiB,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,6BAA6B,CAAC,EAAE,CAAC;QACvF,IAAI,KAAK,CAAC,gBAAgB,YAAY,wBAAmB,EAAE,CAAC;YAC1D,qBAAqB,CAAC,iBAAiB,CAAC,GAAG;gBACzC,WAAW,EACT,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,WAAW,KAAK,gBAAW,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAW,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAW,CAAC,KAAK;gBAC7G,UAAU,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;gBACvE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,gBAAgB,EAAE,KAAK,CAAC,gBAAkD;aAC3E,CAAA;QACH,CAAC;aAAM,IAAI,KAAK,CAAC,gBAAgB,YAAY,iBAAU,EAAE,CAAC;YACxD,qBAAqB,CAAC,iBAAiB,CAAC,GAAG;gBACzC,WAAW,EAAE,gBAAW,CAAC,OAAO;gBAChC,UAAU,EAAE,EAAE;gBACd,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,gBAAgB,EAAE,KAAK,CAAC,gBAAqD;aAC9E,CAAA;QACH,CAAC;aAAM,CAAC;YACN,qBAAqB,CAAC,iBAAiB,CAAC,GAAG;gBACzC,WAAW,EAAE,gBAAW,CAAC,OAAO;gBAChC,UAAU,EAAE,EAAE;gBACd,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,gBAAgB,EAAE,KAAK,CAAC,gBAAkD;aAC3E,CAAA;QACH,CAAC;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"}