@pagopa/io-react-native-wallet 0.24.1 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/README.md +0 -32
  2. package/lib/commonjs/client/generated/wallet-provider.js +39 -16
  3. package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
  4. package/lib/commonjs/client/index.js +25 -10
  5. package/lib/commonjs/client/index.js.map +1 -1
  6. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +2 -2
  7. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +36 -67
  8. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  9. package/lib/commonjs/credential/issuance/05-authorize-access.js +5 -2
  10. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  11. package/lib/commonjs/credential/issuance/06-obtain-credential.js +26 -17
  12. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  13. package/lib/commonjs/credential/issuance/README.md +8 -14
  14. package/lib/commonjs/credential/issuance/errors.js +52 -0
  15. package/lib/commonjs/credential/issuance/errors.js.map +1 -0
  16. package/lib/commonjs/credential/issuance/index.js +13 -2
  17. package/lib/commonjs/credential/issuance/index.js.map +1 -1
  18. package/lib/commonjs/credential/issuance/types.js +1 -5
  19. package/lib/commonjs/credential/issuance/types.js.map +1 -1
  20. package/lib/commonjs/credential/presentation/01-start-flow.js +1 -1
  21. package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
  22. package/lib/commonjs/credential/presentation/03-get-request-object.js +2 -2
  23. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
  24. package/lib/commonjs/credential/presentation/04-send-authorization-response.js +2 -2
  25. package/lib/commonjs/credential/presentation/04-send-authorization-response.js.map +1 -1
  26. package/lib/commonjs/credential/presentation/errors.js +49 -0
  27. package/lib/commonjs/credential/presentation/errors.js.map +1 -0
  28. package/lib/commonjs/credential/presentation/index.js +5 -0
  29. package/lib/commonjs/credential/presentation/index.js.map +1 -1
  30. package/lib/commonjs/credential/status/02-status-attestation.js +8 -6
  31. package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -1
  32. package/lib/commonjs/credential/status/README.md +5 -2
  33. package/lib/commonjs/credential/status/types.js +1 -14
  34. package/lib/commonjs/credential/status/types.js.map +1 -1
  35. package/lib/commonjs/sd-jwt/errors.js +40 -0
  36. package/lib/commonjs/sd-jwt/errors.js.map +1 -0
  37. package/lib/commonjs/sd-jwt/index.js +8 -4
  38. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  39. package/lib/commonjs/sd-jwt/verifier.js +5 -1
  40. package/lib/commonjs/sd-jwt/verifier.js.map +1 -1
  41. package/lib/commonjs/trust/index.js +2 -2
  42. package/lib/commonjs/trust/index.js.map +1 -1
  43. package/lib/commonjs/utils/decoder.js +3 -1
  44. package/lib/commonjs/utils/decoder.js.map +1 -1
  45. package/lib/commonjs/utils/error-codes.js +51 -0
  46. package/lib/commonjs/utils/error-codes.js.map +1 -0
  47. package/lib/commonjs/utils/errors.js +119 -463
  48. package/lib/commonjs/utils/errors.js.map +1 -1
  49. package/lib/commonjs/utils/misc.js +23 -55
  50. package/lib/commonjs/utils/misc.js.map +1 -1
  51. package/lib/commonjs/utils/par.js +2 -1
  52. package/lib/commonjs/utils/par.js.map +1 -1
  53. package/lib/commonjs/wallet-instance/README.md +26 -5
  54. package/lib/commonjs/wallet-instance/index.js +33 -7
  55. package/lib/commonjs/wallet-instance/index.js.map +1 -1
  56. package/lib/commonjs/wallet-instance-attestation/README.md +8 -2
  57. package/lib/commonjs/wallet-instance-attestation/issuing.js +13 -10
  58. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
  59. package/lib/module/client/generated/wallet-provider.js +31 -11
  60. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  61. package/lib/module/client/index.js +22 -8
  62. package/lib/module/client/index.js.map +1 -1
  63. package/lib/module/credential/issuance/03-start-user-authorization.js +2 -2
  64. package/lib/module/credential/issuance/04-complete-user-authorization.js +33 -65
  65. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  66. package/lib/module/credential/issuance/05-authorize-access.js +7 -4
  67. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  68. package/lib/module/credential/issuance/06-obtain-credential.js +29 -20
  69. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  70. package/lib/module/credential/issuance/README.md +8 -14
  71. package/lib/module/credential/issuance/errors.js +44 -0
  72. package/lib/module/credential/issuance/errors.js.map +1 -0
  73. package/lib/module/credential/issuance/index.js +3 -2
  74. package/lib/module/credential/issuance/index.js.map +1 -1
  75. package/lib/module/credential/issuance/types.js +0 -3
  76. package/lib/module/credential/issuance/types.js.map +1 -1
  77. package/lib/module/credential/presentation/01-start-flow.js +1 -1
  78. package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
  79. package/lib/module/credential/presentation/03-get-request-object.js +3 -3
  80. package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
  81. package/lib/module/credential/presentation/04-send-authorization-response.js +3 -3
  82. package/lib/module/credential/presentation/04-send-authorization-response.js.map +1 -1
  83. package/lib/module/credential/presentation/errors.js +42 -0
  84. package/lib/module/credential/presentation/errors.js.map +1 -0
  85. package/lib/module/credential/presentation/index.js +2 -1
  86. package/lib/module/credential/presentation/index.js.map +1 -1
  87. package/lib/module/credential/status/02-status-attestation.js +11 -9
  88. package/lib/module/credential/status/02-status-attestation.js.map +1 -1
  89. package/lib/module/credential/status/README.md +5 -2
  90. package/lib/module/credential/status/types.js +0 -12
  91. package/lib/module/credential/status/types.js.map +1 -1
  92. package/lib/module/sd-jwt/errors.js +32 -0
  93. package/lib/module/sd-jwt/errors.js.map +1 -0
  94. package/lib/module/sd-jwt/index.js +5 -5
  95. package/lib/module/sd-jwt/index.js.map +1 -1
  96. package/lib/module/sd-jwt/verifier.js +5 -1
  97. package/lib/module/sd-jwt/verifier.js.map +1 -1
  98. package/lib/module/trust/index.js +3 -3
  99. package/lib/module/trust/index.js.map +1 -1
  100. package/lib/module/utils/decoder.js +3 -1
  101. package/lib/module/utils/decoder.js.map +1 -1
  102. package/lib/module/utils/error-codes.js +43 -0
  103. package/lib/module/utils/error-codes.js.map +1 -0
  104. package/lib/module/utils/errors.js +98 -438
  105. package/lib/module/utils/errors.js.map +1 -1
  106. package/lib/module/utils/misc.js +19 -49
  107. package/lib/module/utils/misc.js.map +1 -1
  108. package/lib/module/utils/par.js +3 -2
  109. package/lib/module/utils/par.js.map +1 -1
  110. package/lib/module/wallet-instance/README.md +26 -5
  111. package/lib/module/wallet-instance/index.js +32 -7
  112. package/lib/module/wallet-instance/index.js.map +1 -1
  113. package/lib/module/wallet-instance-attestation/README.md +8 -2
  114. package/lib/module/wallet-instance-attestation/issuing.js +15 -12
  115. package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
  116. package/lib/typescript/client/generated/wallet-provider.d.ts +138 -27
  117. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  118. package/lib/typescript/client/index.d.ts +7 -1
  119. package/lib/typescript/client/index.d.ts.map +1 -1
  120. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +2 -2
  121. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +17 -16
  122. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  123. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  124. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  125. package/lib/typescript/credential/issuance/errors.d.ts +28 -0
  126. package/lib/typescript/credential/issuance/errors.d.ts.map +1 -0
  127. package/lib/typescript/credential/issuance/index.d.ts +4 -3
  128. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  129. package/lib/typescript/credential/issuance/types.d.ts +0 -8
  130. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  131. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
  132. package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts.map +1 -1
  133. package/lib/typescript/credential/presentation/errors.d.ts +25 -0
  134. package/lib/typescript/credential/presentation/errors.d.ts.map +1 -0
  135. package/lib/typescript/credential/presentation/index.d.ts +2 -1
  136. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  137. package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -1
  138. package/lib/typescript/credential/status/types.d.ts +0 -15
  139. package/lib/typescript/credential/status/types.d.ts.map +1 -1
  140. package/lib/typescript/sd-jwt/errors.d.ts +20 -0
  141. package/lib/typescript/sd-jwt/errors.d.ts.map +1 -0
  142. package/lib/typescript/sd-jwt/index.d.ts +3 -2
  143. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  144. package/lib/typescript/utils/error-codes.d.ts +45 -0
  145. package/lib/typescript/utils/error-codes.d.ts.map +1 -0
  146. package/lib/typescript/utils/errors.d.ts +88 -225
  147. package/lib/typescript/utils/errors.d.ts.map +1 -1
  148. package/lib/typescript/utils/misc.d.ts +9 -24
  149. package/lib/typescript/utils/misc.d.ts.map +1 -1
  150. package/lib/typescript/utils/par.d.ts.map +1 -1
  151. package/lib/typescript/wallet-instance/index.d.ts +17 -1
  152. package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
  153. package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
  154. package/lib/typescript/wallet-instance-attestation/types.d.ts +4 -4
  155. package/package.json +1 -1
  156. package/src/client/generated/wallet-provider.ts +43 -13
  157. package/src/client/index.ts +28 -15
  158. package/src/credential/issuance/03-start-user-authorization.ts +2 -2
  159. package/src/credential/issuance/04-complete-user-authorization.ts +57 -118
  160. package/src/credential/issuance/05-authorize-access.ts +7 -4
  161. package/src/credential/issuance/06-obtain-credential.ts +39 -39
  162. package/src/credential/issuance/README.md +8 -14
  163. package/src/credential/issuance/errors.ts +44 -0
  164. package/src/credential/issuance/index.ts +8 -2
  165. package/src/credential/issuance/types.ts +0 -8
  166. package/src/credential/presentation/01-start-flow.ts +1 -1
  167. package/src/credential/presentation/03-get-request-object.ts +3 -3
  168. package/src/credential/presentation/04-send-authorization-response.ts +3 -3
  169. package/src/credential/presentation/errors.ts +41 -0
  170. package/src/credential/presentation/index.ts +2 -0
  171. package/src/credential/status/02-status-attestation.ts +17 -25
  172. package/src/credential/status/README.md +5 -2
  173. package/src/credential/status/types.ts +0 -15
  174. package/src/sd-jwt/errors.ts +39 -0
  175. package/src/sd-jwt/index.ts +5 -8
  176. package/src/sd-jwt/verifier.ts +5 -5
  177. package/src/trust/index.ts +3 -3
  178. package/src/utils/decoder.ts +3 -3
  179. package/src/utils/error-codes.ts +50 -0
  180. package/src/utils/errors.ts +152 -476
  181. package/src/utils/misc.ts +21 -65
  182. package/src/utils/par.ts +3 -2
  183. package/src/wallet-instance/README.md +26 -5
  184. package/src/wallet-instance/index.ts +40 -18
  185. package/src/wallet-instance-attestation/README.md +8 -2
  186. package/src/wallet-instance-attestation/issuing.ts +28 -36
