@credo-ts/openid4vc 0.6.0-pr-2134-20241217213340 → 0.6.0-pr-2195-20250217170804

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.
Files changed (85) hide show
  1. package/build/openid4vc-holder/OpenId4VcHolderApi.d.ts +61 -11
  2. package/build/openid4vc-holder/OpenId4VcHolderApi.js +17 -19
  3. package/build/openid4vc-holder/OpenId4VcHolderApi.js.map +1 -1
  4. package/build/openid4vc-holder/OpenId4VcHolderModule.js +1 -1
  5. package/build/openid4vc-holder/OpenId4VcHolderModule.js.map +1 -1
  6. package/build/openid4vc-holder/OpenId4VciHolderService.d.ts +7 -8
  7. package/build/openid4vc-holder/OpenId4VciHolderService.js +60 -45
  8. package/build/openid4vc-holder/OpenId4VciHolderService.js.map +1 -1
  9. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.ts +3 -3
  10. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js +1 -1
  11. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js.map +1 -1
  12. package/build/openid4vc-holder/OpenId4vcSiopHolderService.d.ts +59 -13
  13. package/build/openid4vc-holder/OpenId4vcSiopHolderService.js +232 -172
  14. package/build/openid4vc-holder/OpenId4vcSiopHolderService.js.map +1 -1
  15. package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.d.ts +18 -1
  16. package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.ts +196 -46
  17. package/build/openid4vc-issuer/OpenId4VcIssuerApi.js +8 -19
  18. package/build/openid4vc-issuer/OpenId4VcIssuerApi.js.map +1 -1
  19. package/build/openid4vc-issuer/OpenId4VcIssuerModule.js +3 -3
  20. package/build/openid4vc-issuer/OpenId4VcIssuerModule.js.map +1 -1
  21. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.ts +13 -13
  22. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js +19 -40
  23. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js.map +1 -1
  24. package/build/openid4vc-issuer/OpenId4VcIssuerService.d.ts +198 -48
  25. package/build/openid4vc-issuer/OpenId4VcIssuerService.js +45 -37
  26. package/build/openid4vc-issuer/OpenId4VcIssuerService.js.map +1 -1
  27. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.ts +8 -3
  28. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.ts +1 -1
  29. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js +26 -12
  30. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js.map +1 -1
  31. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js +19 -22
  32. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js.map +1 -1
  33. package/build/openid4vc-issuer/router/accessTokenEndpoint.js +11 -9
  34. package/build/openid4vc-issuer/router/accessTokenEndpoint.js.map +1 -1
  35. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js +17 -6
  36. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js.map +1 -1
  37. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js +1 -1
  38. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js.map +1 -1
  39. package/build/openid4vc-issuer/router/credentialEndpoint.js +11 -9
  40. package/build/openid4vc-issuer/router/credentialEndpoint.js.map +1 -1
  41. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js +7 -3
  42. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js.map +1 -1
  43. package/build/openid4vc-issuer/util/txCode.js +2 -3
  44. package/build/openid4vc-issuer/util/txCode.js.map +1 -1
  45. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.d.ts +21 -7
  46. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js +499 -263
  47. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js.map +1 -1
  48. package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.d.ts +23 -3
  49. package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.ts +3 -3
  50. package/build/openid4vc-verifier/OpenId4VcVerifierApi.js +11 -18
  51. package/build/openid4vc-verifier/OpenId4VcVerifierApi.js.map +1 -1
  52. package/build/openid4vc-verifier/OpenId4VcVerifierModule.js +3 -3
  53. package/build/openid4vc-verifier/OpenId4VcVerifierModule.js.map +1 -1
  54. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js +11 -8
  55. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js.map +1 -1
  56. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.d.ts +23 -4
  57. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js +25 -29
  58. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js.map +1 -1
  59. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js +4 -6
  60. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js.map +1 -1
  61. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js +11 -6
  62. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js.map +1 -1
  63. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.js +7 -5
  64. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.js.map +1 -1
  65. package/build/openid4vc-verifier/router/authorizationEndpoint.js +5 -104
  66. package/build/openid4vc-verifier/router/authorizationEndpoint.js.map +1 -1
  67. package/build/shared/callbacks.d.ts +16 -5
  68. package/build/shared/callbacks.js +120 -24
  69. package/build/shared/callbacks.js.map +1 -1
  70. package/build/shared/issuerMetadataUtils.d.ts +102 -144
  71. package/build/shared/models/index.d.ts +10 -8
  72. package/build/shared/models/index.js +5 -5
  73. package/build/shared/models/index.js.map +1 -1
  74. package/build/shared/router/context.d.ts +2 -2
  75. package/build/shared/router/context.js +5 -5
  76. package/build/shared/router/context.js.map +1 -1
  77. package/build/shared/router/tenants.js +1 -2
  78. package/build/shared/router/tenants.js.map +1 -1
  79. package/build/shared/utils.d.ts +6 -6
  80. package/build/shared/utils.js +22 -61
  81. package/build/shared/utils.js.map +1 -1
  82. package/package.json +7 -6
  83. package/build/shared/transform.d.ts +0 -5
  84. package/build/shared/transform.js +0 -73
  85. package/build/shared/transform.js.map +0 -1
