@credo-ts/core 0.6.0-pr-2100-20241124131043 → 0.6.0-pr-2094-20241124155338
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/build/agent/AgentModules.d.ts +0 -2
- package/build/agent/AgentModules.js +0 -2
- package/build/agent/AgentModules.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/modules/dif-presentation-exchange/utils/transform.d.ts +2 -4
- package/build/modules/dif-presentation-exchange/utils/transform.js +19 -2
- package/build/modules/dif-presentation-exchange/utils/transform.js.map +1 -1
- package/build/modules/mdoc/Mdoc.d.ts +0 -9
- package/build/modules/mdoc/Mdoc.js +0 -13
- package/build/modules/mdoc/Mdoc.js.map +1 -1
- package/build/modules/mdoc/MdocDeviceResponse.d.ts +1 -14
- package/build/modules/mdoc/MdocDeviceResponse.js +4 -31
- package/build/modules/mdoc/MdocDeviceResponse.js.map +1 -1
- package/build/modules/mdoc/MdocOptions.d.ts +0 -12
- package/build/modules/mdoc/repository/MdocRecord.d.ts +0 -8
- package/build/modules/mdoc/repository/MdocRecord.js +0 -12
- package/build/modules/mdoc/repository/MdocRecord.js.map +1 -1
- package/build/modules/sd-jwt-vc/SdJwtVcApi.d.ts +0 -2
- package/build/modules/sd-jwt-vc/SdJwtVcService.d.ts +0 -11
- package/build/modules/sd-jwt-vc/SdJwtVcService.js +0 -5
- package/build/modules/sd-jwt-vc/SdJwtVcService.js.map +1 -1
- package/build/modules/sd-jwt-vc/decodeSdJwtVc.d.ts +7 -2
- package/build/modules/sd-jwt-vc/decodeSdJwtVc.js +0 -3
- package/build/modules/sd-jwt-vc/decodeSdJwtVc.js.map +1 -1
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts +1 -8
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.js +1 -10
- package/build/modules/sd-jwt-vc/repository/SdJwtVcRecord.js.map +1 -1
- package/build/modules/vc/repository/W3cCredentialRecord.d.ts +0 -4
- package/build/modules/vc/repository/W3cCredentialRecord.js +0 -6
- package/build/modules/vc/repository/W3cCredentialRecord.js.map +1 -1
- package/package.json +1 -2
- package/build/modules/dcql/DcqlError.d.ts +0 -8
- package/build/modules/dcql/DcqlError.js +0 -12
- package/build/modules/dcql/DcqlError.js.map +0 -1
- package/build/modules/dcql/DcqlModule.d.ts +0 -10
- package/build/modules/dcql/DcqlModule.js +0 -23
- package/build/modules/dcql/DcqlModule.js.map +0 -1
- package/build/modules/dcql/DcqlService.d.ts +0 -140
- package/build/modules/dcql/DcqlService.js +0 -253
- package/build/modules/dcql/DcqlService.js.map +0 -1
- package/build/modules/dcql/index.d.ts +0 -5
- package/build/modules/dcql/index.js +0 -22
- package/build/modules/dcql/index.js.map +0 -1
- package/build/modules/dcql/models/DcqlCredentialsForRequest.d.ts +0 -20
- package/build/modules/dcql/models/DcqlCredentialsForRequest.js +0 -3
- package/build/modules/dcql/models/DcqlCredentialsForRequest.js.map +0 -1
- package/build/modules/dcql/models/index.d.ts +0 -20
- package/build/modules/dcql/models/index.js +0 -18
- package/build/modules/dcql/models/index.js.map +0 -1
- package/build/modules/dcql/utils/DcqlPresentationsToCreate.d.ts +0 -31
- package/build/modules/dcql/utils/DcqlPresentationsToCreate.js +0 -36
- package/build/modules/dcql/utils/DcqlPresentationsToCreate.js.map +0 -1
- package/build/modules/dcql/utils/index.d.ts +0 -1
- package/build/modules/dcql/utils/index.js +0 -18
- package/build/modules/dcql/utils/index.js.map +0 -1
- package/build/modules/mdoc/mdocUtil.d.ts +0 -1
- package/build/modules/mdoc/mdocUtil.js +0 -7
- package/build/modules/mdoc/mdocUtil.js.map +0 -1
|
@@ -27,14 +27,7 @@ export declare class SdJwtVcRecord extends BaseRecord<DefaultSdJwtVcRecordTags>
|
|
|
27
27
|
compactSdJwtVc: string;
|
|
28
28
|
typeMetadata?: SdJwtVcTypeMetadata;
|
|
29
29
|
constructor(props: SdJwtVcRecordStorageProps);
|
|
30
|
-
|
|
31
|
-
* credential is convenience method added to all credential records
|
|
32
|
-
*/
|
|
33
|
-
get credential(): SdJwtVc;
|
|
34
|
-
/**
|
|
35
|
-
* encoded is convenience method added to all credential records
|
|
36
|
-
*/
|
|
37
|
-
get encoded(): string;
|
|
30
|
+
get sdJwtVc(): SdJwtVc;
|
|
38
31
|
getTags(): {
|
|
39
32
|
vct: string;
|
|
40
33
|
sdAlg: string;
|
|
@@ -20,18 +20,9 @@ class SdJwtVcRecord extends BaseRecord_1.BaseRecord {
|
|
|
20
20
|
this._tags = (_c = props.tags) !== null && _c !== void 0 ? _c : {};
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
* credential is convenience method added to all credential records
|
|
25
|
-
*/
|
|
26
|
-
get credential() {
|
|
23
|
+
get sdJwtVc() {
|
|
27
24
|
return (0, decodeSdJwtVc_1.decodeSdJwtVc)(this.compactSdJwtVc, this.typeMetadata);
|
|
28
25
|
}
|
|
29
|
-
/**
|
|
30
|
-
* encoded is convenience method added to all credential records
|
|
31
|
-
*/
|
|
32
|
-
get encoded() {
|
|
33
|
-
return this.compactSdJwtVc;
|
|
34
|
-
}
|
|
35
26
|
getTags() {
|
|
36
27
|
const sdjwt = (0, decode_1.decodeSdJwtSync)(this.compactSdJwtVc, crypto_1.Hasher.hash);
|
|
37
28
|
const vct = sdjwt.jwt.payload['vct'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdJwtVcRecord.js","sourceRoot":"","sources":["../../../../src/modules/sd-jwt-vc/repository/SdJwtVcRecord.ts"],"names":[],"mappings":";;;AAKA,2CAAgD;AAEhD,4CAAoE;AACpE,4DAAwD;AACxD,0CAAgD;AAChD,8CAA0C;AAC1C,oDAAgD;AAyBhD,MAAa,aAAc,SAAQ,uBAAoC;IASrE,YAAmB,KAAgC;;QACjD,KAAK,EAAE,CAAA;QARO,SAAI,GAAG,aAAa,CAAC,IAAI,CAAA;QAUvC,IAAI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AAC,CAAA;IAC9D,CAAC;IAEM,OAAO;QACZ,MAAM,KAAK,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAC,cAAc,EAAE,eAAM,CAAC,IAAI,CAAC,CAAA;QAC/D,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAW,CAAA;QAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAuB,CAAA;QAChE,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAA0B,CAAA;QAE5D,uCACK,IAAI,CAAC,KAAK,KACb,GAAG,EACH,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS,EACzB,GAAG,IACJ;IACH,CAAC;IAEM,KAAK;QACV,OAAO,uBAAe,CAAC,QAAQ,CAAC,uBAAe,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,WAAkC,CAAC,CAAA;IACxG,CAAC;;AAzCH,sCA0CC;AAzCwB,kBAAI,GAAG,eAAe,AAAlB,CAAkB"}
|
|
@@ -29,10 +29,6 @@ export declare class W3cCredentialRecord extends BaseRecord<DefaultW3cCredential
|
|
|
29
29
|
static readonly type = "W3cCredentialRecord";
|
|
30
30
|
readonly type = "W3cCredentialRecord";
|
|
31
31
|
credential: W3cVerifiableCredential;
|
|
32
|
-
/**
|
|
33
|
-
* encoded is convenience method added to all credential records
|
|
34
|
-
*/
|
|
35
|
-
get encoded(): string | Record<string, any>;
|
|
36
32
|
constructor(props: W3cCredentialRecordOptions);
|
|
37
33
|
getTags(): DefaultW3cCredentialTags;
|
|
38
34
|
/**
|
|
@@ -15,12 +15,6 @@ const utils_1 = require("../../../utils");
|
|
|
15
15
|
const uuid_1 = require("../../../utils/uuid");
|
|
16
16
|
const models_1 = require("../models");
|
|
17
17
|
class W3cCredentialRecord extends BaseRecord_1.BaseRecord {
|
|
18
|
-
/**
|
|
19
|
-
* encoded is convenience method added to all credential records
|
|
20
|
-
*/
|
|
21
|
-
get encoded() {
|
|
22
|
-
return this.credential.encoded;
|
|
23
|
-
}
|
|
24
18
|
constructor(props) {
|
|
25
19
|
var _a, _b;
|
|
26
20
|
super();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cCredentialRecord.js","sourceRoot":"","sources":["../../../../src/modules/vc/repository/W3cCredentialRecord.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,4DAAwD;AACxD,0CAAgD;AAChD,8CAA0C;AAC1C,sCAAoG;AAgCpG,MAAa,mBAAoB,SAAQ,uBAA6D;IAOpG
|
|
1
|
+
{"version":3,"file":"W3cCredentialRecord.js","sourceRoot":"","sources":["../../../../src/modules/vc/repository/W3cCredentialRecord.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,4DAAwD;AACxD,0CAAgD;AAChD,8CAA0C;AAC1C,sCAAoG;AAgCpG,MAAa,mBAAoB,SAAQ,uBAA6D;IAOpG,YAAmB,KAAiC;;QAClD,KAAK,EAAE,CAAA;QANO,SAAI,GAAG,mBAAmB,CAAC,IAAI,CAAA;QAO7C,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,EAAE,GAAG,MAAA,KAAK,CAAC,EAAE,mCAAI,IAAA,WAAI,GAAE,CAAA;YAC5B,IAAI,CAAC,SAAS,GAAG,MAAA,KAAK,CAAC,SAAS,mCAAI,IAAI,IAAI,EAAE,CAAA;YAC9C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;YACvB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;QACpC,CAAC;IACH,CAAC;IAEM,OAAO;QACZ,mGAAmG;QACnG,wDAAwD;QACxD,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAiB,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAA;QAEvG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|
5
|
-
"version": "0.6.0-pr-
|
|
5
|
+
"version": "0.6.0-pr-2094-20241124155338",
|
|
6
6
|
"files": [
|
|
7
7
|
"build"
|
|
8
8
|
],
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@digitalcredentials/jsonld": "^6.0.0",
|
|
21
|
-
"dcql": "^0.2.13",
|
|
22
21
|
"@digitalcredentials/jsonld-signatures": "^9.4.0",
|
|
23
22
|
"@digitalcredentials/vc": "^6.0.1",
|
|
24
23
|
"@multiformats/base-x": "^4.0.1",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DcqlError = void 0;
|
|
4
|
-
const error_1 = require("../../error");
|
|
5
|
-
class DcqlError extends error_1.CredoError {
|
|
6
|
-
constructor(message, { cause, additionalMessages } = {}) {
|
|
7
|
-
super(message, { cause });
|
|
8
|
-
this.additionalMessages = additionalMessages;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.DcqlError = DcqlError;
|
|
12
|
-
//# sourceMappingURL=DcqlError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DcqlError.js","sourceRoot":"","sources":["../../../src/modules/dcql/DcqlError.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AAExC,MAAa,SAAU,SAAQ,kBAAU;IAGvC,YACE,OAAe,EACf,EAAE,KAAK,EAAE,kBAAkB,KAA4D,EAAE;QAEzF,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QACzB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAA;IAC9C,CAAC;CACF;AAVD,8BAUC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DependencyManager, Module } from '../../plugins';
|
|
2
|
-
/**
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export declare class DcqlModule implements Module {
|
|
6
|
-
/**
|
|
7
|
-
* Registers the dependencies of the presentation-exchange module on the dependency manager.
|
|
8
|
-
*/
|
|
9
|
-
register(dependencyManager: DependencyManager): void;
|
|
10
|
-
}
|
|
@@ -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, DcqlPresentation as DcqlPresentation, DcqlEncodedPresentations } 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 queryCredentialsForDcqlQuery;
|
|
14
|
-
getCredentialsForRequest(agentContext: AgentContext, dcqlQuery: DcqlQuery.Input): 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
|
-
claims?: [{
|
|
25
|
-
namespace: string;
|
|
26
|
-
claim_name: string;
|
|
27
|
-
values?: (string | number | boolean)[] | undefined;
|
|
28
|
-
id?: string | undefined;
|
|
29
|
-
}, ...{
|
|
30
|
-
namespace: string;
|
|
31
|
-
claim_name: string;
|
|
32
|
-
values?: (string | number | boolean)[] | undefined;
|
|
33
|
-
id?: string | undefined;
|
|
34
|
-
}[]] | undefined;
|
|
35
|
-
claim_sets?: [string[], ...string[][]] | undefined;
|
|
36
|
-
meta?: {
|
|
37
|
-
doctype_value?: string | undefined;
|
|
38
|
-
} | undefined;
|
|
39
|
-
} | {
|
|
40
|
-
id: string;
|
|
41
|
-
format: "vc+sd-jwt";
|
|
42
|
-
claims?: [{
|
|
43
|
-
path: (string | number | null)[];
|
|
44
|
-
values?: (string | number | boolean)[] | undefined;
|
|
45
|
-
id?: string | undefined;
|
|
46
|
-
}, ...{
|
|
47
|
-
path: (string | number | null)[];
|
|
48
|
-
values?: (string | number | boolean)[] | undefined;
|
|
49
|
-
id?: string | undefined;
|
|
50
|
-
}[]] | undefined;
|
|
51
|
-
claim_sets?: [string[], ...string[][]] | undefined;
|
|
52
|
-
meta?: {
|
|
53
|
-
vct_values?: string[] | undefined;
|
|
54
|
-
} | undefined;
|
|
55
|
-
} | {
|
|
56
|
-
id: string;
|
|
57
|
-
format: "jwt_vc_json" | "jwt_vc_json-ld";
|
|
58
|
-
claims?: [{
|
|
59
|
-
path: (string | number | null)[];
|
|
60
|
-
values?: (string | number | boolean)[] | undefined;
|
|
61
|
-
id?: string | undefined;
|
|
62
|
-
}, ...{
|
|
63
|
-
path: (string | number | null)[];
|
|
64
|
-
values?: (string | number | boolean)[] | undefined;
|
|
65
|
-
id?: string | undefined;
|
|
66
|
-
}[]] | undefined;
|
|
67
|
-
claim_sets?: [string[], ...string[][]] | undefined;
|
|
68
|
-
}, ...({
|
|
69
|
-
id: string;
|
|
70
|
-
format: "mso_mdoc";
|
|
71
|
-
claims?: [{
|
|
72
|
-
namespace: string;
|
|
73
|
-
claim_name: string;
|
|
74
|
-
values?: (string | number | boolean)[] | undefined;
|
|
75
|
-
id?: string | undefined;
|
|
76
|
-
}, ...{
|
|
77
|
-
namespace: string;
|
|
78
|
-
claim_name: string;
|
|
79
|
-
values?: (string | number | boolean)[] | undefined;
|
|
80
|
-
id?: string | undefined;
|
|
81
|
-
}[]] | undefined;
|
|
82
|
-
claim_sets?: [string[], ...string[][]] | undefined;
|
|
83
|
-
meta?: {
|
|
84
|
-
doctype_value?: string | undefined;
|
|
85
|
-
} | undefined;
|
|
86
|
-
} | {
|
|
87
|
-
id: string;
|
|
88
|
-
format: "vc+sd-jwt";
|
|
89
|
-
claims?: [{
|
|
90
|
-
path: (string | number | null)[];
|
|
91
|
-
values?: (string | number | boolean)[] | undefined;
|
|
92
|
-
id?: string | undefined;
|
|
93
|
-
}, ...{
|
|
94
|
-
path: (string | number | null)[];
|
|
95
|
-
values?: (string | number | boolean)[] | undefined;
|
|
96
|
-
id?: string | undefined;
|
|
97
|
-
}[]] | undefined;
|
|
98
|
-
claim_sets?: [string[], ...string[][]] | undefined;
|
|
99
|
-
meta?: {
|
|
100
|
-
vct_values?: string[] | undefined;
|
|
101
|
-
} | undefined;
|
|
102
|
-
} | {
|
|
103
|
-
id: string;
|
|
104
|
-
format: "jwt_vc_json" | "jwt_vc_json-ld";
|
|
105
|
-
claims?: [{
|
|
106
|
-
path: (string | number | null)[];
|
|
107
|
-
values?: (string | number | boolean)[] | undefined;
|
|
108
|
-
id?: string | undefined;
|
|
109
|
-
}, ...{
|
|
110
|
-
path: (string | number | null)[];
|
|
111
|
-
values?: (string | number | boolean)[] | undefined;
|
|
112
|
-
id?: string | undefined;
|
|
113
|
-
}[]] | undefined;
|
|
114
|
-
claim_sets?: [string[], ...string[][]] | 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
|
-
createPresentation(agentContext: AgentContext, options: {
|
|
132
|
-
credentialQueryToCredential: DcqlCredentialsForRequest;
|
|
133
|
-
challenge: string;
|
|
134
|
-
domain?: string;
|
|
135
|
-
openid4vp?: Omit<MdocOpenId4VpSessionTranscriptOptions, 'verifierGeneratedNonce' | 'clientId'>;
|
|
136
|
-
}): Promise<DcqlPresentation>;
|
|
137
|
-
getEncodedPresentations(dcqlPresentation: DcqlPresentation): DcqlEncodedPresentations;
|
|
138
|
-
private getSdJwtVcApi;
|
|
139
|
-
private getMdocApi;
|
|
140
|
-
}
|
|
@@ -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,MAAM,GAAG,CAAC,CAAA;YACjE,CAAC;QACH,CAAC;QAED,MAAM,UAAU,GAA4D,EAAE,CAAA;QAE9E,MAAM,oBAAoB,GACxB,OAAO,C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,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,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DcqlCredentialsForRequest.js","sourceRoot":"","sources":["../../../../src/modules/dcql/models/DcqlCredentialsForRequest.ts"],"names":[],"mappings":""}
|