@@ -1,7 +1,13 @@
1
- import { ApiClient as WalletProviderApiClient } from "./generated/wallet-provider";
1
+ import { ApiClient as WalletProviderApiClient, type EndpointParameters } from "./generated/wallet-provider";
2
2
  export type WalletProviderClient = WalletProviderApiClient;
3
3
  export declare const getWalletProviderClient: (context: {
4
4
  walletProviderBaseUrl: string;
5
5
  appFetch?: GlobalFetch["fetch"];
6
6
  }) => WalletProviderApiClient;
7
+ /**
8
+ * Function to interpolate the url when the request includes path params.
9
+ * The client generator expects the literal name of the param in the url
10
+ * and passes the actual values in a separate object.
11
+ */
12
+ export declare const interpolateUrl: (url: string, params?: EndpointParameters) => string;
7
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,IAAI,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEnF,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAuB3D,eAAO,MAAM,uBAAuB,YAAa;IAC/C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,4BAsBA,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,SAAS,IAAI,uBAAuB,EACpC,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAwB3D,eAAO,MAAM,uBAAuB,YAAa;IAC/C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,4BAgBA,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAS,MAAM,WAAW,kBAAkB,WAStE,CAAC"}
@@ -16,7 +16,7 @@ export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issu
16
16
  }>;