@@ -26,42 +26,198 @@ export declare class OpenId4VcIssuerApi {
26
26
  rotateAccessTokenSigningKey(issuerId: string): Promise<void>;
27
27
  updateIssuerMetadata(options: OpenId4VcUpdateIssuerRecordOptions): Promise<void>;
28
28
  /**
29
- * Creates a stateless credential offer. This can only be used with an external authorization server, as credo only supports statefull
30
- * crednetial offers.
29
+ * Creates a stateless credential offer. This can only be used with an external authorization server, as credo only supports stateful
30
+ * credential offers.
31
31
  */
32
32
  createStatelessCredentialOffer(options: OpenId4VciCreateStatelessCredentialOfferOptions & {
33
33
  issuerId: string;
34
34
  }): Promise<{
35
35
  credentialOffer: string;
36
- credentialOfferObject: {
37
- credential_issuer: string;
38
- credential_configuration_ids: string[];
39
- grants?: ({
40
- authorization_code?: ({
41
- issuer_state?: string | undefined;
42
- authorization_server?: string | undefined;
43
- } & {
44
- [key: string]: unknown;
45
- }) | undefined;
46
- "urn:ietf:params:oauth:grant-type:pre-authorized_code"?: ({
47
- 'pre-authorized_code': string;
48
- authorization_server?: string | undefined;
49
- tx_code?: ({
50
- length?: number | undefined;
51
- description?: string | undefined;
52
- input_mode?: "text" | "numeric" | undefined;
53
- } & {
54
- [key: string]: unknown;
55
- }) | undefined;
56
- } & {
57
- [key: string]: unknown;
58
- }) | undefined;
59
- } & {
60
- [key: string]: unknown;
61
- }) | undefined;
62
- } & {
63
- [key: string]: unknown;
64
- };
36
+ credentialOfferObject: import("zod").objectInputType<{
37
+ credential_issuer: import("zod").ZodEffects<import("zod").ZodString, string, string>;
38
+ credential_configuration_ids: import("zod").ZodArray<import("zod").ZodString, "many">;
39
+ grants: import("zod").ZodOptional<import("zod").ZodObject<{
40
+ authorization_code: import("zod").ZodOptional<import("zod").ZodObject<{
41
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
42
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
43
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
44
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
45
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
46
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
47
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
48
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
49
+ }, import("zod").ZodTypeAny, "passthrough">>>;
50
+ "urn:ietf:params:oauth:grant-type:pre-authorized_code": import("zod").ZodOptional<import("zod").ZodObject<{
51
+ "pre-authorized_code": import("zod").ZodString;
52
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
53
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
54
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
55
+ description: import("zod").ZodOptional<import("zod").ZodString>;
56
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
57
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
58
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
59
+ description: import("zod").ZodOptional<import("zod").ZodString>;
60
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
61
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
62
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
63
+ description: import("zod").ZodOptional<import("zod").ZodString>;
64
+ }, import("zod").ZodTypeAny, "passthrough">>>;
65
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
66
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
67
+ "pre-authorized_code": import("zod").ZodString;
68
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
69
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
70
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
71
+ description: import("zod").ZodOptional<import("zod").ZodString>;
72
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
73
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
74
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
75
+ description: import("zod").ZodOptional<import("zod").ZodString>;
76
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
77
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
78
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
79
+ description: import("zod").ZodOptional<import("zod").ZodString>;
80
+ }, import("zod").ZodTypeAny, "passthrough">>>;
81
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
82
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
83
+ "pre-authorized_code": import("zod").ZodString;
84
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
85
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
86
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
87
+ description: import("zod").ZodOptional<import("zod").ZodString>;
88
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
89
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
90
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
91
+ description: import("zod").ZodOptional<import("zod").ZodString>;
92
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
93
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
94
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
95
+ description: import("zod").ZodOptional<import("zod").ZodString>;
96
+ }, import("zod").ZodTypeAny, "passthrough">>>;
97
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
98
+ }, import("zod").ZodTypeAny, "passthrough">>>;
99
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
100
+ authorization_code: import("zod").ZodOptional<import("zod").ZodObject<{
101
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
102
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
103
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
104
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
105
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
106
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
107
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
108
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
109
+ }, import("zod").ZodTypeAny, "passthrough">>>;
110
+ "urn:ietf:params:oauth:grant-type:pre-authorized_code": import("zod").ZodOptional<import("zod").ZodObject<{
111
+ "pre-authorized_code": import("zod").ZodString;
112
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
113
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
114
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
115
+ description: import("zod").ZodOptional<import("zod").ZodString>;
116
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
117
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
118
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
119
+ description: import("zod").ZodOptional<import("zod").ZodString>;
120
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
121
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
122
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
123
+ description: import("zod").ZodOptional<import("zod").ZodString>;
124
+ }, import("zod").ZodTypeAny, "passthrough">>>;
125
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
126
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
127
+ "pre-authorized_code": import("zod").ZodString;
128
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
129
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
130
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
131
+ description: import("zod").ZodOptional<import("zod").ZodString>;
132
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
133
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
134
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
135
+ description: import("zod").ZodOptional<import("zod").ZodString>;
136
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
137
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
138
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
139
+ description: import("zod").ZodOptional<import("zod").ZodString>;
140
+ }, import("zod").ZodTypeAny, "passthrough">>>;
141
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
142
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
143
+ "pre-authorized_code": import("zod").ZodString;
144
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
145
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
146
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
147
+ description: import("zod").ZodOptional<import("zod").ZodString>;
148
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
149
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
150
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
151
+ description: import("zod").ZodOptional<import("zod").ZodString>;
152
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
153
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
154
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
155
+ description: import("zod").ZodOptional<import("zod").ZodString>;
156
+ }, import("zod").ZodTypeAny, "passthrough">>>;
157
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
158
+ }, import("zod").ZodTypeAny, "passthrough">>>;
159
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
160
+ authorization_code: import("zod").ZodOptional<import("zod").ZodObject<{
161
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
162
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
163
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
164
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
165
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
166
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
167
+ issuer_state: import("zod").ZodOptional<import("zod").ZodString>;
168
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
169
+ }, import("zod").ZodTypeAny, "passthrough">>>;
170
+ "urn:ietf:params:oauth:grant-type:pre-authorized_code": import("zod").ZodOptional<import("zod").ZodObject<{
171
+ "pre-authorized_code": import("zod").ZodString;
172
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
173
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
174
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
175
+ description: import("zod").ZodOptional<import("zod").ZodString>;
176
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
177
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
178
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
179
+ description: import("zod").ZodOptional<import("zod").ZodString>;
180
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
181
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
182
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
183
+ description: import("zod").ZodOptional<import("zod").ZodString>;
184
+ }, import("zod").ZodTypeAny, "passthrough">>>;
185
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
186
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
187
+ "pre-authorized_code": import("zod").ZodString;
188
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
189
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
190
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
191
+ description: import("zod").ZodOptional<import("zod").ZodString>;
192
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
193
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
194
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
195
+ description: import("zod").ZodOptional<import("zod").ZodString>;
196
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
197
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
198
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
199
+ description: import("zod").ZodOptional<import("zod").ZodString>;
200
+ }, import("zod").ZodTypeAny, "passthrough">>>;
201
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
202
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
203
+ "pre-authorized_code": import("zod").ZodString;
204
+ tx_code: import("zod").ZodOptional<import("zod").ZodObject<{
205
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
206
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
207
+ description: import("zod").ZodOptional<import("zod").ZodString>;
208
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
209
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
210
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
211
+ description: import("zod").ZodOptional<import("zod").ZodString>;
212
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
213
+ input_mode: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"numeric">, import("zod").ZodLiteral<"text">]>>;
214
+ length: import("zod").ZodOptional<import("zod").ZodNumber>;
215
+ description: import("zod").ZodOptional<import("zod").ZodString>;
216
+ }, import("zod").ZodTypeAny, "passthrough">>>;
217
+ authorization_server: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
218
+ }, import("zod").ZodTypeAny, "passthrough">>>;
219
+ }, import("zod").ZodTypeAny, "passthrough">>>;
220
+ }, import("zod").ZodTypeAny, "passthrough">;
65
221
  }>;
