@pagopa/io-react-native-wallet 3.4.4 → 3.5.1
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/lib/commonjs/credential/issuance/README.md +10 -5
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +2 -3
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +7 -8
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/presentation/api/types.js.map +1 -1
- package/lib/commonjs/credential/status/README.md +15 -13
- package/lib/commonjs/credential/status/api/index.js.map +1 -1
- package/lib/commonjs/credential/status/api/types.js +27 -0
- package/lib/commonjs/credential/status/api/types.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js +26 -22
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js +4 -25
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/03-get-status.js +34 -0
- package/lib/commonjs/credential/status/v1.3.3/03-get-status.js.map +1 -0
- package/lib/commonjs/credential/status/v1.3.3/index.js +4 -1
- package/lib/commonjs/credential/status/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/common/get-status-l10n-ids.js +1 -1
- package/lib/module/credential/issuance/README.md +10 -5
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +2 -3
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +7 -8
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/presentation/api/types.js.map +1 -1
- package/lib/module/credential/status/README.md +15 -13
- package/lib/module/credential/status/api/index.js +3 -1
- package/lib/module/credential/status/api/index.js.map +1 -1
- package/lib/module/credential/status/api/types.js +20 -0
- package/lib/module/credential/status/api/types.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/01-status-list.js +24 -21
- package/lib/module/credential/status/v1.3.3/01-status-list.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js +5 -26
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/03-get-status.js +27 -0
- package/lib/module/credential/status/v1.3.3/03-get-status.js.map +1 -0
- package/lib/module/credential/status/v1.3.3/index.js +5 -2
- package/lib/module/credential/status/v1.3.3/index.js.map +1 -1
- package/lib/module/credentials-catalogue/common/get-status-l10n-ids.js +1 -1
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +9 -6
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/index.d.ts +1 -0
- package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts +2 -3
- package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/types.d.ts +2 -0
- package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/index.d.ts +3 -1
- package/lib/typescript/credential/status/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/status-assertion.d.ts +1 -1
- package/lib/typescript/credential/status/api/status-list.d.ts +27 -9
- package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/types.d.ts +20 -0
- package/lib/typescript/credential/status/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts +1 -0
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/03-get-status.d.ts +3 -0
- package/lib/typescript/credential/status/v1.3.3/03-get-status.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/api/index.d.ts +1 -1
- package/lib/typescript/credentials-catalogue/common/get-status-l10n-ids.d.ts +1 -1
- package/package.json +6 -6
- package/src/credential/issuance/README.md +10 -5
- package/src/credential/issuance/api/03-complete-user-authorization.ts +10 -6
- package/src/credential/issuance/api/index.ts +1 -0
- package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +2 -8
- package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +21 -19
- package/src/credential/presentation/api/06-evaluate-dcql-query.ts +2 -2
- package/src/credential/presentation/api/types.ts +3 -0
- package/src/credential/status/README.md +15 -13
- package/src/credential/status/api/index.ts +3 -1
- package/src/credential/status/api/status-assertion.ts +1 -1
- package/src/credential/status/api/status-list.ts +35 -12
- package/src/credential/status/api/types.ts +27 -0
- package/src/credential/status/v1.3.3/01-status-list.ts +30 -18
- package/src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts +5 -27
- package/src/credential/status/v1.3.3/03-get-status.ts +40 -0
- package/src/credential/status/v1.3.3/index.ts +4 -1
- package/src/credentials-catalogue/api/index.ts +1 -1
- package/src/credentials-catalogue/common/get-status-l10n-ids.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../src/credential/issuance/v1.3.3/mappers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,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,5 +1,4 @@
|
|
|
1
|
-
import type { DcqlQuery } from "
|
|
2
|
-
import type { Credential4Dcql, CredentialFormat, PresentationFrame } from "./types";
|
|
1
|
+
import type { Credential4Dcql, CredentialFormat, DcqlQuery, PresentationFrame } from "./types";
|
|
3
2
|
/**
|
|
4
3
|
* The purpose for the credential request by the RP.
|
|
5
4
|
*/
|
|
@@ -29,7 +28,7 @@ export interface EvaluateDcqlQueryApi {
|
|
|
29
28
|
* @returns Credentials that satisfy the query, with disclosure metadata.
|
|
30
29
|
* @throws {DcqlError} if the provided DCQL query is not valid
|
|
31
30
|
*/
|
|
32
|
-
evaluateDcqlQuery(query: DcqlQuery
|
|
31
|
+
evaluateDcqlQuery(query: DcqlQuery, credentialsSdJwt: Credential4Dcql[], credentialsMdoc?: Credential4Dcql[]): Promise<({
|
|
33
32
|
id: string;
|
|
34
33
|
credential: string;
|
|
35
34
|
keyTag: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"06-evaluate-dcql-query.d.ts","sourceRoot":"","sources":["../../../../../src/credential/presentation/api/06-evaluate-dcql-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"06-evaluate-dcql-query.d.ts","sourceRoot":"","sources":["../../../../../src/credential/presentation/api/06-evaluate-dcql-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM;IACN,MAAM;IACN,OAAO;CACR,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;OAUG;IACH,iBAAiB,CACf,KAAK,EAAE,SAAS,EAChB,gBAAgB,EAAE,eAAe,EAAE,EACnC,eAAe,CAAC,EAAE,eAAe,EAAE,GAClC,OAAO,CACR,CAAC;QACC,EAAE,EAAE,MAAM,CAAC;QACX,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;QAC3C,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;KAC/B,GAAG,gBAAgB,CAAC,EAAE,CACxB,CAAC;CACH"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import type { CryptoContext } from "@pagopa/io-react-native-jwt";
|
|
3
|
+
import type { DcqlQuery as DcqlQueryLib } from "dcql";
|
|
3
4
|
import type { jsonWebKeySet } from "@pagopa/io-wallet-oid-federation";
|
|
4
5
|
import type { SupportedSdJwtLegacyFormat } from "../../../sd-jwt/types";
|
|
5
6
|
export type PresentationParams = z.infer<typeof PresentationParams>;
|
|
@@ -111,6 +112,7 @@ export type RemotePresentation = {
|
|
|
111
112
|
* A pair that associate a key tag with a credential, used in DCQL queries
|
|
112
113
|
*/
|
|
113
114
|
export type Credential4Dcql = [string, string];
|
|
115
|
+
export type DcqlQuery = DcqlQueryLib.Input;
|
|
114
116
|
/**
|
|
115
117
|
* An object that defines claims to disclose. Nested claims must use a nested structure.
|
|
116
118
|
* @example { name: true, address: { country: true } }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/credential/presentation/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAA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IAC9B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,iBAAiB,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACO,MAAM;IACzB,iBAAiB;IAC6B,aAAa;CACzE,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,MAAM,EAAE,0BAA0B,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC"}
|
|
@@ -10,7 +10,9 @@ interface UnsupportedApi {
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* if (CredentialStatus.statusList.isSupported) {
|
|
13
|
-
* const statusList = await CredentialStatus.statusList.get(credential, format)
|
|
13
|
+
* const { statusList: statusListJwt, idx } = await CredentialStatus.statusList.get(credential, format)
|
|
14
|
+
* const statusList = await CredentialStatus.statusList.verifyAndParse(keys, statusListJwt)
|
|
15
|
+
* const status = CredentialStatus.statusList.getStatus(statusList, idx)
|
|
14
16
|
* }
|
|
15
17
|
*/
|
|
16
18
|
export interface CredentialStatusApi {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,UAAU,cAAc;IACtB,WAAW,EAAE,KAAK,CAAC;CACpB;AAED
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,UAAU,cAAc;IACtB,WAAW,EAAE,KAAK,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,kBAAkB,GAAG,cAAc,CAAC;IACrD,UAAU,EAAE,aAAa,GAAG,cAAc,CAAC;CAC5C;AAED,cAAc,SAAS,CAAC"}
|
|
@@ -32,7 +32,7 @@ export interface StatusAssertionApi {
|
|
|
32
32
|
* - The assertion is correctly signed;
|
|
33
33
|
* - It's bound to the given key.
|
|
34
34
|
* @since 1.0.0
|
|
35
|
-
* @deprecated since 1.3.3 - Use `statusList.verifyAndParse`
|
|
35
|
+
* @deprecated since 1.3.3 - Use `statusList.get`, `statusList.verifyAndParse` and `statusList.getStatus`
|
|
36
36
|
*
|
|
37
37
|
* @param issuerConf The Issuer configuration returned by `evaluateIssuerTrust`
|
|
38
38
|
* @param statusAssertion The encoded status assertion returned by `statusAssertion.get`
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Out } from "../../../utils/misc";
|
|
2
1
|
import type { CredentialFormat } from "../../../credential/issuance/api";
|
|
3
2
|
import type { JWK } from "../../../utils/jwk";
|
|
3
|
+
import type { StatusList } from "./types";
|
|
4
4
|
export interface StatusListApi {
|
|
5
5
|
isSupported: true;
|
|
6
6
|
/**
|
|
7
|
-
* Get the status list
|
|
7
|
+
* Get the status list token referenced by a credential. This function fetches the list
|
|
8
8
|
* from the uri found in the credential's `status` claim.
|
|
9
9
|
* @example
|
|
10
10
|
* {
|
|
@@ -19,7 +19,7 @@ export interface StatusListApi {
|
|
|
19
19
|
* @param credential The credential to get the status list for
|
|
20
20
|
* @param format The credential format
|
|
21
21
|
* @param context.appFetch Optional fetch function to use for the network request
|
|
22
|
-
* @returns The
|
|
22
|
+
* @returns The encoded status list token with its credential reference metadata
|
|
23
23
|
*/
|
|
24
24
|
get(credential: string, format: CredentialFormat, context?: {
|
|
25
25
|
appFetch?: GlobalFetch["fetch"];
|
|
@@ -30,15 +30,33 @@ export interface StatusListApi {
|
|
|
30
30
|
idx: number;
|
|
31
31
|
}>;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Get a status list token from its uri.
|
|
34
|
+
* @since 1.3.3
|
|
35
|
+
* @param uri The status list uri
|
|
36
|
+
* @param context.appFetch Optional fetch function to use for the network request
|
|
37
|
+
* @returns The encoded status list token
|
|
38
|
+
*/
|
|
39
|
+
getByUri(uri: string, context?: {
|
|
40
|
+
appFetch?: GlobalFetch["fetch"];
|
|
41
|
+
}): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Verifies the signature of a status list token and parses its payload.
|
|
34
44
|
* @since 1.3.3
|
|
35
45
|
* @param keys The JSON Web Key Set to verify the status list signature
|
|
36
|
-
* @param
|
|
37
|
-
* @
|
|
46
|
+
* @param statusList The encoded status list token
|
|
47
|
+
* @returns The decoded status list payload
|
|
38
48
|
*/
|
|
39
|
-
verifyAndParse(keys: JWK[],
|
|
40
|
-
|
|
49
|
+
verifyAndParse(keys: JWK[], statusList: string): Promise<StatusList>;
|
|
50
|
+
/**
|
|
51
|
+
* Extracts the status at the specified index from a decoded status list.
|
|
52
|
+
* @since 1.3.3
|
|
53
|
+
* @param statusList The decoded status list
|
|
54
|
+
* @param idx The index to read
|
|
55
|
+
* @return The status of the credential and the raw status in hexadecimal format (e.g. "0x01")
|
|
56
|
+
*/
|
|
57
|
+
getStatus(statusList: StatusList["status_list"], idx: number): {
|
|
58
|
+
rawStatus: string;
|
|
41
59
|
status: string;
|
|
42
|
-
}
|
|
60
|
+
};
|
|
43
61
|
}
|
|
44
62
|
//# sourceMappingURL=status-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-list.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/api/status-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"status-list.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/api/status-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,IAAI,CAAC;IAElB;;;;;;;;;;;;;;;;;OAiBG;IACH,GAAG,CACD,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;KACjC,GACA,OAAO,CAAC;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,KAAK,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC,CAAC;IAEH;;;;;;OAMG;IACH,QAAQ,CACN,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;KACjC,GACA,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;;OAMG;IACH,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAErE;;;;;;OAMG;IACH,SAAS,CACP,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,EACrC,GAAG,EAAE,MAAM,GACV;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
/**
|
|
2
3
|
* Common type for a parsed Status Assertion
|
|
3
4
|
*/
|
|
@@ -13,4 +14,23 @@ export type ParsedStatusAssertion = {
|
|
|
13
14
|
description: string;
|
|
14
15
|
};
|
|
15
16
|
};
|
|
17
|
+
export type StatusListContent = z.infer<typeof StatusListContent>;
|
|
18
|
+
export declare const StatusListContent: z.ZodObject<{
|
|
19
|
+
bits: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>;
|
|
20
|
+
lst: z.ZodString;
|
|
21
|
+
aggregation_uri: z.ZodOptional<z.ZodURL>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type StatusList = z.infer<typeof StatusList>;
|
|
24
|
+
export declare const StatusList: z.ZodObject<{
|
|
25
|
+
sub: z.ZodURL;
|
|
26
|
+
iat: z.ZodNumber;
|
|
27
|
+
iss: z.ZodOptional<z.ZodURL>;
|
|
28
|
+
exp: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
ttl: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
status_list: z.ZodObject<{
|
|
31
|
+
bits: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>;
|
|
32
|
+
lst: z.ZodString;
|
|
33
|
+
aggregation_uri: z.ZodOptional<z.ZodURL>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
}, z.core.$strip>;
|
|
16
36
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/api/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,wBAAwB,CAAC,EAAE;QACzB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,wBAAwB,CAAC,EAAE;QACzB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AASF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAClE,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,eAAO,MAAM,UAAU;;;;;;;;;;;iBAOrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"01-status-list.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/v1.3.3/01-status-list.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"01-status-list.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/v1.3.3/01-status-list.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAuCxD,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,UAAU,CAiBxD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,KAAK,CAQ9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"02-verify-and-parse-status-list.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"02-verify-and-parse-status-list.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,gBAAgB,CAMpE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"03-get-status.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/v1.3.3/03-get-status.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAmBxD,eAAO,MAAM,SAAS,EAAE,aAAa,CAAC,WAAW,CAkBhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/v1.3.3/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/credential/status/v1.3.3/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAKlD,eAAO,MAAM,gBAAgB,EAAE,mBAW9B,CAAC"}
|
|
@@ -38,7 +38,7 @@ export interface CredentialsCatalogueApi {
|
|
|
38
38
|
* Given a statusBit (e.g. "0x00", "0x0B") and a DigitalCredential from the
|
|
39
39
|
* catalogue, returns the matching l10n IDs or undefined if not found.
|
|
40
40
|
* The comparison is case-insensitive to handle uppercase statusBit values
|
|
41
|
-
* returned by
|
|
41
|
+
* returned by getStatus against lowercase keys in the catalogue.
|
|
42
42
|
*
|
|
43
43
|
* @since 1.0.0
|
|
44
44
|
*/
|
|
@@ -3,7 +3,7 @@ import { type CredentialsCatalogueApi } from "../api";
|
|
|
3
3
|
* Given a statusBit (e.g. "0x00", "0x0B") and a DigitalCredential from the
|
|
4
4
|
* catalogue, returns the matching l10n IDs or undefined if not found.
|
|
5
5
|
* The comparison is case-insensitive to handle uppercase statusBit values
|
|
6
|
-
* returned by
|
|
6
|
+
* returned by getStatus against lowercase keys in the catalogue.
|
|
7
7
|
*/
|
|
8
8
|
export declare const getStatusL10nIds: CredentialsCatalogueApi["getStatusL10nIds"];
|
|
9
9
|
//# sourceMappingURL=get-status-l10n-ids.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/io-react-native-wallet",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "Provide data structures, helpers and API for IO Wallet",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -140,11 +140,11 @@
|
|
|
140
140
|
]
|
|
141
141
|
},
|
|
142
142
|
"dependencies": {
|
|
143
|
-
"@pagopa/io-wallet-oauth2": "1.5.
|
|
144
|
-
"@pagopa/io-wallet-oid-federation": "1.5.
|
|
145
|
-
"@pagopa/io-wallet-oid4vci": "1.5.
|
|
146
|
-
"@pagopa/io-wallet-oid4vp": "1.5.
|
|
147
|
-
"@pagopa/io-wallet-utils": "1.5.
|
|
143
|
+
"@pagopa/io-wallet-oauth2": "1.5.3",
|
|
144
|
+
"@pagopa/io-wallet-oid-federation": "1.5.3",
|
|
145
|
+
"@pagopa/io-wallet-oid4vci": "1.5.3",
|
|
146
|
+
"@pagopa/io-wallet-oid4vp": "1.5.3",
|
|
147
|
+
"@pagopa/io-wallet-utils": "1.5.3",
|
|
148
148
|
"@sd-jwt/core": "^0.19.0",
|
|
149
149
|
"@sd-jwt/crypto-nodejs": "^0.19.0",
|
|
150
150
|
"@sd-jwt/jwt-status-list": "^0.19.0",
|
|
@@ -90,13 +90,13 @@ This process is initiated by the Authorization Server responding to the primary
|
|
|
90
90
|
|
|
91
91
|
Complete documentation for the MRTD PoP flow can be found here: [mrtd-pop](./mrtd-pop/README.md)
|
|
92
92
|
|
|
93
|
-
## Authentication through credentials (Query
|
|
93
|
+
## Authentication through credentials (Query Mode) - v1.3
|
|
94
94
|
|
|
95
|
-
When the credential is different than an eID, the flow requires the user to present other credentials in order to obtain the requested one. Starting from IT-Wallet specifications v1.3, the EAA issuance flow uses the query mode to complete the user authorization. This is done through the `
|
|
95
|
+
When the credential is different than an eID, the flow requires the user to present other credentials in order to obtain the requested one. Starting from IT-Wallet specifications v1.3, the EAA issuance flow uses the query mode to complete the user authorization. This is done through `getRequestedCredentialToBePresented`, followed by evaluating the returned `dcql_query` with `RemotePresentation.evaluateDcqlQuery`, and then by completing the authorization with `completeEaaUserAuthorizationWithQueryMode`.
|
|
96
96
|
|
|
97
97
|
## Authentication through credentials (Form Post JWT Mode) - v1.0
|
|
98
98
|
|
|
99
|
-
When the credential is different than an eID, the flow requires the user to present other credentials in order to obtain the requested one. This is done through the `getRequestedCredentialToBePresented
|
|
99
|
+
When the credential is different than an eID, the flow requires the user to present other credentials in order to obtain the requested one. This is done through the `getRequestedCredentialToBePresented`, followed by evaluating the returned `dcql_query` with `RemotePresentation.evaluateDcqlQuery`, and then by completing the authorization with `completeUserAuthorizationWithFormPostJwtMode` or `completeEaaUserAuthorizationWithQueryMode`.
|
|
100
100
|
|
|
101
101
|
The expected result from the authentication process is in `form_post.jwt` format as defined in [JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)](https://openid.net/specs/oauth-v2-jarm.html#name-response-mode-form_postjwt).
|
|
102
102
|
|
|
@@ -188,6 +188,11 @@ const requestObject =
|
|
|
188
188
|
appFetch
|
|
189
189
|
);
|
|
190
190
|
|
|
191
|
+
const evaluatedDcqlQuery = await wallet.RemotePresentation.evaluateDcqlQuery(
|
|
192
|
+
requestObject.dcql_query,
|
|
193
|
+
[[pid.keyTag, pid.credential]]
|
|
194
|
+
);
|
|
195
|
+
|
|
191
196
|
let code: string;
|
|
192
197
|
if (responseMode === "form_post.jwt") {
|
|
193
198
|
// Complete the user authorization via form_post.jwt mode
|
|
@@ -195,7 +200,7 @@ if (responseMode === "form_post.jwt") {
|
|
|
195
200
|
await wallet.CredentialIssuance.completeUserAuthorizationWithFormPostJwtMode(
|
|
196
201
|
requestObject,
|
|
197
202
|
issuerConf,
|
|
198
|
-
|
|
203
|
+
evaluatedDcqlQuery,
|
|
199
204
|
{ wiaCryptoContext, appFetch }
|
|
200
205
|
));
|
|
201
206
|
} else {
|
|
@@ -204,7 +209,7 @@ if (responseMode === "form_post.jwt") {
|
|
|
204
209
|
await wallet.CredentialIssuance.completeEaaUserAuthorizationWithQueryMode(
|
|
205
210
|
requestObject,
|
|
206
211
|
issuerConf,
|
|
207
|
-
|
|
212
|
+
evaluatedDcqlQuery,
|
|
208
213
|
REDIRECT_URI,
|
|
209
214
|
{ appFetch }
|
|
210
215
|
));
|
|
@@ -4,11 +4,15 @@ import type {
|
|
|
4
4
|
AuthorizationResult,
|
|
5
5
|
} from "../../../utils/auth";
|
|
6
6
|
import type { RequestObject } from "../../../credential/presentation/api";
|
|
7
|
+
import type { EvaluateDcqlQueryApi } from "../../../credential/presentation/api/06-evaluate-dcql-query";
|
|
8
|
+
import type { Out } from "../../../utils/misc";
|
|
7
9
|
import type { IssuerConfig } from "./IssuerConfig";
|
|
8
10
|
|
|
11
|
+
export type EvaluatedDcqlQuery = Out<EvaluateDcqlQueryApi["evaluateDcqlQuery"]>;
|
|
12
|
+
|
|
9
13
|
export interface CompleteUserAuthorizationApi {
|
|
10
14
|
/**
|
|
11
|
-
* WARNING: This function must be called after {@link startUserAuthorization}. The next
|
|
15
|
+
* WARNING: This function must be called after {@link startUserAuthorization}. The next step is evaluating the returned request object's DCQL query with {@link EvaluateDcqlQueryApi.evaluateDcqlQuery}.
|
|
12
16
|
*
|
|
13
17
|
* The interface of the phase to complete User authorization via presentation of existing credentials when the response mode is "form_post.jwt".
|
|
14
18
|
* It is used as a first step to complete the user authorization by obtaining the requested credential to be presented from the authorization server.
|
|
@@ -50,14 +54,14 @@ export interface CompleteUserAuthorizationApi {
|
|
|
50
54
|
*
|
|
51
55
|
* @param requestObject The request object containing the necessary parameters for authorization.
|
|
52
56
|
* @param issuerConfig The issuer configuration returned by {@link evaluateIssuerTrust}
|
|
53
|
-
* @param
|
|
57
|
+
* @param evaluatedDcqlQuery The result of evaluating the request object's DCQL query against the credentials to present.
|
|
54
58
|
* @param redirectUri The client redirect URI to which the authorization server will redirect after completing the authorization process.
|
|
55
59
|
* @returns The authorization response which contains code, state and iss
|
|
56
60
|
*/
|
|
57
61
|
completeEaaUserAuthorizationWithQueryMode(
|
|
58
62
|
requestObject: RequestObject,
|
|
59
63
|
issuerConf: IssuerConfig,
|
|
60
|
-
|
|
64
|
+
evaluatedDcqlQuery: EvaluatedDcqlQuery,
|
|
61
65
|
redirectUri: string,
|
|
62
66
|
context?: {
|
|
63
67
|
/** Fetch api implementation. Default: built-in fetch. */
|
|
@@ -68,7 +72,7 @@ export interface CompleteUserAuthorizationApi {
|
|
|
68
72
|
): Promise<AuthorizationResult>;
|
|
69
73
|
|
|
70
74
|
/**
|
|
71
|
-
* WARNING: This function must be called after {@link getRequestedCredentialToBePresented}. The next function to be called is {@link authorizeAccess}.
|
|
75
|
+
* WARNING: This function must be called after {@link getRequestedCredentialToBePresented} and after evaluating the request object's DCQL query with {@link EvaluateDcqlQueryApi.evaluateDcqlQuery}. The next function to be called is {@link authorizeAccess}.
|
|
72
76
|
*
|
|
73
77
|
* The interface of the phase to complete User authorization via presentation of existing credentials when the response mode is "form_post.jwt".
|
|
74
78
|
* The information is obtained by performing a POST request to the endpoint received in the response_uri field of the requestObject, where the Authorization Response payload is posted.
|
|
@@ -76,7 +80,7 @@ export interface CompleteUserAuthorizationApi {
|
|
|
76
80
|
* @since 1.0.0
|
|
77
81
|
*
|
|
78
82
|
* @param requestObject The request object containing the necessary parameters for authorization.
|
|
79
|
-
* @param
|
|
83
|
+
* @param evaluatedDcqlQuery The result of evaluating the request object's DCQL query against the credentials to present.
|
|
80
84
|
* @param appFetch (optional) fetch api implementation. Default: built-in fetch
|
|
81
85
|
* @returns the authorization response which contains code, state and iss
|
|
82
86
|
* @throws {ValidationFailed} if an error while validating the response
|
|
@@ -84,7 +88,7 @@ export interface CompleteUserAuthorizationApi {
|
|
|
84
88
|
completeUserAuthorizationWithFormPostJwtMode(
|
|
85
89
|
requestObject: RequestObject,
|
|
86
90
|
issuerConf: IssuerConfig,
|
|
87
|
-
|
|
91
|
+
evaluatedDcqlQuery: EvaluatedDcqlQuery,
|
|
88
92
|
context: {
|
|
89
93
|
wiaCryptoContext: CryptoContext;
|
|
90
94
|
appFetch?: GlobalFetch["fetch"];
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
} from "../../../utils/auth";
|
|
7
7
|
import { hasStatusOrThrow } from "../../../utils/misc";
|
|
8
8
|
import parseUrl from "parse-url";
|
|
9
|
-
import type { DcqlQuery } from "dcql";
|
|
10
9
|
import {
|
|
11
10
|
IssuerResponseError,
|
|
12
11
|
UnimplementedFeatureError,
|
|
@@ -141,7 +140,7 @@ export const completeUserAuthorizationWithFormPostJwtMode: IssuanceApi["complete
|
|
|
141
140
|
async (
|
|
142
141
|
requestObject,
|
|
143
142
|
_issuerConfig,
|
|
144
|
-
|
|
143
|
+
evaluatedDcqlQuery,
|
|
145
144
|
{ wiaCryptoContext, appFetch = fetch }
|
|
146
145
|
) => {
|
|
147
146
|
Logger.log(
|
|
@@ -149,11 +148,6 @@ export const completeUserAuthorizationWithFormPostJwtMode: IssuanceApi["complete
|
|
|
149
148
|
`The requeste credential is not a PersonIdentificationData, completing the user authorization with form_post.jwt mode`
|
|
150
149
|
);
|
|
151
150
|
|
|
152
|
-
const dcqlQueryResult = await RemotePresentationFlow.evaluateDcqlQuery(
|
|
153
|
-
requestObject.dcql_query as DcqlQuery,
|
|
154
|
-
[pid]
|
|
155
|
-
);
|
|
156
|
-
|
|
157
151
|
const authRequestObject = {
|
|
158
152
|
nonce: requestObject.nonce,
|
|
159
153
|
clientId: requestObject.client_id,
|
|
@@ -162,7 +156,7 @@ export const completeUserAuthorizationWithFormPostJwtMode: IssuanceApi["complete
|
|
|
162
156
|
|
|
163
157
|
const remotePresentation =
|
|
164
158
|
await RemotePresentationFlow.prepareRemotePresentations(
|
|
165
|
-
|
|
159
|
+
evaluatedDcqlQuery,
|
|
166
160
|
authRequestObject
|
|
167
161
|
);
|
|
168
162
|
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
type AuthorizationResult,
|
|
5
5
|
} from "../../../utils/auth";
|
|
6
6
|
import parseUrl from "parse-url";
|
|
7
|
-
import type { DcqlQuery } from "dcql";
|
|
8
7
|
import {
|
|
9
8
|
createAuthorizationResponse,
|
|
10
9
|
parseAuthorizeRequest,
|
|
@@ -23,7 +22,7 @@ import {
|
|
|
23
22
|
} from "../../../utils/callbacks";
|
|
24
23
|
import { sdkConfigV1_3, sdkConfigV1_4 } from "../../../utils/config";
|
|
25
24
|
import { IoWalletError, IssuerResponseError } from "../../../utils/errors";
|
|
26
|
-
import type { IssuanceApi, IssuerConfig } from "../api";
|
|
25
|
+
import type { EvaluatedDcqlQuery, IssuanceApi, IssuerConfig } from "../api";
|
|
27
26
|
import { mapToRequestObject } from "./mappers";
|
|
28
27
|
import type { RequestObject } from "../../presentation";
|
|
29
28
|
import { hasStatusOrThrow } from "../../../utils/misc";
|
|
@@ -117,7 +116,12 @@ export const getRequestedCredentialToBePresented: IssuanceApi["getRequestedCrede
|
|
|
117
116
|
|
|
118
117
|
// NOTE: this function is not used in the 1.3 issuance flow. It may be removed in the future.
|
|
119
118
|
export const completeUserAuthorizationWithFormPostJwtMode: IssuanceApi["completeUserAuthorizationWithFormPostJwtMode"] =
|
|
120
|
-
async (
|
|
119
|
+
async (
|
|
120
|
+
requestObject,
|
|
121
|
+
issuerConfig,
|
|
122
|
+
evaluatedDcqlQuery,
|
|
123
|
+
{ appFetch = fetch }
|
|
124
|
+
) => {
|
|
121
125
|
Logger.log(
|
|
122
126
|
LogLevel.DEBUG,
|
|
123
127
|
"The requested credential is not a PID, completing the user authorization with form_post.jwt mode"
|
|
@@ -126,7 +130,7 @@ export const completeUserAuthorizationWithFormPostJwtMode: IssuanceApi["complete
|
|
|
126
130
|
const authzResponse = await processPidPresentationAndCreateAuthzResponse({
|
|
127
131
|
requestObject,
|
|
128
132
|
issuerConfig,
|
|
129
|
-
|
|
133
|
+
evaluatedDcqlQuery,
|
|
130
134
|
});
|
|
131
135
|
|
|
132
136
|
Logger.log(LogLevel.DEBUG, `Authz response: ${authzResponse}`);
|
|
@@ -159,7 +163,7 @@ export const completeEaaUserAuthorizationWithQueryMode: IssuanceApi["completeEaa
|
|
|
159
163
|
async (
|
|
160
164
|
requestObject,
|
|
161
165
|
issuerConfig,
|
|
162
|
-
|
|
166
|
+
evaluatedDcqlQuery,
|
|
163
167
|
clientRedirectUri,
|
|
164
168
|
{ appFetch = fetch, fetchFinalRedirectUri } = {}
|
|
165
169
|
) => {
|
|
@@ -171,7 +175,7 @@ export const completeEaaUserAuthorizationWithQueryMode: IssuanceApi["completeEaa
|
|
|
171
175
|
const authzResponse = await processPidPresentationAndCreateAuthzResponse({
|
|
172
176
|
requestObject,
|
|
173
177
|
issuerConfig,
|
|
174
|
-
|
|
178
|
+
evaluatedDcqlQuery,
|
|
175
179
|
});
|
|
176
180
|
|
|
177
181
|
Logger.log(
|
|
@@ -254,29 +258,27 @@ export const parseAuthorizationResponse = (
|
|
|
254
258
|
* Utility function to process the DCQL query for PID presentation and to create the authorization response to send to the Issuer.
|
|
255
259
|
* @param params.requestObject - The request object containing the DCQL query
|
|
256
260
|
* @param params.issuerConfig - The Issuer unified configuration
|
|
257
|
-
* @param params.
|
|
261
|
+
* @param params.evaluatedDcqlQuery - Credentials that satisfy the request object's DCQL query
|
|
258
262
|
* @returns The authorization response containing the JARM to be sent to the Issuer
|
|
259
263
|
*/
|
|
260
264
|
const processPidPresentationAndCreateAuthzResponse = async ({
|
|
261
265
|
requestObject,
|
|
262
266
|
issuerConfig,
|
|
263
|
-
|
|
267
|
+
evaluatedDcqlQuery,
|
|
264
268
|
}: {
|
|
265
269
|
requestObject: RequestObject;
|
|
266
270
|
issuerConfig: IssuerConfig;
|
|
267
|
-
|
|
271
|
+
evaluatedDcqlQuery: EvaluatedDcqlQuery;
|
|
268
272
|
}): Promise<CreateAuthorizationResponseResult> => {
|
|
269
|
-
const dcqlQueryResult = await RemotePresentationFlow.evaluateDcqlQuery(
|
|
270
|
-
requestObject.dcql_query as DcqlQuery,
|
|
271
|
-
[pid]
|
|
272
|
-
);
|
|
273
|
-
|
|
274
273
|
const remotePresentation =
|
|
275
|
-
await RemotePresentationFlow.prepareRemotePresentations(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
274
|
+
await RemotePresentationFlow.prepareRemotePresentations(
|
|
275
|
+
evaluatedDcqlQuery,
|
|
276
|
+
{
|
|
277
|
+
clientId: requestObject.client_id,
|
|
278
|
+
nonce: requestObject.nonce,
|
|
279
|
+
responseUri: requestObject.response_uri,
|
|
280
|
+
}
|
|
281
|
+
);
|
|
280
282
|
|
|
281
283
|
const vp_token = remotePresentation.presentations.reduce(
|
|
282
284
|
(acc, { credentialId, vpToken }) => ({ ...acc, [credentialId]: [vpToken] }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DcqlQuery } from "dcql";
|
|
2
1
|
import type {
|
|
3
2
|
Credential4Dcql,
|
|
4
3
|
CredentialFormat,
|
|
4
|
+
DcqlQuery,
|
|
5
5
|
PresentationFrame,
|
|
6
6
|
} from "./types";
|
|
7
7
|
|
|
@@ -38,7 +38,7 @@ export interface EvaluateDcqlQueryApi {
|
|
|
38
38
|
* @throws {DcqlError} if the provided DCQL query is not valid
|
|
39
39
|
*/
|
|
40
40
|
evaluateDcqlQuery(
|
|
41
|
-
query: DcqlQuery
|
|
41
|
+
query: DcqlQuery,
|
|
42
42
|
credentialsSdJwt: Credential4Dcql[],
|
|
43
43
|
credentialsMdoc?: Credential4Dcql[]
|
|
44
44
|
): Promise<
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import type { CryptoContext } from "@pagopa/io-react-native-jwt";
|
|
3
|
+
import type { DcqlQuery as DcqlQueryLib } from "dcql";
|
|
3
4
|
import type { jsonWebKeySet } from "@pagopa/io-wallet-oid-federation";
|
|
4
5
|
import type { SupportedSdJwtLegacyFormat } from "../../../sd-jwt/types";
|
|
5
6
|
|
|
@@ -112,6 +113,8 @@ export type RemotePresentation = {
|
|
|
112
113
|
*/
|
|
113
114
|
export type Credential4Dcql = [string /* keyTag */, string /* credential */];
|
|
114
115
|
|
|
116
|
+
export type DcqlQuery = DcqlQueryLib.Input;
|
|
117
|
+
|
|
115
118
|
/**
|
|
116
119
|
* An object that defines claims to disclose. Nested claims must use a nested structure.
|
|
117
120
|
* @example { name: true, address: { country: true } }
|