17
17
  /**
18
18
  * WARNING: This function must be called after {@link evaluateIssuerTrust} and {@link startFlow}. The next steam is {@link compeUserAuthorizationWithQueryMode} or {@link compeUserAuthorizationWithFormPostJwtMode}
19
- * Creates and sends a PAR request to the /as/par endpoint of the authroization server.
19
+ * Creates and sends a PAR request to the /as/par endpoint of the authorization server.
20
20
  * This starts the authentication flow to obtain an access token.
21
21
  * This token enables the Wallet Instance to request a digital credential from the Credential Endpoint of the Credential Issuer.
22
22
  * This is an HTTP POST request containing the Wallet Instance identifier (client id), the code challenge and challenge method as specified by PKCE according to RFC 9126
@@ -25,7 +25,7 @@ export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issu
25
25
  * the application session identifier on the Wallet Instance side (state),
26
26
  * the method (query or form_post.jwt) by which the Authorization Server
27
27
  * should transmit the Authorization Response containing the authorization code issued upon the end user's authentication (response_mode)
28
- * to the Wallet Instance's Token Endpoint to obtain the Access Token, and the redirect_uri of the Wallet Instance where the Authorization Response
28
+ * to the Wallet Instance's Token Endpoint to obtain the Access Token, and the redirectUri of the Wallet Instance where the Authorization Response
29
29
  * should be delivered. The redirect is achived by using a custom URL scheme that the Wallet Instance is registered to handle.
30
30
  * @param issuerConf The issuer configuration
31
31
  * @param credentialType The type of the credential to be requested returned by {@link selectCredentialDefinition}
@@ -1,4 +1,4 @@
1
- import { type AuthorizationContext, type AuthorizationResult } from "../../utils/auth";
1
+ import { type AuthorizationResult } from "../../utils/auth";
2
2
  import { type Out } from "../../utils/misc";
3
3
  import type { StartUserAuthorization } from "./03-start-user-authorization";
4
4
  import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
@@ -7,7 +7,7 @@ import { RequestObject } from "../presentation/types";
7
7
  /**
8
8
  * The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
9
9
  */