66
222
  /**
67
223
  * Creates a credential offer. Either the preAuthorizedCodeFlowConfig or the authorizationCodeFlowConfig must be provided.
@@ -80,22 +236,16 @@ export declare class OpenId4VcIssuerApi {
80
236
  createCredentialResponse(options: OpenId4VciCreateCredentialResponseOptions & {
81
237
  issuanceSessionId: string;
82
238
  }): Promise<{
83
- credentialResponse: {
84
- c_nonce?: string | undefined;
85
- c_nonce_expires_in?: number | undefined;
86
- credentials?: (string | {
87
- [x: string]: any;
88
- })[] | undefined;
89
- credential?: string | {
90
- [x: string]: any;
91
- } | undefined;
92
- transaction_id?: string | undefined;
93
- notification_id?: string | undefined;
94
- } & {
95
- [key: string]: unknown;
96
- };
239
+ credentialResponse: import("zod").objectOutputType<{
240
+ credential: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>]>>;
241
+ credentials: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>]>, "many">>;
242
+ transaction_id: import("zod").ZodOptional<import("zod").ZodString>;
243
+ c_nonce: import("zod").ZodOptional<import("zod").ZodString>;
244
+ c_nonce_expires_in: import("zod").ZodOptional<import("zod").ZodNumber>;
245
+ notification_id: import("zod").ZodOptional<import("zod").ZodString>;
246
+ }, import("zod").ZodTypeAny, "passthrough">;
97
247
  issuanceSession: import("./repository").OpenId4VcIssuanceSessionRecord;
98
248
  }>;
99
- getIssuerMetadata(issuerId: string): Promise<import("@animo-id/oid4vci").IssuerMetadataResult>;
249
+ getIssuerMetadata(issuerId: string): Promise<import("@openid4vc/oid4vci").IssuerMetadataResult>;
100
250
  getIssuanceSessionById(issuanceSessionId: string): Promise<import("./repository").OpenId4VcIssuanceSessionRecord>;
101
251
  }
@@ -8,17 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
19
- }
20
- return t;
21
- };
22
11
  Object.defineProperty(exports, "__esModule", { value: true });
23
12
  exports.OpenId4VcIssuerApi = void 0;
24
13
  const core_1 = require("@credo-ts/core");
@@ -66,13 +55,13 @@ let OpenId4VcIssuerApi = class OpenId4VcIssuerApi {
66
55
  return this.openId4VcIssuerService.updateIssuer(this.agentContext, issuer);
67
56
  }
68
57
  /**
69
- * Creates a stateless credential offer. This can only be used with an external authorization server, as credo only supports statefull
70
- * crednetial offers.
58
+ * Creates a stateless credential offer. This can only be used with an external authorization server, as credo only supports stateful
59
+ * credential offers.
71
60
  */
