dcql 0.2.11 → 0.2.13
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/dist/src/dcql-error/e-base.d.ts.map +1 -0
- package/dist/src/dcql-error/e-base.js.map +1 -0
- package/dist/src/{e-dcql.d.ts → dcql-error/e-dcql.d.ts} +12 -0
- package/dist/src/dcql-error/e-dcql.d.ts.map +1 -0
- package/dist/src/{e-dcql.js → dcql-error/e-dcql.js} +14 -2
- package/dist/src/dcql-error/e-dcql.js.map +1 -0
- package/dist/src/dcql-error/index.d.ts +3 -0
- package/dist/src/dcql-error/index.d.ts.map +1 -0
- package/dist/src/dcql-error/index.js +23 -0
- package/dist/src/dcql-error/index.js.map +1 -0
- package/dist/src/dcql-parser/claims-path.test.d.ts.map +1 -0
- package/dist/src/{dcql-query → dcql-parser}/claims-path.test.js +1 -1
- package/dist/src/dcql-parser/claims-path.test.js.map +1 -0
- package/dist/src/{dcql-query-result → dcql-parser}/dcql-claims-query-result.d.ts +5 -2
- package/dist/src/dcql-parser/dcql-claims-query-result.d.ts.map +1 -0
- package/dist/src/{dcql-query-result → dcql-parser}/dcql-claims-query-result.js +18 -15
- package/dist/src/dcql-parser/dcql-claims-query-result.js.map +1 -0
- package/dist/src/dcql-parser/dcql-credential-query-result.d.ts +8 -0
- package/dist/src/dcql-parser/dcql-credential-query-result.d.ts.map +1 -0
- package/dist/src/{dcql-query-result → dcql-parser}/dcql-credential-query-result.js +4 -4
- package/dist/src/dcql-parser/dcql-credential-query-result.js.map +1 -0
- package/dist/src/dcql-presentation/index.d.ts +3 -2
- package/dist/src/dcql-presentation/index.d.ts.map +1 -1
- package/dist/src/dcql-presentation/index.js +10 -16
- package/dist/src/dcql-presentation/index.js.map +1 -1
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts +45 -0
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts.map +1 -0
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.js +52 -0
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.js.map +1 -0
- package/dist/src/dcql-presentation/{m-dcql-presentation-query.d.ts → m-dcql-presentation-result.d.ts} +204 -381
- package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts.map +1 -0
- package/dist/src/dcql-presentation/m-dcql-presentation-result.js +127 -0
- package/dist/src/dcql-presentation/m-dcql-presentation-result.js.map +1 -0
- package/dist/src/dcql-presentation/{m-dcql-presentation-record.d.ts → m-dcql-presentation.d.ts} +3 -3
- package/dist/src/dcql-presentation/m-dcql-presentation.d.ts.map +1 -0
- package/dist/src/dcql-presentation/{m-dcql-presentation-record.js → m-dcql-presentation.js} +10 -10
- package/dist/src/dcql-presentation/m-dcql-presentation.js.map +1 -0
- package/dist/src/dcql-query/dcql-query.test.js +22 -19
- package/dist/src/dcql-query/dcql-query.test.js.map +1 -1
- package/dist/src/dcql-query/index.d.ts +5 -0
- package/dist/src/dcql-query/index.d.ts.map +1 -0
- package/dist/src/dcql-query/index.js +12 -0
- package/dist/src/dcql-query/index.js.map +1 -0
- package/dist/src/dcql-query/m-dcql-credential-query.js +1 -1
- package/dist/src/dcql-query/m-dcql-credential-query.js.map +1 -1
- package/dist/src/dcql-query/m-dcql-query.d.ts +199 -52
- package/dist/src/dcql-query/m-dcql-query.d.ts.map +1 -1
- package/dist/src/dcql-query/m-dcql-query.js +4 -6
- package/dist/src/dcql-query/m-dcql-query.js.map +1 -1
- package/dist/src/dcql-query-result/index.d.ts +3 -0
- package/dist/src/dcql-query-result/index.d.ts.map +1 -0
- package/dist/src/dcql-query-result/index.js +8 -0
- package/dist/src/dcql-query-result/index.js.map +1 -0
- package/dist/src/dcql-query-result/m-dcql-query-result.d.ts +366 -80
- package/dist/src/dcql-query-result/m-dcql-query-result.d.ts.map +1 -1
- package/dist/src/dcql-query-result/m-dcql-query-result.js +12 -17
- package/dist/src/dcql-query-result/m-dcql-query-result.js.map +1 -1
- package/dist/src/dcql-query-result/run-dcql-query.d.ts +8 -0
- package/dist/src/dcql-query-result/run-dcql-query.d.ts.map +1 -0
- package/dist/src/{dcql-query/dcql-query.js → dcql-query-result/run-dcql-query.js} +14 -10
- package/dist/src/dcql-query-result/run-dcql-query.js.map +1 -0
- package/dist/src/index.d.ts +5 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +10 -14
- package/dist/src/index.js.map +1 -1
- package/dist/src/u-dcql-credential.d.ts +77 -0
- package/dist/src/u-dcql-credential.d.ts.map +1 -0
- package/dist/src/u-dcql-credential.js +68 -0
- package/dist/src/u-dcql-credential.js.map +1 -0
- package/dist/src/u-model.d.ts +27 -0
- package/dist/src/u-model.d.ts.map +1 -0
- package/dist/src/{u-dcql-credential-representation.js → u-model.js} +39 -6
- package/dist/src/u-model.js.map +1 -0
- package/package.json +1 -1
- package/dist/src/dcql-presentation/m-dcql-presentation-query.d.ts.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation-query.js +0 -132
- package/dist/src/dcql-presentation/m-dcql-presentation-query.js.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation-record.d.ts.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation-record.js.map +0 -1
- package/dist/src/dcql-query/claims-path.d.ts +0 -14
- package/dist/src/dcql-query/claims-path.d.ts.map +0 -1
- package/dist/src/dcql-query/claims-path.js +0 -23
- package/dist/src/dcql-query/claims-path.js.map +0 -1
- package/dist/src/dcql-query/claims-path.test.d.ts.map +0 -1
- package/dist/src/dcql-query/claims-path.test.js.map +0 -1
- package/dist/src/dcql-query/dcql-query.d.ts +0 -8
- package/dist/src/dcql-query/dcql-query.d.ts.map +0 -1
- package/dist/src/dcql-query/dcql-query.js.map +0 -1
- package/dist/src/dcql-query-result/dcql-claims-query-result.d.ts.map +0 -1
- package/dist/src/dcql-query-result/dcql-claims-query-result.js.map +0 -1
- package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts +0 -8
- package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts.map +0 -1
- package/dist/src/dcql-query-result/dcql-credential-query-result.js.map +0 -1
- package/dist/src/e-base.d.ts.map +0 -1
- package/dist/src/e-base.js.map +0 -1
- package/dist/src/e-dcql.d.ts.map +0 -1
- package/dist/src/e-dcql.js.map +0 -1
- package/dist/src/u-dcql-credential-representation.d.ts +0 -29
- package/dist/src/u-dcql-credential-representation.d.ts.map +0 -1
- package/dist/src/u-dcql-credential-representation.js.map +0 -1
- /package/dist/src/{e-base.d.ts → dcql-error/e-base.d.ts} +0 -0
- /package/dist/src/{e-base.js → dcql-error/e-base.js} +0 -0
- /package/dist/src/{dcql-query → dcql-parser}/claims-path.test.d.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-presentation-result.d.ts","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-presentation-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEtF,yBAAiB,sBAAsB,CAAC;IAC/B,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BjB,CAAC;IAEH,KAAY,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAChD,KAAY,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;IAE3C,MAAM,KAAK,UAAW,KAAK,GAAG,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEnD,CAAC;IAEF;;;;;;OAMG;IACI,MAAM,oBAAoB,qBACb,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,OACvD;QAAE,SAAS,EAAE,SAAS,CAAA;KAAE,KAC5B,MA2EF,CAAC;IAEK,MAAM,QAAQ,oBAAqB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAS/D,CAAC;CACH;AACD,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,CAAC,MAAM,CAAC"}
|
@@ -0,0 +1,127 @@
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.DcqlPresentationResult = void 0;
|
27
|
+
const v = __importStar(require("valibot"));
|
28
|
+
const e_dcql_js_1 = require("../dcql-error/e-dcql.js");
|
29
|
+
const dcql_credential_query_result_js_1 = require("../dcql-parser/dcql-credential-query-result.js");
|
30
|
+
const m_dcql_query_result_js_1 = require("../dcql-query-result/m-dcql-query-result.js");
|
31
|
+
const u_dcql_js_1 = require("../u-dcql.js");
|
32
|
+
var DcqlPresentationResult;
|
33
|
+
(function (DcqlPresentationResult) {
|
34
|
+
DcqlPresentationResult.vModel = v.object({
|
35
|
+
...v.omit(m_dcql_query_result_js_1.DcqlQueryResult.vModel, ['credential_matches']).entries,
|
36
|
+
invalid_matches: v.union([
|
37
|
+
v.record(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)), v.object({
|
38
|
+
...v.omit(m_dcql_query_result_js_1.DcqlQueryResult.vModel.entries.credential_matches.value.options[1], ['all', 'credential_index']).entries,
|
39
|
+
presentation_id: v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)),
|
40
|
+
})),
|
41
|
+
v.undefined(),
|
42
|
+
]),
|
43
|
+
valid_matches: v.record(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)), v.object({
|
44
|
+
...v.omit(m_dcql_query_result_js_1.DcqlQueryResult.vModel.entries.credential_matches.value.options[0], ['all', 'issues', 'credential_index']).entries,
|
45
|
+
presentation_id: v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)),
|
46
|
+
})),
|
47
|
+
});
|
48
|
+
DcqlPresentationResult.parse = (input) => {
|
49
|
+
return v.parse(DcqlPresentationResult.vModel, input);
|
50
|
+
};
|
51
|
+
/**
|
52
|
+
* Query if the presentation record can be satisfied by the provided presentations
|
53
|
+
* considering the dcql query
|
54
|
+
*
|
55
|
+
* @param dcqlQuery
|
56
|
+
* @param dcqlPresentation
|
57
|
+
*/
|
58
|
+
DcqlPresentationResult.fromDcqlPresentation = (dcqlPresentation, ctx) => {
|
59
|
+
const { dcqlQuery } = ctx;
|
60
|
+
const presentationQueriesResults = Object.fromEntries(Object.entries(dcqlPresentation).map(([queryId, presentation]) => {
|
61
|
+
const credentialQuery = dcqlQuery.credentials.find(c => c.id === queryId);
|
62
|
+
if (!credentialQuery) {
|
63
|
+
throw new e_dcql_js_1.DcqlPresentationResultError({
|
64
|
+
message: `Query ${queryId} not found in the dcql query. Cannot validate presentation.`,
|
65
|
+
});
|
66
|
+
}
|
67
|
+
return [
|
68
|
+
queryId,
|
69
|
+
(0, dcql_credential_query_result_js_1.runCredentialQuery)(credentialQuery, {
|
70
|
+
presentation: true,
|
71
|
+
credentials: [presentation],
|
72
|
+
}),
|
73
|
+
];
|
74
|
+
}));
|
75
|
+
let invalidMatches = undefined;
|
76
|
+
const validMatches = {};
|
77
|
+
for (const [queryId, presentationQueryResult] of Object.entries(presentationQueriesResults)) {
|
78
|
+
for (const presentationQueryResultForClaimSet of presentationQueryResult) {
|
79
|
+
const result =
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
81
|
+
presentationQueryResultForClaimSet[0];
|
82
|
+
if (result.success) {
|
83
|
+
const { issues, credential_index, ...rest } = result;
|
84
|
+
validMatches[queryId] = { ...rest, presentation_id: queryId };
|
85
|
+
}
|
86
|
+
else {
|
87
|
+
if (!invalidMatches)
|
88
|
+
invalidMatches = {};
|
89
|
+
const { credential_index, ...rest } = result;
|
90
|
+
invalidMatches[queryId] = {
|
91
|
+
...rest,
|
92
|
+
presentation_id: queryId,
|
93
|
+
};
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
const credentialSetResults = dcqlQuery.credential_sets?.map(set => {
|
98
|
+
const matchingOptions = set.options.filter(option => option.every(credentialQueryId => validMatches[credentialQueryId]?.success));
|
99
|
+
return {
|
100
|
+
...set,
|
101
|
+
matching_options: matchingOptions.length > 0
|
102
|
+
? matchingOptions
|
103
|
+
: undefined,
|
104
|
+
};
|
105
|
+
});
|
106
|
+
const dqclQueryMatched = credentialSetResults
|
107
|
+
? credentialSetResults.every(set => !set.required || set.matching_options)
|
108
|
+
: !invalidMatches;
|
109
|
+
return {
|
110
|
+
...dcqlQuery,
|
111
|
+
canBeSatisfied: dqclQueryMatched,
|
112
|
+
valid_matches: validMatches,
|
113
|
+
invalid_matches: invalidMatches,
|
114
|
+
credential_sets: credentialSetResults,
|
115
|
+
};
|
116
|
+
};
|
117
|
+
DcqlPresentationResult.validate = (dcqlQueryResult) => {
|
118
|
+
if (!dcqlQueryResult.canBeSatisfied) {
|
119
|
+
throw new e_dcql_js_1.DcqlInvalidPresentationRecordError({
|
120
|
+
message: 'Invalid Presentation record',
|
121
|
+
cause: dcqlQueryResult,
|
122
|
+
});
|
123
|
+
}
|
124
|
+
return dcqlQueryResult;
|
125
|
+
};
|
126
|
+
})(DcqlPresentationResult || (exports.DcqlPresentationResult = DcqlPresentationResult = {}));
|
127
|
+
//# sourceMappingURL=m-dcql-presentation-result.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-presentation-result.js","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-presentation-result.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAE7B,uDAGiC;AACjC,oGAAoF;AACpF,wFAA8E;AAE9E,4CAAuC;AAGvC,IAAiB,sBAAsB,CAs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C,CAAC;IAEW,+BAAQ,GAAG,CAAC,eAAuC,EAAE,EAAE;QAClE,IAAI,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC;YACpC,MAAM,IAAI,8CAAkC,CAAC;gBAC3C,OAAO,EAAE,6BAA6B;gBACtC,KAAK,EAAE,eAAe;aACvB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,eAAgC,CAAC;IAC1C,CAAC,CAAC;AACJ,CAAC,EAtIgB,sBAAsB,sCAAtB,sBAAsB,QAsItC"}
|
package/dist/src/dcql-presentation/{m-dcql-presentation-record.d.ts → m-dcql-presentation.d.ts}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as v from 'valibot';
|
2
|
-
export declare namespace
|
2
|
+
export declare namespace DcqlPresentation {
|
3
3
|
const vModel: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.UnionSchema<[v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>], undefined>, undefined>;
|
4
4
|
type Input = v.InferInput<typeof vModel>;
|
5
5
|
type Output = v.InferOutput<typeof vModel>;
|
@@ -10,5 +10,5 @@ export declare namespace DcqlPresentationRecord {
|
|
10
10
|
};
|
11
11
|
const encode: (input: Output) => string;
|
12
12
|
}
|
13
|
-
export type
|
14
|
-
//# sourceMappingURL=m-dcql-presentation
|
13
|
+
export type DcqlPresentation = DcqlPresentation.Output;
|
14
|
+
//# sourceMappingURL=m-dcql-presentation.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-presentation.d.ts","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,MAAM,0TAGlB,CAAC;IAEF,KAAY,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAChD,KAAY,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;IAC3C,MAAM,KAAK,UAAW,KAAK,GAAG,MAAM;;;;KAM1C,CAAC;IAEK,MAAM,MAAM,UAAW,MAAM,WAEnC,CAAC;CACH;AACD,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC"}
|
@@ -23,20 +23,20 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.
|
26
|
+
exports.DcqlPresentation = void 0;
|
27
27
|
const v = __importStar(require("valibot"));
|
28
28
|
const u_dcql_js_1 = require("../u-dcql.js");
|
29
|
-
var
|
30
|
-
(function (
|
31
|
-
|
32
|
-
|
29
|
+
var DcqlPresentation;
|
30
|
+
(function (DcqlPresentation) {
|
31
|
+
DcqlPresentation.vModel = v.record(v.pipe(v.string(), v.regex(u_dcql_js_1.idRegex)), v.union([v.string(), u_dcql_js_1.vJsonRecord]));
|
32
|
+
DcqlPresentation.parse = (input) => {
|
33
33
|
if (typeof input === 'string') {
|
34
|
-
return v.parse(v.pipe(v.string(), u_dcql_js_1.vStringToJson,
|
34
|
+
return v.parse(v.pipe(v.string(), u_dcql_js_1.vStringToJson, DcqlPresentation.vModel), input);
|
35
35
|
}
|
36
|
-
return v.parse(
|
36
|
+
return v.parse(DcqlPresentation.vModel, input);
|
37
37
|
};
|
38
|
-
|
38
|
+
DcqlPresentation.encode = (input) => {
|
39
39
|
return JSON.stringify(input);
|
40
40
|
};
|
41
|
-
})(
|
42
|
-
//# sourceMappingURL=m-dcql-presentation
|
41
|
+
})(DcqlPresentation || (exports.DcqlPresentation = DcqlPresentation = {}));
|
42
|
+
//# sourceMappingURL=m-dcql-presentation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"m-dcql-presentation.js","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-presentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,4CAAmE;AAEnE,IAAiB,gBAAgB,CAmBhC;AAnBD,WAAiB,gBAAgB;IAClB,uBAAM,GAAG,CAAC,CAAC,MAAM,CAC5B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAO,CAAC,CAAC,EACpC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAW,CAAC,CAAC,CACnC,CAAC;IAIW,sBAAK,GAAG,CAAC,KAAqB,EAAE,EAAE;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,yBAAa,EAAE,iBAAA,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,CAAC,CAAC,KAAK,CAAC,iBAAA,MAAM,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC,CAAC;IAEW,uBAAM,GAAG,CAAC,KAAa,EAAE,EAAE;QACtC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC;AACJ,CAAC,EAnBgB,gBAAgB,gCAAhB,gBAAgB,QAmBhC"}
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const node_assert_1 = __importDefault(require("node:assert"));
|
7
7
|
const node_test_1 = require("node:test");
|
8
|
-
const
|
8
|
+
const m_dcql_presentation_result_js_1 = require("../dcql-presentation/m-dcql-presentation-result.js");
|
9
9
|
const m_dcql_query_js_1 = require("./m-dcql-query.js");
|
10
10
|
/**
|
11
11
|
* The following is a non-normative example of a DCQL query that requests
|
@@ -33,7 +33,8 @@ const mdocMvrcQuery = {
|
|
33
33
|
],
|
34
34
|
};
|
35
35
|
const mdocMvrc = {
|
36
|
-
|
36
|
+
credentialFormat: 'mso_mdoc',
|
37
|
+
doctype: 'org.iso.7367.1.mVRC',
|
37
38
|
namespaces: {
|
38
39
|
'org.iso.7367.1': {
|
39
40
|
vehicle_holder: 'Martin Auer',
|
@@ -43,7 +44,8 @@ const mdocMvrc = {
|
|
43
44
|
},
|
44
45
|
};
|
45
46
|
const exampleMdoc = {
|
46
|
-
|
47
|
+
credentialFormat: 'mso_mdoc',
|
48
|
+
doctype: 'example_doctype',
|
47
49
|
namespaces: {
|
48
50
|
example_namespaces: {
|
49
51
|
example_claim: 'example_value',
|
@@ -67,6 +69,7 @@ const sdJwtVcExample = {
|
|
67
69
|
],
|
68
70
|
};
|
69
71
|
const sdJwtVc = {
|
72
|
+
credentialFormat: 'vc+sd-jwt',
|
70
73
|
vct: 'https://credentials.example.com/identity_credential',
|
71
74
|
claims: {
|
72
75
|
first_name: 'Arthur',
|
@@ -98,13 +101,13 @@ void (0, node_test_1.describe)('credential-parser', () => {
|
|
98
101
|
(0, node_assert_1.default)(res.canBeSatisfied);
|
99
102
|
node_assert_1.default.deepStrictEqual(res.credential_matches, {
|
100
103
|
my_credential: {
|
101
|
-
issues: undefined,
|
102
104
|
success: true,
|
103
105
|
typed: true,
|
104
106
|
credential_index: 0,
|
105
107
|
claim_set_index: undefined,
|
106
108
|
output: {
|
107
|
-
|
109
|
+
credentialFormat: 'mso_mdoc',
|
110
|
+
doctype: 'org.iso.7367.1.mVRC',
|
108
111
|
namespaces: {
|
109
112
|
'org.iso.7367.1': { vehicle_holder: 'Martin Auer' },
|
110
113
|
'org.iso.18013.5.1': { first_name: 'Martin Auer' },
|
@@ -113,16 +116,16 @@ void (0, node_test_1.describe)('credential-parser', () => {
|
|
113
116
|
all: res.credential_matches.my_credential?.all,
|
114
117
|
},
|
115
118
|
});
|
116
|
-
const presentationQueryResult =
|
117
|
-
node_assert_1.default.deepStrictEqual(presentationQueryResult.
|
119
|
+
const presentationQueryResult = m_dcql_presentation_result_js_1.DcqlPresentationResult.fromDcqlPresentation({ my_credential: res.credential_matches.my_credential.output }, { dcqlQuery: query });
|
120
|
+
node_assert_1.default.deepStrictEqual(presentationQueryResult.valid_matches, {
|
118
121
|
my_credential: {
|
119
122
|
success: true,
|
120
123
|
typed: true,
|
121
|
-
presentation_index: 0,
|
122
124
|
presentation_id: 'my_credential',
|
123
125
|
claim_set_index: undefined,
|
124
126
|
output: {
|
125
|
-
|
127
|
+
credentialFormat: 'mso_mdoc',
|
128
|
+
doctype: 'org.iso.7367.1.mVRC',
|
126
129
|
namespaces: {
|
127
130
|
'org.iso.7367.1': { vehicle_holder: 'Martin Auer' },
|
128
131
|
'org.iso.18013.5.1': { first_name: 'Martin Auer' },
|
@@ -138,13 +141,13 @@ void (0, node_test_1.describe)('credential-parser', () => {
|
|
138
141
|
(0, node_assert_1.default)(res.canBeSatisfied);
|
139
142
|
node_assert_1.default.deepStrictEqual(res.credential_matches, {
|
140
143
|
my_credential: {
|
141
|
-
issues: undefined,
|
142
144
|
success: true,
|
143
145
|
typed: true,
|
144
146
|
credential_index: 1,
|
145
147
|
claim_set_index: undefined,
|
146
148
|
output: {
|
147
|
-
|
149
|
+
credentialFormat: 'mso_mdoc',
|
150
|
+
doctype: 'org.iso.7367.1.mVRC',
|
148
151
|
namespaces: {
|
149
152
|
'org.iso.7367.1': { vehicle_holder: 'Martin Auer' },
|
150
153
|
'org.iso.18013.5.1': { first_name: 'Martin Auer' },
|
@@ -153,16 +156,16 @@ void (0, node_test_1.describe)('credential-parser', () => {
|
|
153
156
|
all: res.credential_matches.my_credential?.all,
|
154
157
|
},
|
155
158
|
});
|
156
|
-
const presentationQueryResult =
|
157
|
-
node_assert_1.default.deepStrictEqual(presentationQueryResult.
|
159
|
+
const presentationQueryResult = m_dcql_presentation_result_js_1.DcqlPresentationResult.fromDcqlPresentation({ my_credential: res.credential_matches.my_credential.output }, { dcqlQuery: query });
|
160
|
+
node_assert_1.default.deepStrictEqual(presentationQueryResult.valid_matches, {
|
158
161
|
my_credential: {
|
159
162
|
success: true,
|
160
163
|
typed: true,
|
161
|
-
presentation_index: 0,
|
162
164
|
presentation_id: 'my_credential',
|
163
165
|
claim_set_index: undefined,
|
164
166
|
output: {
|
165
|
-
|
167
|
+
credentialFormat: 'mso_mdoc',
|
168
|
+
doctype: 'org.iso.7367.1.mVRC',
|
166
169
|
namespaces: {
|
167
170
|
'org.iso.7367.1': { vehicle_holder: 'Martin Auer' },
|
168
171
|
'org.iso.18013.5.1': { first_name: 'Martin Auer' },
|
@@ -178,12 +181,12 @@ void (0, node_test_1.describe)('credential-parser', () => {
|
|
178
181
|
(0, node_assert_1.default)(res.canBeSatisfied);
|
179
182
|
node_assert_1.default.deepStrictEqual(res.credential_matches, {
|
180
183
|
my_credential: {
|
181
|
-
issues: undefined,
|
182
184
|
success: true,
|
183
185
|
typed: true,
|
184
186
|
credential_index: 1,
|
185
187
|
claim_set_index: undefined,
|
186
188
|
output: {
|
189
|
+
credentialFormat: 'vc+sd-jwt',
|
187
190
|
vct: 'https://credentials.example.com/identity_credential',
|
188
191
|
claims: {
|
189
192
|
first_name: 'Arthur',
|
@@ -196,15 +199,15 @@ void (0, node_test_1.describe)('credential-parser', () => {
|
|
196
199
|
all: res.credential_matches.my_credential?.all,
|
197
200
|
},
|
198
201
|
});
|
199
|
-
const presentationQueryResult =
|
200
|
-
node_assert_1.default.deepStrictEqual(presentationQueryResult.
|
202
|
+
const presentationQueryResult = m_dcql_presentation_result_js_1.DcqlPresentationResult.fromDcqlPresentation({ my_credential: res.credential_matches.my_credential.output }, { dcqlQuery: query });
|
203
|
+
node_assert_1.default.deepStrictEqual(presentationQueryResult.valid_matches, {
|
201
204
|
my_credential: {
|
202
205
|
success: true,
|
203
206
|
typed: true,
|
204
|
-
presentation_index: 0,
|
205
207
|
presentation_id: 'my_credential',
|
206
208
|
claim_set_index: undefined,
|
207
209
|
output: {
|
210
|
+
credentialFormat: 'vc+sd-jwt',
|
208
211
|
vct: 'https://credentials.example.com/identity_credential',
|
209
212
|
claims: {
|
210
213
|
first_name: 'Arthur',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dcql-query.test.js","sourceRoot":"","sources":["../../../src/dcql-query/dcql-query.test.ts"],"names":[],"mappings":";;;;;AAAA,8DAAiC;AACjC,yCAAyC;AACzC,
|
1
|
+
{"version":3,"file":"dcql-query.test.js","sourceRoot":"","sources":["../../../src/dcql-query/dcql-query.test.ts"],"names":[],"mappings":";;;;;AAAA,8DAAiC;AACjC,yCAAyC;AACzC,sGAA4F;AAK5F,uDAA8C;AAE9C;;;GAGG;AACH,MAAM,aAAa,GAAG;IACpB,WAAW,EAAE;QACX;YACE,EAAE,EAAE,eAAe;YACnB,MAAM,EAAE,UAAmB;YAC3B,IAAI,EAAE;gBACJ,aAAa,EAAE,qBAAqB;aACrC;YACD,MAAM,EAAE;gBACN;oBACE,SAAS,EAAE,gBAAgB;oBAC3B,UAAU,EAAE,gBAAgB;iBAC7B;gBACD;oBACE,SAAS,EAAE,mBAAmB;oBAC9B,UAAU,EAAE,YAAY;iBACzB;aACF;SACF;KACF;CACwB,CAAC;AAE5B,MAAM,QAAQ,GAAG;IACf,gBAAgB,EAAE,UAAU;IAC5B,OAAO,EAAE,qBAAqB;IAC9B,UAAU,EAAE;QACV,gBAAgB,EAAE;YAChB,cAAc,EAAE,aAAa;YAC7B,aAAa,EAAE,QAAQ;SACxB;QACD,mBAAmB,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE;KACnD;CAC2B,CAAC;AAE/B,MAAM,WAAW,GAAG;IAClB,gBAAgB,EAAE,UAAU;IAC5B,OAAO,EAAE,iBAAiB;IAC1B,UAAU,EAAE;QACV,kBAAkB,EAAE;YAClB,aAAa,EAAE,eAAe;SAC/B;KACF;CAC2B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E,SAAS;gBAC1B,MAAM,EAAE;oBACN,gBAAgB,EAAE,WAAoB;oBACtC,GAAG,EAAE,qDAAqD;oBAC1D,MAAM,EAAE;wBACN,UAAU,EAAE,QAAQ;wBACpB,SAAS,EAAE,MAAM;wBACjB,OAAO,EAAE;4BACP,cAAc,EAAE,kBAAkB;yBACnC;qBACF;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export { DcqlClaimsQuery } from './m-dcql-claims-query';
|
2
|
+
export { DcqlCredentialQuery } from './m-dcql-credential-query';
|
3
|
+
export { CredentialSetQuery } from './m-dcql-credential-set-query';
|
4
|
+
export { DcqlQuery } from './m-dcql-query';
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dcql-query/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DcqlQuery = exports.CredentialSetQuery = exports.DcqlCredentialQuery = exports.DcqlClaimsQuery = void 0;
|
4
|
+
var m_dcql_claims_query_1 = require("./m-dcql-claims-query");
|
5
|
+
Object.defineProperty(exports, "DcqlClaimsQuery", { enumerable: true, get: function () { return m_dcql_claims_query_1.DcqlClaimsQuery; } });
|
6
|
+
var m_dcql_credential_query_1 = require("./m-dcql-credential-query");
|
7
|
+
Object.defineProperty(exports, "DcqlCredentialQuery", { enumerable: true, get: function () { return m_dcql_credential_query_1.DcqlCredentialQuery; } });
|
8
|
+
var m_dcql_credential_set_query_1 = require("./m-dcql-credential-set-query");
|
9
|
+
Object.defineProperty(exports, "CredentialSetQuery", { enumerable: true, get: function () { return m_dcql_credential_set_query_1.CredentialSetQuery; } });
|
10
|
+
var m_dcql_query_1 = require("./m-dcql-query");
|
11
|
+
Object.defineProperty(exports, "DcqlQuery", { enumerable: true, get: function () { return m_dcql_query_1.DcqlQuery; } });
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dcql-query/index.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AAA/C,sHAAA,eAAe,OAAA;AACxB,qEAAgE;AAAvD,8HAAA,mBAAmB,OAAA;AAC5B,6EAAmE;AAA1D,iIAAA,kBAAkB,OAAA;AAC3B,+CAA2C;AAAlC,yGAAA,SAAS,OAAA"}
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.DcqlCredentialQuery = void 0;
|
27
27
|
const v = __importStar(require("valibot"));
|
28
|
-
const e_dcql_js_1 = require("../e-dcql.js");
|
28
|
+
const e_dcql_js_1 = require("../dcql-error/e-dcql.js");
|
29
29
|
const u_dcql_js_1 = require("../u-dcql.js");
|
30
30
|
const m_dcql_claims_query_js_1 = require("./m-dcql-claims-query.js");
|
31
31
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"m-dcql-credential-query.js","sourceRoot":"","sources":["../../../src/dcql-query/m-dcql-credential-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,
|
1
|
+
{"version":3,"file":"m-dcql-credential-query.js","sourceRoot":"","sources":["../../../src/dcql-query/m-dcql-credential-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;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