10
- export type CompleteUserAuthorizationWithQueryMode = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], idpHint: string, redirectUri: string, authorizationContext?: AuthorizationContext, signal?: AbortSignal) => Promise<AuthorizationResult>;
10
+ export type CompleteUserAuthorizationWithQueryMode = (authRedirectUrl: string) => Promise<AuthorizationResult>;
11
11
  export type CompleteUserAuthorizationWithFormPostJwtMode = (requestObject: Out<GetRequestedCredentialToBePresented>, context: {
12
12
  wiaCryptoContext: CryptoContext;
13
13
  pidCryptoContext: CryptoContext;
@@ -16,23 +16,24 @@ export type CompleteUserAuthorizationWithFormPostJwtMode = (requestObject: Out<G
16
16
  appFetch?: GlobalFetch["fetch"];
17
17
  }) => Promise<AuthorizationResult>;
18
18
  export type GetRequestedCredentialToBePresented = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], appFetch?: GlobalFetch["fetch"]) => Promise<RequestObject>;
19
+ export type BuildAuthorizationUrl = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], idpHint: string) => Promise<{
20
+ authUrl: string;
21
+ }>;
19
22
  /**
20
- * WARNING: This function must be called after {@link startUserAuthorization}. The next function to be called is {@link authorizeAccess}.
21
- * The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
22
- * It is used to complete the user authorization by catching the redirectSchema from the authorization server which then contains the authorization response.
23
- * This function utilizes the authorization context to open an in-app browser capable of catching the redirectSchema to perform a get request to the authorization endpoint.
24
- * If the 302 redirect happens and the redirectSchema is caught, the function will return the authorization response after parsing it from the query string.
23
+ * WARNING: This function must be called after {@link startUserAuthorization}. The generated authUrl must be used to open a browser or webview capable of catching the redirectSchema to perform a get request to the authorization endpoint.
24
+ * Builds the authorization URL to which the end user should be redirected to continue the authentication flow.
25
25
  * @param issuerRequestUri the URI of the issuer where the request is sent
26
26
  * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
27
27
  * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
28
- * @param authorizationContext The context to identify the user which will be used to start the authorization. It's needed only when requesting a PersonalIdentificationData credential. The implementantion should open an in-app browser capable of catching the redirectSchema.
29
- * If not specified, the default browser is used
30
- * @param idphint Unique identifier of the SPID IDP selected by the user
31
- * @param redirectUri The url to reach to complete the user authorization which is the custom URL scheme that the Wallet Instance is registered to handle, usually a custom URL or deeplink
32
- * @param signal An optional {@link AbortSignal} to abort the operation when using the default browser
33
- * @throws {AuthorizationError} if an error occurs during the authorization process
34
- * @throws {AuthorizationIdpError} if an error occurs during the authorization process and the error is related to the IDP
35
- * @throws {OperationAbortedError} if the caller aborts the operation via the provided signal
28
+ * @param idpHint Unique identifier of the IDP selected by the user
29
+ * @returns An object containing the authorization URL
30
+ */
31
+ export declare const buildAuthorizationUrl: BuildAuthorizationUrl;
32
+ /**
33
+ * WARNING: This function must be called after obtaining the authorization redirect URL from the webviews (SPID and CIE L3) or browser for CIEID.
34
+ * Complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
35
+ * This function parses the authorization redirect URL to extract the authorization response.
36
+ * @param authRedirectUrl The URL to which the end user should be redirected to start the authentication flow
36
37
  * @returns the authorization response which contains code, state and iss
37
38
  */
38
39
  export declare const completeUserAuthorizationWithQueryMode: CompleteUserAuthorizationWithQueryMode;