72
61
  async createStatelessCredentialOffer(options) {
73
- const { issuerId } = options, rest = __rest(options, ["issuerId"]);
62
+ const { issuerId, ...rest } = options;
74
63
  const issuer = await this.openId4VcIssuerService.getIssuerByIssuerId(this.agentContext, issuerId);
75
- return await this.openId4VcIssuerService.createStatelessCredentialOffer(this.agentContext, Object.assign(Object.assign({}, rest), { issuer }));
64
+ return await this.openId4VcIssuerService.createStatelessCredentialOffer(this.agentContext, { ...rest, issuer });
76
65
  }
77
66
  /**
78
67
  * Creates a credential offer. Either the preAuthorizedCodeFlowConfig or the authorizationCodeFlowConfig must be provided.
@@ -80,17 +69,17 @@ let OpenId4VcIssuerApi = class OpenId4VcIssuerApi {
80
69
  * @returns Object containing the payload of the credential offer and the credential offer request, which can be sent to the wallet.
81
70
  */
82
71
  async createCredentialOffer(options) {
83
- const { issuerId } = options, rest = __rest(options, ["issuerId"]);
72
+ const { issuerId, ...rest } = options;
84
73
  const issuer = await this.openId4VcIssuerService.getIssuerByIssuerId(this.agentContext, issuerId);
85
- return await this.openId4VcIssuerService.createCredentialOffer(this.agentContext, Object.assign(Object.assign({}, rest), { issuer }));
74
+ return await this.openId4VcIssuerService.createCredentialOffer(this.agentContext, { ...rest, issuer });
86
75
  }
