@pagopa/io-react-native-wallet 1.1.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +3 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +7 -5
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +47 -0
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +82 -0
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +35 -0
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +63 -0
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +169 -0
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +202 -0
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/README.md +43 -4
- package/lib/commonjs/credential/presentation/errors.js +52 -1
- package/lib/commonjs/credential/presentation/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/index.js +27 -6
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +69 -4
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/entity/trust/types.js +4 -1
- package/lib/commonjs/entity/trust/types.js.map +1 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +3 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/presentation/01-start-flow.js +8 -6
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/03-get-request-object.js +39 -0
- package/lib/module/credential/presentation/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +75 -0
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
- package/lib/module/credential/presentation/05-verify-request-object.js +28 -0
- package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +56 -0
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +161 -0
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
- package/lib/module/credential/presentation/08-send-authorization-response.js +188 -0
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/README.md +43 -4
- package/lib/module/credential/presentation/errors.js +48 -0
- package/lib/module/credential/presentation/errors.js.map +1 -1
- package/lib/module/credential/presentation/index.js +7 -4
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/types.js +67 -3
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/entity/trust/types.js +4 -1
- package/lib/module/entity/trust/types.js.map +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/{04-get-request-object.d.ts → 03-get-request-object.d.ts} +3 -5
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/{03-retrieve-jwks.d.ts → 04-retrieve-rp-jwks.d.ts} +5 -4
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +8 -0
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +26 -0
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +27 -0
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +99 -0
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/errors.d.ts +33 -0
- package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/index.d.ts +8 -5
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +612 -9
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
- package/lib/typescript/entity/trust/index.d.ts +152 -0
- package/lib/typescript/entity/trust/index.d.ts.map +1 -1
- package/lib/typescript/entity/trust/types.d.ts +2088 -0
- package/lib/typescript/entity/trust/types.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/credential/issuance/04-complete-user-authorization.ts +2 -2
- package/src/credential/presentation/01-start-flow.ts +10 -6
- package/src/credential/presentation/{04-get-request-object.ts → 03-get-request-object.ts} +6 -51
- package/src/credential/presentation/{03-retrieve-jwks.ts → 04-retrieve-rp-jwks.ts} +39 -24
- package/src/credential/presentation/05-verify-request-object.ts +35 -0
- package/src/credential/presentation/06-fetch-presentation-definition.ts +78 -0
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +204 -0
- package/src/credential/presentation/08-send-authorization-response.ts +251 -0
- package/src/credential/presentation/README.md +43 -4
- package/src/credential/presentation/errors.ts +48 -0
- package/src/credential/presentation/index.ts +27 -9
- package/src/credential/presentation/types.ts +59 -3
- package/src/entity/trust/types.ts +3 -0
- package/lib/commonjs/credential/presentation/03-retrieve-jwks.js +0 -68
- package/lib/commonjs/credential/presentation/03-retrieve-jwks.js.map +0 -1
- package/lib/commonjs/credential/presentation/04-get-request-object.js +0 -82
- package/lib/commonjs/credential/presentation/04-get-request-object.js.map +0 -1
- package/lib/commonjs/credential/presentation/05-send-authorization-response.js +0 -139
- package/lib/commonjs/credential/presentation/05-send-authorization-response.js.map +0 -1
- package/lib/module/credential/presentation/03-retrieve-jwks.js +0 -61
- package/lib/module/credential/presentation/03-retrieve-jwks.js.map +0 -1
- package/lib/module/credential/presentation/04-get-request-object.js +0 -74
- package/lib/module/credential/presentation/04-get-request-object.js.map +0 -1
- package/lib/module/credential/presentation/05-send-authorization-response.js +0 -128
- package/lib/module/credential/presentation/05-send-authorization-response.js.map +0 -1
- package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/04-get-request-object.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/05-send-authorization-response.d.ts +0 -34
- package/lib/typescript/credential/presentation/05-send-authorization-response.d.ts.map +0 -1
- package/src/credential/presentation/05-send-authorization-response.ts +0 -168
@@ -0,0 +1,26 @@
|
|
1
|
+
import { PresentationDefinition, RequestObject } from "./types";
|
2
|
+
import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
|
3
|
+
export type FetchPresentationDefinition = (requestObject: RequestObject, context?: {
|
4
|
+
appFetch?: GlobalFetch["fetch"];
|
5
|
+
}, rpConf?: RelyingPartyEntityConfiguration["payload"]["metadata"]) => Promise<{
|
6
|
+
presentationDefinition: PresentationDefinition;
|
7
|
+
}>;
|
8
|
+
/**
|
9
|
+
* Retrieves a PresentationDefinition based on the given parameters.
|
10
|
+
*
|
11
|
+
* The method attempts the following strategies in order:
|
12
|
+
* 1. Checks if `presentation_definition` is directly available in the request object.
|
13
|
+
* 2. Fetches the `presentation_definition` from the URI provided in the relying party configuration.
|
14
|
+
* 3. Uses a pre-configured `presentation_definition` from the relying party configuration if the `scope` is present in the request object.
|
15
|
+
*
|
16
|
+
* If none of the above conditions are met, the function throws an error indicating the definition could not be found.
|
17
|
+
*
|
18
|
+
* @param {RequestObject} requestObject - The request object containing the presentation definition or references to it.
|
19
|
+
* @param {RelyingPartyEntityConfiguration["payload"]["metadata"]} [rpConf] - Optional relying party configuration.
|
20
|
+
* @param {Object} [context] - Optional context for providing a custom fetch implementation.
|
21
|
+
* @param {GlobalFetch["fetch"]} [context.appFetch] - Custom fetch function, defaults to global `fetch`.
|
22
|
+
* @returns {Promise<{ presentationDefinition: PresentationDefinition }>} - Resolves with the presentation definition.
|
23
|
+
* @throws {Error} - Throws if the presentation definition cannot be found or fetched.
|
24
|
+
*/
|
25
|
+
export declare const fetchPresentDefinition: FetchPresentationDefinition;
|
26
|
+
//# sourceMappingURL=06-fetch-presentation-definition.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"06-fetch-presentation-definition.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/06-fetch-presentation-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,2BAA2B,GAAG,CACxC,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,EACD,MAAM,CAAC,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,KAC5D,OAAO,CAAC;IACX,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,EAAE,2BA8CpC,CAAC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { InputDescriptor } from "./types";
|
2
|
+
import { SdJwt4VC, type DisclosureWithEncoded } from "../../sd-jwt/types";
|
3
|
+
export type EvaluatedDisclosures = {
|
4
|
+
requiredDisclosures: DisclosureWithEncoded[];
|
5
|
+
optionalDisclosures: DisclosureWithEncoded[];
|
6
|
+
};
|
7
|
+
export type EvaluateInputDescriptorSdJwt4VC = (inputDescriptor: InputDescriptor, payloadCredential: SdJwt4VC["payload"], disclosures: DisclosureWithEncoded[]) => EvaluatedDisclosures;
|
8
|
+
/**
|
9
|
+
* Evaluates an InputDescriptor for an SD-JWT-based verifiable credential.
|
10
|
+
*
|
11
|
+
* - Checks each field in the InputDescriptor against the provided `payloadCredential`
|
12
|
+
* and `disclosures` (selectively disclosed claims).
|
13
|
+
* - Validates whether required fields are present (unless marked optional)
|
14
|
+
* and match any specified JSONPath.
|
15
|
+
* - If a field includes a JSON Schema filter, validates the claim value against that schema.
|
16
|
+
* - Enforces `limit_disclosure` rules by returning only disclosures matching the specified fields
|
17
|
+
* if set to "required". Otherwise return the array of all disclosures.
|
18
|
+
* - Throws an error if a required field is invalid or missing.
|
19
|
+
*
|
20
|
+
* @param inputDescriptor - Describes constraints (fields, filters, etc.) that must be satisfied.
|
21
|
+
* @param payloadCredential - The credential payload to check against.
|
22
|
+
* @param disclosures - An array of DisclosureWithEncoded objects representing selective disclosures.
|
23
|
+
* @returns A filtered list of disclosures satisfying the descriptor constraints, or throws an error if not.
|
24
|
+
* @throws Will throw an error if any required constraint fails or if JSONPath lookups are invalid.
|
25
|
+
*/
|
26
|
+
export declare const evaluateInputDescriptorForSdJwt4VC: EvaluateInputDescriptorSdJwt4VC;
|
27
|
+
//# sourceMappingURL=07-evaluate-input-descriptor.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"07-evaluate-input-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-input-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAO1E,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;IAC7C,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,CAC5C,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,QAAQ,CAAC,SAAS,CAAC,EACtC,WAAW,EAAE,qBAAqB,EAAE,KACjC,oBAAoB,CAAC;AA4E1B;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kCAAkC,EAAE,+BA4F9C,CAAC"}
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import type { FetchJwks } from "./04-retrieve-rp-jwks";
|
2
|
+
import type { VerifyRequestObjectSignature } from "./05-verify-request-object";
|
3
|
+
import type { JWK } from "@pagopa/io-react-native-jwt/lib/typescript/types";
|
4
|
+
import { type Out } from "../../utils/misc";
|
5
|
+
import { PresentationDefinition, type Presentation } from "./types";
|
6
|
+
import * as z from "zod";
|
7
|
+
export type AuthorizationResponse = z.infer<typeof AuthorizationResponse>;
|
8
|
+
export declare const AuthorizationResponse: z.ZodObject<{
|
9
|
+
status: z.ZodOptional<z.ZodString>;
|
10
|
+
response_code: z.ZodOptional<z.ZodString>;
|
11
|
+
redirect_uri: z.ZodOptional<z.ZodString>;
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
13
|
+
status?: string | undefined;
|
14
|
+
response_code?: string | undefined;
|
15
|
+
redirect_uri?: string | undefined;
|
16
|
+
}, {
|
17
|
+
status?: string | undefined;
|
18
|
+
response_code?: string | undefined;
|
19
|
+
redirect_uri?: string | undefined;
|
20
|
+
}>;
|
21
|
+
/**
|
22
|
+
* Selects an RSA public key (with `use = enc` and `kty = RSA`) from the set of JWK keys
|
23
|
+
* offered by the Relying Party (RP) for encryption.
|
24
|
+
*
|
25
|
+
* @param rpJwkKeys - The array of JWKs retrieved from the RP entity configuration.
|
26
|
+
* @returns The first suitable RSA public key found in the list.
|
27
|
+
* @throws {NoSuitableKeysFoundInEntityConfiguration} If no suitable RSA encryption key is found.
|
28
|
+
*/
|
29
|
+
export declare const chooseRSAPublicKeyToEncrypt: (rpJwkKeys: Out<FetchJwks>["keys"]) => JWK;
|
30
|
+
/**
|
31
|
+
* Prepares a Verified Presentation (VP) token to be sent as part of an
|
32
|
+
* authorization response in an OpenID 4 Verifiable Presentations flow.
|
33
|
+
*
|
34
|
+
* @param requestObject - The request object containing the nonce, response URI, and other necessary info.
|
35
|
+
* @param presentationTuple - A tuple containing a verifiable credential, the claims to disclose,
|
36
|
+
* and a cryptographic context for signing.
|
37
|
+
* @returns An object containing the signed VP token (`vp_token`) and a `presentation_submission` object.
|
38
|
+
* @param presentationDefinition - Definition outlining presentation requirements.
|
39
|
+
* @param presentationTuple - Tuple containing:
|
40
|
+
* - A verifiable credential.
|
41
|
+
* - Claims that should be disclosed.
|
42
|
+
* - Cryptographic context for signing.
|
43
|
+
* @returns An object with:
|
44
|
+
* - `vp_token`: The signed VP token.
|
45
|
+
* - `presentation_submission`: Object mapping disclosed credentials to the request.
|
46
|
+
*
|
47
|
+
* @remarks
|
48
|
+
* 1. The `disclose()` function is used to produce a token with only the requested claims.
|
49
|
+
* 2. A new JWT is then signed, including the VP, `jti`, `iss`, `nonce`, audience, and expiration.
|
50
|
+
* 3. The `presentation_submission` object follows the OpenID 4 VP specification for describing
|
51
|
+
* how the disclosed credentials map to the request.
|
52
|
+
*
|
53
|
+
* @todo [SIW-353] Support multiple verifiable credentials in a single request.
|
54
|
+
*/
|
55
|
+
export declare const prepareVpToken: (requestObject: Out<VerifyRequestObjectSignature>["requestObject"], presentationDefinition: PresentationDefinition, [verifiableCredential, requestedClaims, cryptoContext]: Presentation) => Promise<{
|
56
|
+
vp_token: string;
|
57
|
+
presentation_submission: Record<string, unknown>;
|
58
|
+
}>;
|
59
|
+
/**
|
60
|
+
* Builds a URL-encoded form body for a direct POST response without encryption.
|
61
|
+
*
|
62
|
+
* @param requestObject - Contains state, nonce, and other relevant info.
|
63
|
+
* @param vpToken - The signed VP token to include.
|
64
|
+
* @param presentationSubmission - Object mapping credential disclosures.
|
65
|
+
* @returns A URL-encoded string suitable for an `application/x-www-form-urlencoded` POST body.
|
66
|
+
*/
|
67
|
+
export declare const buildDirectPostBody: (requestObject: Out<VerifyRequestObjectSignature>["requestObject"], vpToken: string, presentationSubmission: Record<string, unknown>) => Promise<string>;
|
68
|
+
/**
|
69
|
+
* Builds a URL-encoded form body for a direct POST response using JWT encryption.
|
70
|
+
*
|
71
|
+
* @param jwkKeys - Array of JWKs from the Relying Party for encryption.
|
72
|
+
* @param requestObject - Contains state, nonce, and other relevant info.
|
73
|
+
* @param vpToken - The signed VP token to encrypt.
|
74
|
+
* @param presentationSubmission - Object mapping credential disclosures.
|
75
|
+
* @returns A URL-encoded string for an `application/x-www-form-urlencoded` POST body,
|
76
|
+
* where `response` contains the encrypted JWE.
|
77
|
+
*/
|
78
|
+
export declare const buildDirectPostJwtBody: (jwkKeys: Out<FetchJwks>["keys"], requestObject: Out<VerifyRequestObjectSignature>["requestObject"], vpToken: string, presentationSubmission: Record<string, unknown>) => Promise<string>;
|
79
|
+
/**
|
80
|
+
* Type definition for the function that sends the authorization response
|
81
|
+
* to the Relying Party, completing the presentation flow.
|
82
|
+
*/
|
83
|
+
export type SendAuthorizationResponse = (requestObject: Out<VerifyRequestObjectSignature>["requestObject"], presentationDefinition: PresentationDefinition, jwkKeys: Out<FetchJwks>["keys"], presentation: Presentation, // TODO: [SIW-353] support multiple presentations
|
84
|
+
context: {
|
85
|
+
appFetch?: GlobalFetch["fetch"];
|
86
|
+
}) => Promise<AuthorizationResponse>;
|
87
|
+
/**
|
88
|
+
* Sends the authorization response to the Relying Party (RP) using the specified `response_mode`.
|
89
|
+
* This function completes the presentation flow in an OpenID 4 Verifiable Presentations scenario.
|
90
|
+
*
|
91
|
+
* @param requestObject - The request details, including presentation requirements.
|
92
|
+
* @param presentationDefinition - The definition of the expected presentation.
|
93
|
+
* @param jwkKeys - Array of JWKs from the Relying Party for optional encryption.
|
94
|
+
* @param presentation - Tuple with verifiable credential, claims, and crypto context.
|
95
|
+
* @param context - Contains optional custom fetch implementation.
|
96
|
+
* @returns Parsed and validated authorization response from the Relying Party.
|
97
|
+
*/
|
98
|
+
export declare const sendAuthorizationResponse: SendAuthorizationResponse;
|
99
|
+
//# sourceMappingURL=08-send-authorization-response.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"08-send-authorization-response.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/08-send-authorization-response.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kDAAkD,CAAC;AAE5E,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAUhC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,cAC3B,IAAI,SAAS,CAAC,CAAC,MAAM,CAAC,KAChC,GAaF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,cAAc,kBACV,IAAI,4BAA4B,CAAC,CAAC,eAAe,CAAC,0BACzC,sBAAsB;cAGpC,MAAM;6BACS,OAAO,MAAM,EAAE,OAAO,CAAC;EAuCjD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,kBACf,IAAI,4BAA4B,CAAC,CAAC,eAAe,CAAC,WACxD,MAAM,0BACS,OAAO,MAAM,EAAE,OAAO,CAAC,KAC9C,QAAQ,MAAM,CAQhB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,YACxB,IAAI,SAAS,CAAC,CAAC,MAAM,CAAC,iBAChB,IAAI,4BAA4B,CAAC,CAAC,eAAe,CAAC,WACxD,MAAM,0BACS,OAAO,MAAM,EAAE,OAAO,CAAC,KAC9C,QAAQ,MAAM,CAqBhB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,aAAa,EAAE,GAAG,CAAC,4BAA4B,CAAC,CAAC,eAAe,CAAC,EACjE,sBAAsB,EAAE,sBAAsB,EAC9C,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAC/B,YAAY,EAAE,YAAY,EAAE,iDAAiD;AAC7E,OAAO,EAAE;IACP,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAwCvC,CAAC"}
|
@@ -22,4 +22,37 @@ export declare class NoSuitableKeysFoundInEntityConfiguration extends IoWalletEr
|
|
22
22
|
*/
|
23
23
|
constructor(scenario: string);
|
24
24
|
}
|
25
|
+
/**
|
26
|
+
* When a QR code is not valid.
|
27
|
+
*
|
28
|
+
*/
|
29
|
+
export declare class InvalidQRCodeError extends IoWalletError {
|
30
|
+
code: string;
|
31
|
+
/**
|
32
|
+
* @param detail A description of why the QR code is considered invalid.
|
33
|
+
*/
|
34
|
+
constructor(detail: string);
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* When the entity is unverified because the Relying Party is not trusted.
|
38
|
+
*
|
39
|
+
*/
|
40
|
+
export declare class UnverifiedEntityError extends IoWalletError {
|
41
|
+
code: string;
|
42
|
+
/**
|
43
|
+
* @param reason A description of why the entity cannot be verified.
|
44
|
+
*/
|
45
|
+
constructor(reason: string);
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* When some required data is missing to continue because certain attributes are not contained inside the wallet.
|
49
|
+
*
|
50
|
+
*/
|
51
|
+
export declare class MissingDataError extends IoWalletError {
|
52
|
+
code: string;
|
53
|
+
/**
|
54
|
+
* @param missingAttributes An array or description of the attributes that are missing.
|
55
|
+
*/
|
56
|
+
constructor(missingAttributes: string);
|
57
|
+
}
|
25
58
|
//# sourceMappingURL=errors.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AAEnE;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,aAAa;IACvD,IAAI,SAAwD;IAE5D,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IAEd,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;gBAGb,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,MAAsB,EAC7B,MAAM,GAAE,MAAsB;CAMjC;AAED;;;GAGG;AACH,qBAAa,wCAAyC,SAAQ,aAAa;IACzE,IAAI,SAAoC;IAExC;;OAEG;gBACS,QAAQ,EAAE,MAAM;CAI7B"}
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AAEnE;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,aAAa;IACvD,IAAI,SAAwD;IAE5D,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IAEd,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;gBAGb,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,MAAsB,EAC7B,MAAM,GAAE,MAAsB;CAMjC;AAED;;;GAGG;AACH,qBAAa,wCAAyC,SAAQ,aAAa;IACzE,IAAI,SAAoC;IAExC;;OAEG;gBACS,QAAQ,EAAE,MAAM;CAI7B;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAI,SAAyB;IAE7B;;OAEG;gBACS,MAAM,EAAE,MAAM;CAI3B;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;IACtD,IAAI,SAA8B;IAElC;;OAEG;gBACS,MAAM,EAAE,MAAM;CAI3B;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,IAAI,SAAsB;IAE1B;;OAEG;gBACS,iBAAiB,EAAE,MAAM;CAItC"}
|
@@ -1,9 +1,12 @@
|
|
1
1
|
import { startFlowFromQR, type StartFlow } from "./01-start-flow";
|
2
2
|
import { evaluateRelyingPartyTrust, type EvaluateRelyingPartyTrust } from "./02-evaluate-rp-trust";
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
3
|
+
import { getRequestObject, type GetRequestObject } from "./03-get-request-object";
|
4
|
+
import { fetchJwksFromRequestObject, fetchJwksFromConfig, type FetchJwks } from "./04-retrieve-rp-jwks";
|
5
|
+
import { verifyRequestObjectSignature, type VerifyRequestObjectSignature } from "./05-verify-request-object";
|
6
|
+
import { fetchPresentDefinition, type FetchPresentationDefinition } from "./06-fetch-presentation-definition";
|
7
|
+
import { evaluateInputDescriptorForSdJwt4VC, type EvaluateInputDescriptorSdJwt4VC } from "./07-evaluate-input-descriptor";
|
8
|
+
import { sendAuthorizationResponse, type SendAuthorizationResponse } from "./08-send-authorization-response";
|
6
9
|
import * as Errors from "./errors";
|
7
|
-
export { startFlowFromQR, evaluateRelyingPartyTrust,
|
8
|
-
export type { StartFlow, EvaluateRelyingPartyTrust, FetchJwks,
|
10
|
+
export { startFlowFromQR, evaluateRelyingPartyTrust, getRequestObject, fetchJwksFromRequestObject, fetchJwksFromConfig, verifyRequestObjectSignature, fetchPresentDefinition, evaluateInputDescriptorForSdJwt4VC, sendAuthorizationResponse, Errors, };
|
11
|
+
export type { StartFlow, EvaluateRelyingPartyTrust, GetRequestObject, FetchJwks, VerifyRequestObjectSignature, FetchPresentationDefinition, EvaluateInputDescriptorSdJwt4VC, SendAuthorizationResponse, };
|
9
12
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,SAAS,EACf,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,KAAK,SAAS,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,4BAA4B,EAC5B,KAAK,4BAA4B,EAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,EACjC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,kCAAkC,EAClC,KAAK,+BAA+B,EACrC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,kCAAkC,EAClC,yBAAyB,EACzB,MAAM,GACP,CAAC;AACF,YAAY,EACV,SAAS,EACT,yBAAyB,EACzB,gBAAgB,EAChB,SAAS,EACT,4BAA4B,EAC5B,2BAA2B,EAC3B,+BAA+B,EAC/B,yBAAyB,GAC1B,CAAC"}
|