@@ -73,5 +74,5 @@ export declare const completeUserAuthorizationWithFormPostJwtMode: CompleteUserA
73
74
  * @param authRes the authorization response to be parsed
74
75
  * @returns the authorization result which contains code, state and iss
75
76
  */
76
- export declare const parseAuthroizationResponse: (authRes: unknown) => AuthorizationResult;
77
+ export declare const parseAuthorizationResponse: (authRes: unknown) => AuthorizationResult;
77
78
  //# sourceMappingURL=04-complete-user-authorization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAKL,KAAK,GAAG,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAKtD;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,CACnD,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,oBAAoB,CAAC,EAAE,oBAAoB,EAC3C,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,4CAA4C,GAAG,CACzD,aAAa,EAAE,GAAG,CAAC,mCAAmC,CAAC,EACvD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,mCAAmC,GAAG,CAChD,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sCAAsC,EAAE,sCA0ElD,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mCAAmC,EAAE,mCAyB/C,CAAC;AAEJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4CAA4C,EAAE,4CAuGxD,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,YAC5B,OAAO,KACf,mBAaF,CAAC"}
1
+ {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMtD;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,CACnD,eAAe,EAAE,MAAM,KACpB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,4CAA4C,GAAG,CACzD,aAAa,EAAE,GAAG,CAAC,mCAAmC,CAAC,EACvD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,mCAAmC,GAAG,CAChD,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B,MAAM,MAAM,qBAAqB,GAAG,CAClC,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBAkBnC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC,EAAE,sCAKlD,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mCAAmC,EAAE,mCAyB/C,CAAC;AAEJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4CAA4C,EAAE,4CAuGxD,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,YAC5B,OAAO,KACf,mBAaF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAE/F,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,IAAI,EAAE,GAAG,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,EACzD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,YAAY,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,iBAAiB,EAAE,aAAa,CAAC;CAClC,KACE,OAAO,CAAC;IAAE,WAAW,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,EAAE,eAsE7B,CAAC"}
1
+ {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAE/F,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,IAAI,EAAE,GAAG,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,EACzD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,YAAY,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,iBAAiB,EAAE,aAAa,CAAC;CAClC,KACE,OAAO,CAAC;IAAE,WAAW,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,EAAE,eAyE7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAA4B,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,OAAO,EAAqC,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKhF,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAkF9B,CAAC"}
1
+ {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAQ5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAsF9B,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { IoWalletError } from "../../utils/errors";
2
+ /**
3
+ * An error subclass thrown when an error occurs during the authorization process.
4
+ */
5
+ export declare class AuthorizationError extends IoWalletError {
6
+ code: string;
7
+ constructor(message?: string);
8
+ }
9
+ /**
10
+ * An error subclass thrown when an error occurs during the authorization process with the IDP.
11
+ * It contains the error and error description returned by the IDP.
12
+ */
13
+ export declare class AuthorizationIdpError extends IoWalletError {
14
+ code: string;
15
+ error: string;
16
+ errorDescription?: string;
17
+ constructor(error: string, errorDescription?: string);
18
+ }
19
+ /**
20
+ * Error subclass thrown when an operation has been aborted.
21
+ */
22
+ export declare class OperationAbortedError extends IoWalletError {
23
+ code: string;
24
+ /** The aborted operation */
25
+ operation: string;
26
+ constructor(operation: string);
27
+ }
28
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AAEnE;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAI,SAAuC;gBAE/B,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;IACtD,IAAI,SAA0D;IAE9D,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;gBAEd,KAAK,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM;CAKrD;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;IACtD,IAAI,SAAqC;IAEzC,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;gBAEN,SAAS,EAAE,MAAM;CAI9B"}
@@ -1,10 +1,11 @@
1
1
  import { type StartFlow } from "./01-start-flow";
2
2
  import { evaluateIssuerTrust, type EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
3
3
  import { startUserAuthorization, type StartUserAuthorization } from "./03-start-user-authorization";
4
- import { completeUserAuthorizationWithQueryMode, completeUserAuthorizationWithFormPostJwtMode, parseAuthroizationResponse, type CompleteUserAuthorizationWithQueryMode, type CompleteUserAuthorizationWithFormPostJwtMode, type GetRequestedCredentialToBePresented, getRequestedCredentialToBePresented } from "./04-complete-user-authorization";
4
+ import { completeUserAuthorizationWithQueryMode, completeUserAuthorizationWithFormPostJwtMode, parseAuthorizationResponse, buildAuthorizationUrl, type CompleteUserAuthorizationWithQueryMode, type CompleteUserAuthorizationWithFormPostJwtMode, type GetRequestedCredentialToBePresented, type BuildAuthorizationUrl, getRequestedCredentialToBePresented } from "./04-complete-user-authorization";
5
5
  import { authorizeAccess, type AuthorizeAccess } from "./05-authorize-access";
6
6
  import { obtainCredential, type ObtainCredential } from "./06-obtain-credential";
7
7
  import { verifyAndParseCredential, type VerifyAndParseCredential } from "./07-verify-and-parse-credential";
8
- export { evaluateIssuerTrust, startUserAuthorization, completeUserAuthorizationWithQueryMode, getRequestedCredentialToBePresented, completeUserAuthorizationWithFormPostJwtMode, authorizeAccess, obtainCredential, verifyAndParseCredential, parseAuthroizationResponse, };
9
- export type { StartFlow, EvaluateIssuerTrust, StartUserAuthorization, CompleteUserAuthorizationWithQueryMode, GetRequestedCredentialToBePresented, CompleteUserAuthorizationWithFormPostJwtMode, AuthorizeAccess, ObtainCredential, VerifyAndParseCredential, };
8
+ import * as Errors from "./errors";
9
+ export { evaluateIssuerTrust, startUserAuthorization, buildAuthorizationUrl, completeUserAuthorizationWithQueryMode, getRequestedCredentialToBePresented, completeUserAuthorizationWithFormPostJwtMode, authorizeAccess, obtainCredential, verifyAndParseCredential, parseAuthorizationResponse, Errors, };
10
+ export type { StartFlow, EvaluateIssuerTrust, StartUserAuthorization, BuildAuthorizationUrl, CompleteUserAuthorizationWithQueryMode, GetRequestedCredentialToBePresented, CompleteUserAuthorizationWithFormPostJwtMode, AuthorizeAccess, ObtainCredential, VerifyAndParseCredential, };
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sCAAsC,EACtC,4CAA4C,EAC5C,0BAA0B,EAC1B,KAAK,sCAAsC,EAC3C,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,mCAAmC,EACpC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,GAC3B,CAAC;AACF,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,GACzB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sCAAsC,EACtC,4CAA4C,EAC5C,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,sCAAsC,EAC3C,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,KAAK,qBAAqB,EAC1B,mCAAmC,EACpC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,GACP,CAAC;AACF,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,GACzB,CAAC"}
@@ -70,12 +70,4 @@ export declare const ResponseUriResultShape: z.ZodObject<{
70
70
  redirect_uri: string;
71
71
  }>;
72
72
  export type ResponseMode = "query" | "form_post.jwt";
73
- export declare const CredentialIssuanceFailureResponse: z.ZodObject<{
74
- error: z.ZodString;
75
- }, "strip", z.ZodTypeAny, {
76
- error: string;
77
- }, {
78
- error: string;
79
- }>;
80
- export type CredentialIssuanceFailureResponse = z.infer<typeof CredentialIssuanceFailureResponse>;
81
73
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC;AAErD,eAAO,MAAM,iCAAiC;;;;;;EAE5C,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"03-get-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/03-get-request-object.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EACxC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,EAChD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;CACnC,KACE,OAAO,CAAC;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAgD9B,CAAC"}
1
+ {"version":3,"file":"03-get-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/03-get-request-object.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EACxC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,EAChD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;CACnC,KACE,OAAO,CAAC;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAgD9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"04-send-authorization-response.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/04-send-authorization-response.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;EAShC,CAAC;AAkFH,MAAM,MAAM,yBAAyB,GAAG,CACtC,aAAa,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,eAAe,CAAC,EACrD,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,EAChD,YAAY,EAAE,YAAY,EAAE,iDAAiD;AAC7E,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBA0CvC,CAAC"}
1
+ {"version":3,"file":"04-send-authorization-response.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/04-send-authorization-response.ts"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;EAShC,CAAC;AAkFH,MAAM,MAAM,yBAAyB,GAAG,CACtC,aAAa,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,eAAe,CAAC,EACrD,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,EAChD,YAAY,EAAE,YAAY,EAAE,iDAAiD;AAC7E,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBA0CvC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { IoWalletError } from "../../utils/errors";
2
+ /**
3
+ * An error subclass thrown when auth request decode fail
4
+ *
5
+ */
6
+ export declare class AuthRequestDecodeError extends IoWalletError {
7
+ code: string;
8
+ /** The Claim for which the validation failed. */
9
+ claim: string;
10
+ /** Reason code for the validation failure. */
11
+ reason: string;
12
+ constructor(message: string, claim?: string, reason?: string);
13
+ }
14
+ /**
15
+ * When selecting a public key from an entity configuration, and no one meets the requirements for the scenario
16
+ *
17
+ */
18
+ export declare class NoSuitableKeysFoundInEntityConfiguration extends IoWalletError {
19
+ code: string;
20
+ /**
21
+ * @param scenario describe the scenario in which the error arise
22
+ */
23
+ constructor(scenario: string);
24
+ }
25
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +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"}
@@ -2,6 +2,7 @@ import { startFlowFromQR, type StartFlow } from "./01-start-flow";
2
2
  import { evaluateRelyingPartyTrust, type EvaluateRelyingPartyTrust } from "./02-evaluate-rp-trust";
3
3
  import { getRequestObject, type GetRequestObject } from "./03-get-request-object";
4
4
  import { sendAuthorizationResponse, type SendAuthorizationResponse } from "./04-send-authorization-response";
5
- export { startFlowFromQR, evaluateRelyingPartyTrust, getRequestObject, sendAuthorizationResponse, };
5
+ import * as Errors from "./errors";
6
+ export { startFlowFromQR, evaluateRelyingPartyTrust, getRequestObject, sendAuthorizationResponse, Errors, };
6
7
  export type { StartFlow, EvaluateRelyingPartyTrust, GetRequestObject, SendAuthorizationResponse, };
7
8
  //# 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,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAC1B,CAAC;AACF,YAAY,EACV,SAAS,EACT,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAC1B,CAAC"}
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,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,yBAAyB,EACzB,MAAM,GACP,CAAC;AACF,YAAY,EACV,SAAS,EACT,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,GAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"02-status-attestation.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/02-status-attestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,GAAG,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAEL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAOjB,MAAM,MAAM,iBAAiB,GAAG,CAC9B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,uBAAuB,EAAE,aAAa,EACtC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC;IACX,iBAAiB,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;CACpE,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBA2C/B,CAAC"}
1
+ {"version":3,"file":"02-status-attestation.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/02-status-attestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,GAAG,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAQpD,MAAM,MAAM,iBAAiB,GAAG,CAC9B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,uBAAuB,EAAE,aAAa,EACtC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC;IACX,iBAAiB,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;CACpE,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBA2C/B,CAAC"}
@@ -302,19 +302,4 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
302
302
  credential_hash: string;
303
303
  };
304
304
  }>;
305
- /**
306
- * Shape from parsing a status attestation response in case of error.
307
- */
308
- export declare const InvalidStatusAttestationResponse: z.ZodObject<{
309
- error: z.ZodString;
310
- }, "strip", z.ZodTypeAny, {
311
- error: string;
312
- }, {
313
- error: string;
314
- }>;
315
- /**
316
- * Type from parsing a status attestation response in case of error.
317
- * Inferred from {@link InvalidStatusAttestationResponse}.
318
- */
319
- export type InvalidStatusAttestationResponse = z.infer<typeof InvalidStatusAttestationResponse>;
320
305
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAelC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;EAE3C,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAelC,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * When claims are requested but not found in the credential
3
+ *
4
+ */
5
+ export declare class ClaimsNotFoundBetweenDisclosures extends Error {
6
+ code: string;
7
+ /** The Claims not found */
8
+ claims: string[];
9
+ constructor(claims: string | string[]);
10
+ }
11
+ /**
12
+ * When the SD-JWT does not contain an hashed reference to a given set of claims
13
+ */
14
+ export declare class ClaimsNotFoundInToken extends Error {
15
+ code: string;
16
+ /** The Claims not found */
17
+ claims: string[];
18
+ constructor(claims: string | string[]);
19
+ }
20
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,gCAAiC,SAAQ,KAAK;IACzD,IAAI,SAA0B;IAE9B,2BAA2B;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;gBAEL,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;CAQtC;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,IAAI,SAAmC;IAEvC,2BAA2B;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;gBAEL,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;CAStC"}
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { Disclosure, SdJwt4VC, type DisclosureWithEncoded } from "./types";
3
3
  import type { JWK } from "../utils/jwk";
4
+ import * as Errors from "./errors";
4
5
  /**
5
6
  * Decode a given SD-JWT with Disclosures to get the parsed SD-JWT object they define.
6
7
  * It ensures provided data is in a valid shape.
@@ -121,7 +122,7 @@ export declare const decode: <S extends z.ZodType<{
121
122
  * @param token The encoded token that represents a valid sd-jwt for verifiable credentials
122
123
  * @param claims The list of claims to be disclosed
123
124
  *
124
- * @throws {ClaimsNotFoundBetweenDislosures} When one or more claims does not relate to any discloure.
125
+ * @throws {ClaimsNotFoundBetweenDisclosures} When one or more claims does not relate to any discloure.
125
126
  * @throws {ClaimsNotFoundInToken} When one or more claims are not contained in the SD-JWT token.
126
127
  * @returns The encoded token with only the requested disclosures, along with the path each claim can be found on the SD-JWT token
127
128
  *
@@ -247,5 +248,5 @@ export declare const verify: <S extends z.ZodType<{
247
248
  sdJwt: z.TypeOf<S>;
248
249
  disclosures: Disclosure[];
249
250
  }>;
250
- export { SdJwt4VC };
251
+ export { SdJwt4VC, Errors };
251
252
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAaxC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM;;iBAIA,qBAAqB,EAAE;CA0BrC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,UACZ,MAAM,UACL,MAAM,EAAE;WACE,MAAM;WAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE;EAwCnE,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM,aACF,GAAG,GAAG,GAAG,EAAE;;iBAEqB,UAAU,EAAE;EAqBxD,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AASnC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM;;iBAIA,qBAAqB,EAAE;CA0BrC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,UACZ,MAAM,UACL,MAAM,EAAE;WACE,MAAM;WAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE;EAwCnE,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM,aACF,GAAG,GAAG,GAAG,EAAE;;iBAEqB,UAAU,EAAE;EAqBxD,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ export declare const IssuerResponseErrorCodes: {
2
+ readonly IssuerGenericError: "ERR_ISSUER_GENERIC_ERROR";
3
+ /**
4
+ * Error code thrown when a credential cannot be issued immediately because it follows the async flow.
5
+ */
6
+ readonly CredentialIssuingNotSynchronous: "ERR_CREDENTIAL_ISSUING_NOT_SYNCHRONOUS";
7
+ /**
8
+ * Error code thrown when an error occurs while requesting a credential.
9
+ */
10
+ readonly CredentialRequestFailed: "ERR_CREDENTIAL_REQUEST_FAILED";
11
+ /**
12
+ * Error code thrown when a credential status is invalid, either during issuance or when requesting a status attestation.
13
+ */
14
+ readonly CredentialInvalidStatus: "ERR_CREDENTIAL_INVALID_STATUS";
15
+ /**
16
+ * Error code thrown when an error occurs while obtaining a status attestation for a credential.
17
+ */
18
+ readonly StatusAttestationRequestFailed: "ERR_STATUS_ATTESTATION_REQUEST_FAILED";
19
+ };
20
+ export declare const WalletProviderResponseErrorCodes: {
21
+ readonly WalletProviderGenericError: "ERR_IO_WALLET_PROVIDER_GENERIC_ERROR";
22
+ /**
23
+ * An error code thrown when an error occurs during the wallet instance creation process.
24
+ */
25
+ readonly WalletInstanceCreationFailed: "ERR_IO_WALLET_INSTANCE_CREATION_FAILED";
26
+ /**
27
+ * An error code thrown when validation fail
28
+ */
29
+ readonly WalletInstanceAttestationIssuingFailed: "ERR_IO_WALLET_INSTANCE_ATTESTATION_ISSUING_FAILED";
30
+ /**
31
+ * An error code thrown when the requester does not pass the integrity checks when interacting with the Wallet Provider.
32
+ */
33
+ readonly WalletInstanceIntegrityFailed: "ERR_IO_WALLET_INSTANCE_INTEGRITY_FAILED";
34
+ /**
35
+ * An error code thrown when obtaining a wallet instance attestation but the wallet instance is revoked.
36
+ */
37
+ readonly WalletInstanceRevoked: "ERR_IO_WALLET_INSTANCE_REVOKED";
38
+ /**
39
+ * An error code thrown when obtaining a wallet instance attestation but the wallet instance is not found.
40
+ */
41
+ readonly WalletInstanceNotFound: "ERR_IO_WALLET_INSTANCE_NOT_FOUND";
42
+ };
43
+ export type IssuerResponseErrorCode = (typeof IssuerResponseErrorCodes)[keyof typeof IssuerResponseErrorCodes];
44
+ export type WalletProviderResponseErrorCode = (typeof WalletProviderResponseErrorCodes)[keyof typeof WalletProviderResponseErrorCodes];
45
+ //# sourceMappingURL=error-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/utils/error-codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;IAEnC;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX,eAAO,MAAM,gCAAgC;;IAE3C;;OAEG;;IAEH;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,MAAM,MAAM,+BAA+B,GACzC,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,OAAO,gCAAgC,CAAC,CAAC"}