87
76
  /**
88
77
  * This function creates a response which can be send to the holder after receiving a credential issuance request.
89
78
  */
90
79
  async createCredentialResponse(options) {
91
- const { issuanceSessionId } = options, rest = __rest(options, ["issuanceSessionId"]);
80
+ const { issuanceSessionId, ...rest } = options;
92
81
  const issuanceSession = await this.openId4VcIssuerService.getIssuanceSessionById(this.agentContext, issuanceSessionId);
93
- return await this.openId4VcIssuerService.createCredentialResponse(this.agentContext, Object.assign(Object.assign({}, rest), { issuanceSession }));
82
+ return await this.openId4VcIssuerService.createCredentialResponse(this.agentContext, { ...rest, issuanceSession });
94
83
  }
95
84
  async getIssuerMetadata(issuerId) {
96
85
  const issuer = await this.openId4VcIssuerService.getIssuerByIssuerId(this.agentContext, issuerId);
@@ -1 +1 @@
1
- {"version":3,"file":"OpenId4VcIssuerApi.js","sourceRoot":"","sources":["../../src/openid4vc-issuer/OpenId4VcIssuerApi.ts"],"names":[],"mappings":";;;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CAAC,CAAA;QACjG,OAAO,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;IACjF,CAAC;IAEM,KAAK,CAAC,sBAAsB,CAAC,iBAAyB;QAC3D,OAAO,IAAI,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAA;IACjG,CAAC;CACF,CAAA;AAhGY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,iBAAU,GAAE;qCAGe,yDAA2B;QAC7B,mBAAY;QACF,+CAAsB;GAJ7C,kBAAkB,CAgG9B"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpenId4VcIssuerModule = void 0;
4
- const oauth2_1 = require("@animo-id/oauth2");
4
+ const oauth2_1 = require("@openid4vc/oauth2");
5
5
  const core_1 = require("@credo-ts/core");
6
6
  const router_1 = require("../shared/router");
7
7
  const OpenId4VcIssuerApi_1 = require("./OpenId4VcIssuerApi");
@@ -77,11 +77,11 @@ class OpenId4VcIssuerModule {
77
77
  };
78
78
  }
79
79
  catch (error) {
80
- agentContext === null || agentContext === void 0 ? void 0 : agentContext.config.logger.error('Failed to correlate incoming oid4vci request to existing tenant and issuer', {
80
+ agentContext?.config.logger.error('Failed to correlate incoming oid4vci request to existing tenant and issuer', {
81
81
  error,
82
82
  });
83
83
  // If the opening failed
84
- await (agentContext === null || agentContext === void 0 ? void 0 : agentContext.endSession());
84
+ await agentContext?.endSession();
85
85
  return _res.status(404).send('Not found');
86
86
  }
87
87
  next();
@@ -1 +1 @@
1
- {"version":3,"file":"OpenId4VcIssuerModule.js","sourceRoot":"","sources":["../../src/openid4vc-issuer/OpenId4VcIssuerModule.ts"],"names":[],"mappings":";;;AAKA,6CAAkD;AAClD,yCAA4C;AAE5C,6CAA8F;AAE9F,6DAAyD;AACzD,+EAA2E;AAC3E,qEAAiE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AA,0BAAiB,EAAC,GAAG,CAAC,CAAA;YAC/C,MAAM,YAAY,CAAC,UAAU,EAAE,CAAA;YAE/B,IAAI,EAAE,CAAA;QACR,CAAC,CAAC,CAAA;QAEF,yDAAyD;QACzD,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,MAAe,EAAE,GAA6B,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YAC5G,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,0BAAiB,EAAC,GAAG,CAAC,CAAA;YAE/C,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;gBACrB,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAC7B,iGAAiG,CAClG,CAAA;gBAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACnB,KAAK,EAAE,cAAc;oBACrB,iBAAiB,EAAE,6CAA6C;iBACjE,CAAC,CAAA;YACJ,CAAC;YAED,MAAM,YAAY,CAAC,UAAU,EAAE,CAAA;YAC/B,IAAI,EAAE,CAAA;QACR,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAvID,sDAuIC"}
@@ -21,13 +21,13 @@ export interface OpenId4VcIssuerModuleConfigOptions {
21
21
  */
22
22
  cNonceExpiresInSeconds?: number;
23
23
  /**
24
- * The time after which a statefull credential offer not bound to a subject expires. Once the offer has been bound
24
+ * The time after which a stateful credential offer not bound to a subject expires. Once the offer has been bound
25
25
  * to a subject the access token expiration takes effect. This is to prevent long-lived `pre-authorized_code` and
26
26
  * `issuer_state` values.
27
27
  *
28
28
  * @default 180 (3 minutes)
29
29
  */
30
- statefullCredentialOfferExpirationInSeconds?: number;
30
+ statefulCredentialOfferExpirationInSeconds?: number;
31
31
  /**
32
32
  * The time after which an authorization code will expire.
33
33
  *
@@ -54,7 +54,7 @@ export interface OpenId4VcIssuerModuleConfigOptions {
54
54
  * This requires an external authorization server which issues access tokens without
55
55
  * a `pre-authorized_code` or `issuer_state` parameter.
56
56
  *
57
- * Credo only support statefull crednetial offer sessions (pre-auth or presentation during issuance)
57
+ * Credo only support stateful credential offer sessions (pre-auth or presentation during issuance)
58
58
  *
59
59
  * @default false
60
60
  */
@@ -104,12 +104,6 @@ export interface OpenId4VcIssuerModuleConfigOptions {
104
104
  export declare class OpenId4VcIssuerModuleConfig {
105
105
  private options;
106
106
  readonly router: Router;
107
- constructor(options: OpenId4VcIssuerModuleConfigOptions);
108
- get baseUrl(): string;
109
- /**
110
- * A function mapping a credential request to the credential to be issued.
111
- */
112
- get credentialRequestToCredentialMapper(): OpenId4VciCredentialRequestToCredentialMapper;
113
107
  /**
114
108
  * Callback to get a verification session that needs to be fulfilled for the authorization of
115
109
  * of a credential issuance session. Once the verification session has been completed the user can
@@ -117,7 +111,13 @@ export declare class OpenId4VcIssuerModuleConfig {
117
111
  *
118
112
  * Required if presentation during issuance flow is used
119
113
  */
120
- get getVerificationSessionForIssuanceSessionAuthorization(): OpenId4VciGetVerificationSessionForIssuanceSessionAuthorization | undefined;
114
+ getVerificationSessionForIssuanceSessionAuthorization?: OpenId4VciGetVerificationSessionForIssuanceSessionAuthorization;
115
+ constructor(options: OpenId4VcIssuerModuleConfigOptions);
116
+ get baseUrl(): string;
117
+ /**
118
+ * A function mapping a credential request to the credential to be issued.
119
+ */
120
+ get credentialRequestToCredentialMapper(): OpenId4VciCredentialRequestToCredentialMapper;
121
121
  /**
122
122
  * The time after which a cNone will expire.
123
123
  *
@@ -125,13 +125,13 @@ export declare class OpenId4VcIssuerModuleConfig {
125
125
  */
126
126
  get cNonceExpiresInSeconds(): number;
127
127
  /**
128
- * The time after which a statefull credential offer not bound to a subject expires. Once the offer has been bound
128
+ * The time after which a stateful credential offer not bound to a subject expires. Once the offer has been bound
129
129
  * to a subject the access token expiration takes effect. This is to prevent long-lived `pre-authorized_code` and
130
130
  * `issuer_state` values.
131
131
  *
132
132
  * @default 360 (5 minutes)
133
133
  */
134
- get statefullCredentialOfferExpirationInSeconds(): number;
134
+ get statefulCredentialOfferExpirationInSeconds(): number;
135
135
  /**
136
136
  * The time after which a cNonce will expire.
137
137
  *
@@ -158,7 +158,7 @@ export declare class OpenId4VcIssuerModuleConfig {
158
158
  * This requires an external authorization server which issues access tokens without
159
159
  * a `pre-authorized_code` or `issuer_state` parameter.
160
160
  *
161
- * Credo only supports statefull crednetial offer sessions (pre-auth or presentation during issuance)
161
+ * Credo only supports stateful credential offer sessions (pre-auth or presentation during issuance)
162
162
  *
163
163
  * @default false
164
164
  */
@@ -5,12 +5,13 @@ const router_1 = require("../shared/router");
5
5
  const DEFAULT_C_NONCE_EXPIRES_IN = 1 * 60; // 1 minute
6
6
  const DEFAULT_AUTHORIZATION_CODE_EXPIRES_IN = 1 * 60; // 1 minute
7
7
  const DEFAULT_TOKEN_EXPIRES_IN = 3 * 60; // 3 minutes
8
- const DEFAULT_STATEFULL_CREDENTIAL_OFFER_EXPIRES_IN = 3 * 60; // 3 minutes
8
+ const DEFAULT_STATEFUL_CREDENTIAL_OFFER_EXPIRES_IN = 3 * 60; // 3 minutes
9
9
  class OpenId4VcIssuerModuleConfig {
10
10
  constructor(options) {
11
- var _a;
12
11
  this.options = options;
13
- this.router = (_a = options.router) !== null && _a !== void 0 ? _a : (0, router_1.importExpress)().Router();
12
+ this.getVerificationSessionForIssuanceSessionAuthorization =
13
+ options.getVerificationSessionForIssuanceSessionAuthorization;
14
+ this.router = options.router ?? (0, router_1.importExpress)().Router();
14
15
  }
15
16
  get baseUrl() {
16
17
  return this.options.baseUrl;
@@ -21,35 +22,23 @@ class OpenId4VcIssuerModuleConfig {
21
22
  get credentialRequestToCredentialMapper() {
22
23
  return this.options.credentialRequestToCredentialMapper;
23
24
  }
24
- /**
25
- * Callback to get a verification session that needs to be fulfilled for the authorization of
26
- * of a credential issuance session. Once the verification session has been completed the user can
27
- * retrieve an authorization code and access token and retrieve the credential(s).
28
- *
29
- * Required if presentation during issuance flow is used
30
- */
31
- get getVerificationSessionForIssuanceSessionAuthorization() {
32
- return this.options.getVerificationSessionForIssuanceSessionAuthorization;
33
- }
34
25
  /**
35
26
  * The time after which a cNone will expire.
36
27
  *
37
28
  * @default 60 (1 minute)
38
29
  */
39
30
  get cNonceExpiresInSeconds() {
40
- var _a;
41
- return (_a = this.options.cNonceExpiresInSeconds) !== null && _a !== void 0 ? _a : DEFAULT_C_NONCE_EXPIRES_IN;
31
+ return this.options.cNonceExpiresInSeconds ?? DEFAULT_C_NONCE_EXPIRES_IN;
42
32
  }
43
33
  /**
44
- * The time after which a statefull credential offer not bound to a subject expires. Once the offer has been bound
34
+ * The time after which a stateful credential offer not bound to a subject expires. Once the offer has been bound
45
35
  * to a subject the access token expiration takes effect. This is to prevent long-lived `pre-authorized_code` and
46
36
  * `issuer_state` values.
47
37
  *
48
38
  * @default 360 (5 minutes)
49
39
  */
50
- get statefullCredentialOfferExpirationInSeconds() {
51
- var _a;
52
- return (_a = this.options.statefullCredentialOfferExpirationInSeconds) !== null && _a !== void 0 ? _a : DEFAULT_STATEFULL_CREDENTIAL_OFFER_EXPIRES_IN;
40
+ get statefulCredentialOfferExpirationInSeconds() {
41
+ return this.options.statefulCredentialOfferExpirationInSeconds ?? DEFAULT_STATEFUL_CREDENTIAL_OFFER_EXPIRES_IN;
53
42
  }
54
43
  /**
55
44
  * The time after which a cNonce will expire.
@@ -57,8 +46,7 @@ class OpenId4VcIssuerModuleConfig {
57
46
  * @default 60 (1 minute)
58
47
  */
59
48
  get authorizationCodeExpiresInSeconds() {
60
- var _a;
61
- return (_a = this.options.authorizationCodeExpiresInSeconds) !== null && _a !== void 0 ? _a : DEFAULT_AUTHORIZATION_CODE_EXPIRES_IN;
49
+ return this.options.authorizationCodeExpiresInSeconds ?? DEFAULT_AUTHORIZATION_CODE_EXPIRES_IN;
62
50
  }
63
51
  /**
64
52
  * The time after which an access token will expire.
@@ -66,8 +54,7 @@ class OpenId4VcIssuerModuleConfig {
66
54
  * @default 360 (5 minutes)
67
55
  */
68
56
  get accessTokenExpiresInSeconds() {
69
- var _a;
70
- return (_a = this.options.accessTokenExpiresInSeconds) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_EXPIRES_IN;
57
+ return this.options.accessTokenExpiresInSeconds ?? DEFAULT_TOKEN_EXPIRES_IN;
71
58
  }
72
59
  /**
73
60
  * Whether DPoP is required for all issuance sessions. This value can be overridden when creating
@@ -77,8 +64,7 @@ class OpenId4VcIssuerModuleConfig {
77
64
  * @default false
78
65
  */
79
66
  get dpopRequired() {
80
- var _a;
81
- return (_a = this.options.dpopRequired) !== null && _a !== void 0 ? _a : false;
67
+ return this.options.dpopRequired ?? false;
82
68
  }
83
69
  /**
84
70
  * Whether to allow dynamic issuance sessions based on a credential request.
@@ -86,55 +72,48 @@ class OpenId4VcIssuerModuleConfig {
86
72
  * This requires an external authorization server which issues access tokens without
87
73
  * a `pre-authorized_code` or `issuer_state` parameter.
88
74
  *
89
- * Credo only supports statefull crednetial offer sessions (pre-auth or presentation during issuance)
75
+ * Credo only supports stateful credential offer sessions (pre-auth or presentation during issuance)
90
76
  *
91
77
  * @default false
92
78
  */
93
79
  get allowDynamicIssuanceSessions() {
94
- var _a;
95
- return (_a = this.options.allowDynamicIssuanceSessions) !== null && _a !== void 0 ? _a : false;
80
+ return this.options.allowDynamicIssuanceSessions ?? false;
96
81
  }
97
82
  /**
98
83
  * @default /nonce
99
84
  */
100
85
  get nonceEndpointPath() {
101
- var _a, _b;
102
- return (_b = (_a = this.options.endpoints) === null || _a === void 0 ? void 0 : _a.nonce) !== null && _b !== void 0 ? _b : '/nonce';
86
+ return this.options.endpoints?.nonce ?? '/nonce';
103
87
  }
104
88
  /**
105
89
  * @default /challenge
106
90
  */
107
91
  get authorizationChallengeEndpointPath() {
108
- var _a, _b;
109
- return (_b = (_a = this.options.endpoints) === null || _a === void 0 ? void 0 : _a.authorizationChallenge) !== null && _b !== void 0 ? _b : '/challenge';
92
+ return this.options.endpoints?.authorizationChallenge ?? '/challenge';
110
93
  }
111
94
  /**
112
95
  * @default /offers
113
96
  */
114
97
  get credentialOfferEndpointPath() {
115
- var _a, _b;
116
- return (_b = (_a = this.options.endpoints) === null || _a === void 0 ? void 0 : _a.credentialOffer) !== null && _b !== void 0 ? _b : '/offers';
98
+ return this.options.endpoints?.credentialOffer ?? '/offers';
117
99
  }
118
100
  /**
119
101
  * @default /credential
120
102
  */
121
103
  get credentialEndpointPath() {
122
- var _a, _b;
123
- return (_b = (_a = this.options.endpoints) === null || _a === void 0 ? void 0 : _a.credential) !== null && _b !== void 0 ? _b : '/credential';
104
+ return this.options.endpoints?.credential ?? '/credential';
124
105
  }
125
106
  /**
126
107
  * @default /token
127
108
  */
128
109
  get accessTokenEndpointPath() {
129
- var _a, _b;
130
- return (_b = (_a = this.options.endpoints) === null || _a === void 0 ? void 0 : _a.accessToken) !== null && _b !== void 0 ? _b : '/token';
110
+ return this.options.endpoints?.accessToken ?? '/token';
131
111
  }
132
112
  /**
133
113
  * @default /jwks
134
114
  */
135
115
  get jwksEndpointPath() {
136
- var _a, _b;
137
- return (_b = (_a = this.options.endpoints) === null || _a === void 0 ? void 0 : _a.jwks) !== null && _b !== void 0 ? _b : '/jwks';
116
+ return this.options.endpoints?.jwks ?? '/jwks';
138
117
  }
139
118
  }
140
119
  exports.OpenId4VcIssuerModuleConfig = OpenId4VcIssuerModuleConfig;