@pagopa/io-react-native-wallet 2.0.0-next.3 → 2.0.0-next.5

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 (131) hide show
  1. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +75 -57
  2. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  4. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +3 -3
  5. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  6. package/lib/commonjs/credential/issuance/README.md +45 -34
  7. package/lib/commonjs/credential/issuance/types.js +1 -0
  8. package/lib/commonjs/credential/issuance/types.js.map +1 -1
  9. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +6 -13
  10. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
  11. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +7 -8
  12. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
  13. package/lib/commonjs/credential/presentation/types.js +1 -1
  14. package/lib/commonjs/credential/presentation/types.js.map +1 -1
  15. package/lib/commonjs/credential/status/{02-status-attestation.js → 02-status-assertion.js} +28 -22
  16. package/lib/commonjs/credential/status/02-status-assertion.js.map +1 -0
  17. package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js +85 -0
  18. package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js.map +1 -0
  19. package/lib/commonjs/credential/status/README.md +22 -20
  20. package/lib/commonjs/credential/status/index.js +6 -6
  21. package/lib/commonjs/credential/status/index.js.map +1 -1
  22. package/lib/commonjs/credential/status/types.js +48 -15
  23. package/lib/commonjs/credential/status/types.js.map +1 -1
  24. package/lib/commonjs/sd-jwt/index.js +6 -1
  25. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  26. package/lib/commonjs/sd-jwt/types.js +25 -9
  27. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  28. package/lib/commonjs/utils/credentials.js +33 -0
  29. package/lib/commonjs/utils/credentials.js.map +1 -0
  30. package/lib/commonjs/utils/crypto.js +1 -7
  31. package/lib/commonjs/utils/crypto.js.map +1 -1
  32. package/lib/commonjs/utils/jwk.js +12 -0
  33. package/lib/commonjs/utils/jwk.js.map +1 -1
  34. package/lib/commonjs/wallet-instance-attestation/types.js +1 -2
  35. package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
  36. package/lib/module/credential/issuance/04-complete-user-authorization.js +76 -58
  37. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  38. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  39. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +4 -4
  40. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  41. package/lib/module/credential/issuance/README.md +45 -34
  42. package/lib/module/credential/issuance/types.js +1 -0
  43. package/lib/module/credential/issuance/types.js.map +1 -1
  44. package/lib/module/credential/presentation/07-evaluate-dcql-query.js +6 -13
  45. package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
  46. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +7 -8
  47. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
  48. package/lib/module/credential/presentation/types.js +1 -1
  49. package/lib/module/credential/presentation/types.js.map +1 -1
  50. package/lib/module/credential/status/{02-status-attestation.js → 02-status-assertion.js} +28 -22
  51. package/lib/module/credential/status/02-status-assertion.js.map +1 -0
  52. package/lib/module/credential/status/03-verify-and-parse-status-assertion.js +78 -0
  53. package/lib/module/credential/status/03-verify-and-parse-status-assertion.js.map +1 -0
  54. package/lib/module/credential/status/README.md +22 -20
  55. package/lib/module/credential/status/index.js +3 -3
  56. package/lib/module/credential/status/index.js.map +1 -1
  57. package/lib/module/credential/status/types.js +43 -12
  58. package/lib/module/credential/status/types.js.map +1 -1
  59. package/lib/module/sd-jwt/index.js +6 -1
  60. package/lib/module/sd-jwt/index.js.map +1 -1
  61. package/lib/module/sd-jwt/types.js +25 -9
  62. package/lib/module/sd-jwt/types.js.map +1 -1
  63. package/lib/module/utils/credentials.js +26 -0
  64. package/lib/module/utils/credentials.js.map +1 -0
  65. package/lib/module/utils/crypto.js +2 -8
  66. package/lib/module/utils/crypto.js.map +1 -1
  67. package/lib/module/utils/jwk.js +11 -1
  68. package/lib/module/utils/jwk.js.map +1 -1
  69. package/lib/module/wallet-instance-attestation/types.js +1 -2
  70. package/lib/module/wallet-instance-attestation/types.js.map +1 -1
  71. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +7 -14
  72. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  73. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  74. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  75. package/lib/typescript/credential/issuance/types.d.ts +3 -0
  76. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  77. package/lib/typescript/credential/presentation/01-start-flow.d.ts +2 -2
  78. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +4 -3
  79. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
  80. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +9 -5
  81. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
  82. package/lib/typescript/credential/presentation/types.d.ts +3 -4
  83. package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
  84. package/lib/typescript/credential/status/02-status-assertion.d.ts +23 -0
  85. package/lib/typescript/credential/status/02-status-assertion.d.ts.map +1 -0
  86. package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts +21 -0
  87. package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts.map +1 -0
  88. package/lib/typescript/credential/status/index.d.ts +4 -4
  89. package/lib/typescript/credential/status/index.d.ts.map +1 -1
  90. package/lib/typescript/credential/status/types.d.ts +499 -22
  91. package/lib/typescript/credential/status/types.d.ts.map +1 -1
  92. package/lib/typescript/sd-jwt/index.d.ts +68 -40
  93. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  94. package/lib/typescript/sd-jwt/types.d.ts +97 -46
  95. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  96. package/lib/typescript/utils/credentials.d.ts +11 -0
  97. package/lib/typescript/utils/credentials.d.ts.map +1 -0
  98. package/lib/typescript/utils/crypto.d.ts.map +1 -1
  99. package/lib/typescript/utils/jwk.d.ts +7 -0
  100. package/lib/typescript/utils/jwk.d.ts.map +1 -1
  101. package/package.json +1 -1
  102. package/src/credential/issuance/04-complete-user-authorization.ts +79 -85
  103. package/src/credential/issuance/06-obtain-credential.ts +4 -1
  104. package/src/credential/issuance/07-verify-and-parse-credential.ts +4 -6
  105. package/src/credential/issuance/README.md +45 -34
  106. package/src/credential/issuance/types.ts +1 -0
  107. package/src/credential/presentation/07-evaluate-dcql-query.ts +16 -17
  108. package/src/credential/presentation/07-evaluate-input-descriptor.ts +16 -13
  109. package/src/credential/presentation/types.ts +1 -2
  110. package/src/credential/status/{02-status-attestation.ts → 02-status-assertion.ts} +37 -28
  111. package/src/credential/status/03-verify-and-parse-status-assertion.ts +109 -0
  112. package/src/credential/status/README.md +22 -20
  113. package/src/credential/status/index.ts +7 -14
  114. package/src/credential/status/types.ts +62 -15
  115. package/src/sd-jwt/index.ts +5 -1
  116. package/src/sd-jwt/types.ts +24 -10
  117. package/src/utils/credentials.ts +29 -0
  118. package/src/utils/crypto.ts +12 -20
  119. package/src/utils/jwk.ts +15 -1
  120. package/src/wallet-instance-attestation/types.ts +1 -1
  121. package/lib/commonjs/credential/status/02-status-attestation.js.map +0 -1
  122. package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +0 -55
  123. package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
  124. package/lib/module/credential/status/02-status-attestation.js.map +0 -1
  125. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +0 -49
  126. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
  127. package/lib/typescript/credential/status/02-status-attestation.d.ts +0 -19
  128. package/lib/typescript/credential/status/02-status-attestation.d.ts.map +0 -1
  129. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +0 -24
  130. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +0 -1
  131. package/src/credential/status/03-verify-and-parse-status-attestation.ts +0 -70
@@ -1,41 +1,50 @@
1
1
  import * as z from "zod";
2
2
  /**
3
- * Shape from parsing a status attestation response in case of 201.
3
+ * Shape from parsing a status assertion response in case of 201.
4
4
  */
5
- export declare const StatusAttestationResponse: z.ZodObject<{
6
- status_attestation: z.ZodString;
5
+ export declare const StatusAssertionResponse: z.ZodObject<{
6
+ status_assertion_responses: z.ZodArray<z.ZodString, "many">;
7
7
  }, "strip", z.ZodTypeAny, {
8
- status_attestation: string;
8
+ status_assertion_responses: string[];
9
9
  }, {
10
- status_attestation: string;
10
+ status_assertion_responses: string[];
11
11
  }>;
12
12
  /**
13
- * Type from parsing a status attestation response in case of 201.
14
- * Inferred from {@link StatusAttestationResponse}.
13
+ * Type from parsing a status assertion response in case of 201.
14
+ * Inferred from {@link StatusAssertionResponse}.
15
15
  */
16
- export type StatusAttestationResponse = z.infer<typeof StatusAttestationResponse>;
16
+ export type StatusAssertionResponse = z.infer<typeof StatusAssertionResponse>;
17
+ export type ParsedStatusAssertion = z.infer<typeof ParsedStatusAssertion>;
17
18
  /**
18
- * Type for a parsed status attestation.
19
+ * Shape for parsing a successful status assertion in a JWT.
19
20
  */
20
- export type ParsedStatusAttestation = z.infer<typeof ParsedStatusAttestation>;
21
- /**
22
- * Shape for parsing a status attestation in a JWT.
23
- */
24
- export declare const ParsedStatusAttestation: z.ZodObject<{
21
+ export declare const ParsedStatusAssertion: z.ZodObject<{
25
22
  header: z.ZodObject<{
26
- typ: z.ZodLiteral<"status-attestation+jwt">;
23
+ typ: z.ZodLiteral<"status-assertion+jwt">;
27
24
  alg: z.ZodString;
28
25
  kid: z.ZodOptional<z.ZodString>;
29
26
  }, "strip", z.ZodTypeAny, {
30
27
  alg: string;
31
- typ: "status-attestation+jwt";
28
+ typ: "status-assertion+jwt";
32
29
  kid?: string | undefined;
33
30
  }, {
34
31
  alg: string;
35
- typ: "status-attestation+jwt";
32
+ typ: "status-assertion+jwt";
36
33
  kid?: string | undefined;
37
34
  }>;
38
35
  payload: z.ZodObject<{
36
+ iss: z.ZodString;
37
+ credential_status_type: z.ZodString;
38
+ credential_status_detail: z.ZodOptional<z.ZodObject<{
39
+ state: z.ZodString;
40
+ description: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ state: string;
43
+ description: string;
44
+ }, {
45
+ state: string;
46
+ description: string;
47
+ }>>;
39
48
  credential_hash_alg: z.ZodString;
40
49
  credential_hash: z.ZodString;
41
50
  cnf: z.ZodObject<{
@@ -163,9 +172,10 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
163
172
  exp: z.ZodNumber;
164
173
  iat: z.ZodNumber;
165
174
  }, "strip", z.ZodTypeAny, {
175
+ iss: string;
176
+ credential_hash_alg: string;
166
177
  iat: number;
167
178
  exp: number;
168
- credential_hash_alg: string;
169
179
  cnf: {
170
180
  jwk: {
171
181
  kty: "RSA" | "EC";
@@ -192,11 +202,17 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
192
202
  x5u?: string | undefined;
193
203
  };
194
204
  };
205
+ credential_status_type: string;
195
206
  credential_hash: string;
207
+ credential_status_detail?: {
208
+ state: string;
209
+ description: string;
210
+ } | undefined;
196
211
  }, {
212
+ iss: string;
213
+ credential_hash_alg: string;
197
214
  iat: number;
198
215
  exp: number;
199
- credential_hash_alg: string;
200
216
  cnf: {
201
217
  jwk: {
202
218
  kty: "RSA" | "EC";
@@ -223,18 +239,68 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
223
239
  x5u?: string | undefined;
224
240
  };
225
241
  };
242
+ credential_status_type: string;
226
243
  credential_hash: string;
244
+ credential_status_detail?: {
245
+ state: string;
246
+ description: string;
247
+ } | undefined;
227
248
  }>;
228
249
  }, "strip", z.ZodTypeAny, {
229
250
  header: {
230
251
  alg: string;
231
- typ: "status-attestation+jwt";
252
+ typ: "status-assertion+jwt";
232
253
  kid?: string | undefined;
233
254
  };
234
255
  payload: {
256
+ iss: string;
257
+ credential_hash_alg: string;
235
258
  iat: number;
236
259
  exp: number;
260
+ cnf: {
261
+ jwk: {
262
+ kty: "RSA" | "EC";
263
+ alg?: string | undefined;
264
+ crv?: string | undefined;
265
+ d?: string | undefined;
266
+ dp?: string | undefined;
267
+ dq?: string | undefined;
268
+ e?: string | undefined;
269
+ ext?: boolean | undefined;
270
+ k?: string | undefined;
271
+ key_ops?: string[] | undefined;
272
+ kid?: string | undefined;
273
+ n?: string | undefined;
274
+ p?: string | undefined;
275
+ q?: string | undefined;
276
+ qi?: string | undefined;
277
+ use?: string | undefined;
278
+ x?: string | undefined;
279
+ y?: string | undefined;
280
+ x5c?: string[] | undefined;
281
+ x5t?: string | undefined;
282
+ "x5t#S256"?: string | undefined;
283
+ x5u?: string | undefined;
284
+ };
285
+ };
286
+ credential_status_type: string;
287
+ credential_hash: string;
288
+ credential_status_detail?: {
289
+ state: string;
290
+ description: string;
291
+ } | undefined;
292
+ };
293
+ }, {
294
+ header: {
295
+ alg: string;
296
+ typ: "status-assertion+jwt";
297
+ kid?: string | undefined;
298
+ };
299
+ payload: {
300
+ iss: string;
237
301
  credential_hash_alg: string;
302
+ iat: number;
303
+ exp: number;
238
304
  cnf: {
239
305
  jwk: {
240
306
  kty: "RSA" | "EC";
@@ -261,18 +327,273 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
261
327
  x5u?: string | undefined;
262
328
  };
263
329
  };
330
+ credential_status_type: string;
331
+ credential_hash: string;
332
+ credential_status_detail?: {
333
+ state: string;
334
+ description: string;
335
+ } | undefined;
336
+ };
337
+ }>;
338
+ export type ParsedStatusAssertionError = z.infer<typeof ParsedStatusAssertionError>;
339
+ /**
340
+ * The JWT that contains the errors occurred for the status assertion request.
341
+ * @see https://italia.github.io/eid-wallet-it-docs/versione-corrente/en/credential-revocation.html#http-status-assertion-response
342
+ */
343
+ export declare const ParsedStatusAssertionError: z.ZodObject<{
344
+ header: z.ZodObject<{
345
+ typ: z.ZodLiteral<"status-assertion-error+jwt">;
346
+ alg: z.ZodString;
347
+ kid: z.ZodOptional<z.ZodString>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ alg: string;
350
+ typ: "status-assertion-error+jwt";
351
+ kid?: string | undefined;
352
+ }, {
353
+ alg: string;
354
+ typ: "status-assertion-error+jwt";
355
+ kid?: string | undefined;
356
+ }>;
357
+ payload: z.ZodObject<{
358
+ credential_hash_alg: z.ZodString;
359
+ credential_hash: z.ZodString;
360
+ error: z.ZodString;
361
+ error_description: z.ZodString;
362
+ }, "strip", z.ZodTypeAny, {
363
+ error: string;
364
+ error_description: string;
365
+ credential_hash_alg: string;
366
+ credential_hash: string;
367
+ }, {
368
+ error: string;
369
+ error_description: string;
370
+ credential_hash_alg: string;
371
+ credential_hash: string;
372
+ }>;
373
+ }, "strip", z.ZodTypeAny, {
374
+ header: {
375
+ alg: string;
376
+ typ: "status-assertion-error+jwt";
377
+ kid?: string | undefined;
378
+ };
379
+ payload: {
380
+ error: string;
381
+ error_description: string;
382
+ credential_hash_alg: string;
264
383
  credential_hash: string;
265
384
  };
266
385
  }, {
267
386
  header: {
268
387
  alg: string;
269
- typ: "status-attestation+jwt";
388
+ typ: "status-assertion-error+jwt";
270
389
  kid?: string | undefined;
271
390
  };
272
391
  payload: {
392
+ error: string;
393
+ error_description: string;
394
+ credential_hash_alg: string;
395
+ credential_hash: string;
396
+ };
397
+ }>;
398
+ /**
399
+ * The status assertion response that might include either a successful assertion or an error
400
+ */
401
+ export type ParsedStatusAssertionResponse = z.infer<typeof ParsedStatusAssertionResponse>;
402
+ export declare const ParsedStatusAssertionResponse: z.ZodUnion<[z.ZodObject<{
403
+ header: z.ZodObject<{
404
+ typ: z.ZodLiteral<"status-assertion+jwt">;
405
+ alg: z.ZodString;
406
+ kid: z.ZodOptional<z.ZodString>;
407
+ }, "strip", z.ZodTypeAny, {
408
+ alg: string;
409
+ typ: "status-assertion+jwt";
410
+ kid?: string | undefined;
411
+ }, {
412
+ alg: string;
413
+ typ: "status-assertion+jwt";
414
+ kid?: string | undefined;
415
+ }>;
416
+ payload: z.ZodObject<{
417
+ iss: z.ZodString;
418
+ credential_status_type: z.ZodString;
419
+ credential_status_detail: z.ZodOptional<z.ZodObject<{
420
+ state: z.ZodString;
421
+ description: z.ZodString;
422
+ }, "strip", z.ZodTypeAny, {
423
+ state: string;
424
+ description: string;
425
+ }, {
426
+ state: string;
427
+ description: string;
428
+ }>>;
429
+ credential_hash_alg: z.ZodString;
430
+ credential_hash: z.ZodString;
431
+ cnf: z.ZodObject<{
432
+ jwk: z.ZodObject<{
433
+ alg: z.ZodOptional<z.ZodString>;
434
+ crv: z.ZodOptional<z.ZodString>;
435
+ d: z.ZodOptional<z.ZodString>;
436
+ dp: z.ZodOptional<z.ZodString>;
437
+ dq: z.ZodOptional<z.ZodString>;
438
+ e: z.ZodOptional<z.ZodString>;
439
+ ext: z.ZodOptional<z.ZodBoolean>;
440
+ k: z.ZodOptional<z.ZodString>;
441
+ key_ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
442
+ kid: z.ZodOptional<z.ZodString>;
443
+ kty: z.ZodUnion<[z.ZodLiteral<"RSA">, z.ZodLiteral<"EC">]>;
444
+ n: z.ZodOptional<z.ZodString>;
445
+ p: z.ZodOptional<z.ZodString>;
446
+ q: z.ZodOptional<z.ZodString>;
447
+ qi: z.ZodOptional<z.ZodString>;
448
+ use: z.ZodOptional<z.ZodString>;
449
+ x: z.ZodOptional<z.ZodString>;
450
+ y: z.ZodOptional<z.ZodString>;
451
+ x5c: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
452
+ x5t: z.ZodOptional<z.ZodString>;
453
+ "x5t#S256": z.ZodOptional<z.ZodString>;
454
+ x5u: z.ZodOptional<z.ZodString>;
455
+ }, "strip", z.ZodTypeAny, {
456
+ kty: "RSA" | "EC";
457
+ alg?: string | undefined;
458
+ crv?: string | undefined;
459
+ d?: string | undefined;
460
+ dp?: string | undefined;
461
+ dq?: string | undefined;
462
+ e?: string | undefined;
463
+ ext?: boolean | undefined;
464
+ k?: string | undefined;
465
+ key_ops?: string[] | undefined;
466
+ kid?: string | undefined;
467
+ n?: string | undefined;
468
+ p?: string | undefined;
469
+ q?: string | undefined;
470
+ qi?: string | undefined;
471
+ use?: string | undefined;
472
+ x?: string | undefined;
473
+ y?: string | undefined;
474
+ x5c?: string[] | undefined;
475
+ x5t?: string | undefined;
476
+ "x5t#S256"?: string | undefined;
477
+ x5u?: string | undefined;
478
+ }, {
479
+ kty: "RSA" | "EC";
480
+ alg?: string | undefined;
481
+ crv?: string | undefined;
482
+ d?: string | undefined;
483
+ dp?: string | undefined;
484
+ dq?: string | undefined;
485
+ e?: string | undefined;
486
+ ext?: boolean | undefined;
487
+ k?: string | undefined;
488
+ key_ops?: string[] | undefined;
489
+ kid?: string | undefined;
490
+ n?: string | undefined;
491
+ p?: string | undefined;
492
+ q?: string | undefined;
493
+ qi?: string | undefined;
494
+ use?: string | undefined;
495
+ x?: string | undefined;
496
+ y?: string | undefined;
497
+ x5c?: string[] | undefined;
498
+ x5t?: string | undefined;
499
+ "x5t#S256"?: string | undefined;
500
+ x5u?: string | undefined;
501
+ }>;
502
+ }, "strip", z.ZodTypeAny, {
503
+ jwk: {
504
+ kty: "RSA" | "EC";
505
+ alg?: string | undefined;
506
+ crv?: string | undefined;
507
+ d?: string | undefined;
508
+ dp?: string | undefined;
509
+ dq?: string | undefined;
510
+ e?: string | undefined;
511
+ ext?: boolean | undefined;
512
+ k?: string | undefined;
513
+ key_ops?: string[] | undefined;
514
+ kid?: string | undefined;
515
+ n?: string | undefined;
516
+ p?: string | undefined;
517
+ q?: string | undefined;
518
+ qi?: string | undefined;
519
+ use?: string | undefined;
520
+ x?: string | undefined;
521
+ y?: string | undefined;
522
+ x5c?: string[] | undefined;
523
+ x5t?: string | undefined;
524
+ "x5t#S256"?: string | undefined;
525
+ x5u?: string | undefined;
526
+ };
527
+ }, {
528
+ jwk: {
529
+ kty: "RSA" | "EC";
530
+ alg?: string | undefined;
531
+ crv?: string | undefined;
532
+ d?: string | undefined;
533
+ dp?: string | undefined;
534
+ dq?: string | undefined;
535
+ e?: string | undefined;
536
+ ext?: boolean | undefined;
537
+ k?: string | undefined;
538
+ key_ops?: string[] | undefined;
539
+ kid?: string | undefined;
540
+ n?: string | undefined;
541
+ p?: string | undefined;
542
+ q?: string | undefined;
543
+ qi?: string | undefined;
544
+ use?: string | undefined;
545
+ x?: string | undefined;
546
+ y?: string | undefined;
547
+ x5c?: string[] | undefined;
548
+ x5t?: string | undefined;
549
+ "x5t#S256"?: string | undefined;
550
+ x5u?: string | undefined;
551
+ };
552
+ }>;
553
+ exp: z.ZodNumber;
554
+ iat: z.ZodNumber;
555
+ }, "strip", z.ZodTypeAny, {
556
+ iss: string;
557
+ credential_hash_alg: string;
273
558
  iat: number;
274
559
  exp: number;
560
+ cnf: {
561
+ jwk: {
562
+ kty: "RSA" | "EC";
563
+ alg?: string | undefined;
564
+ crv?: string | undefined;
565
+ d?: string | undefined;
566
+ dp?: string | undefined;
567
+ dq?: string | undefined;
568
+ e?: string | undefined;
569
+ ext?: boolean | undefined;
570
+ k?: string | undefined;
571
+ key_ops?: string[] | undefined;
572
+ kid?: string | undefined;
573
+ n?: string | undefined;
574
+ p?: string | undefined;
575
+ q?: string | undefined;
576
+ qi?: string | undefined;
577
+ use?: string | undefined;
578
+ x?: string | undefined;
579
+ y?: string | undefined;
580
+ x5c?: string[] | undefined;
581
+ x5t?: string | undefined;
582
+ "x5t#S256"?: string | undefined;
583
+ x5u?: string | undefined;
584
+ };
585
+ };
586
+ credential_status_type: string;
587
+ credential_hash: string;
588
+ credential_status_detail?: {
589
+ state: string;
590
+ description: string;
591
+ } | undefined;
592
+ }, {
593
+ iss: string;
275
594
  credential_hash_alg: string;
595
+ iat: number;
596
+ exp: number;
276
597
  cnf: {
277
598
  jwk: {
278
599
  kty: "RSA" | "EC";
@@ -299,7 +620,163 @@ export declare const ParsedStatusAttestation: z.ZodObject<{
299
620
  x5u?: string | undefined;
300
621
  };
301
622
  };
623
+ credential_status_type: string;
302
624
  credential_hash: string;
625
+ credential_status_detail?: {
626
+ state: string;
627
+ description: string;
628
+ } | undefined;
629
+ }>;
630
+ }, "strip", z.ZodTypeAny, {
631
+ header: {
632
+ alg: string;
633
+ typ: "status-assertion+jwt";
634
+ kid?: string | undefined;
303
635
  };
304
- }>;
636
+ payload: {
637
+ iss: string;
638
+ credential_hash_alg: string;
639
+ iat: number;
640
+ exp: number;
641
+ cnf: {
642
+ jwk: {
643
+ kty: "RSA" | "EC";
644
+ alg?: string | undefined;
645
+ crv?: string | undefined;
646
+ d?: string | undefined;
647
+ dp?: string | undefined;
648
+ dq?: string | undefined;
649
+ e?: string | undefined;
650
+ ext?: boolean | undefined;
651
+ k?: string | undefined;
652
+ key_ops?: string[] | undefined;
653
+ kid?: string | undefined;
654
+ n?: string | undefined;
655
+ p?: string | undefined;
656
+ q?: string | undefined;
657
+ qi?: string | undefined;
658
+ use?: string | undefined;
659
+ x?: string | undefined;
660
+ y?: string | undefined;
661
+ x5c?: string[] | undefined;
662
+ x5t?: string | undefined;
663
+ "x5t#S256"?: string | undefined;
664
+ x5u?: string | undefined;
665
+ };
666
+ };
667
+ credential_status_type: string;
668
+ credential_hash: string;
669
+ credential_status_detail?: {
670
+ state: string;
671
+ description: string;
672
+ } | undefined;
673
+ };
674
+ }, {
675
+ header: {
676
+ alg: string;
677
+ typ: "status-assertion+jwt";
678
+ kid?: string | undefined;
679
+ };
680
+ payload: {
681
+ iss: string;
682
+ credential_hash_alg: string;
683
+ iat: number;
684
+ exp: number;
685
+ cnf: {
686
+ jwk: {
687
+ kty: "RSA" | "EC";
688
+ alg?: string | undefined;
689
+ crv?: string | undefined;
690
+ d?: string | undefined;
691
+ dp?: string | undefined;
692
+ dq?: string | undefined;
693
+ e?: string | undefined;
694
+ ext?: boolean | undefined;
695
+ k?: string | undefined;
696
+ key_ops?: string[] | undefined;
697
+ kid?: string | undefined;
698
+ n?: string | undefined;
699
+ p?: string | undefined;
700
+ q?: string | undefined;
701
+ qi?: string | undefined;
702
+ use?: string | undefined;
703
+ x?: string | undefined;
704
+ y?: string | undefined;
705
+ x5c?: string[] | undefined;
706
+ x5t?: string | undefined;
707
+ "x5t#S256"?: string | undefined;
708
+ x5u?: string | undefined;
709
+ };
710
+ };
711
+ credential_status_type: string;
712
+ credential_hash: string;
713
+ credential_status_detail?: {
714
+ state: string;
715
+ description: string;
716
+ } | undefined;
717
+ };
718
+ }>, z.ZodObject<{
719
+ header: z.ZodObject<{
720
+ typ: z.ZodLiteral<"status-assertion-error+jwt">;
721
+ alg: z.ZodString;
722
+ kid: z.ZodOptional<z.ZodString>;
723
+ }, "strip", z.ZodTypeAny, {
724
+ alg: string;
725
+ typ: "status-assertion-error+jwt";
726
+ kid?: string | undefined;
727
+ }, {
728
+ alg: string;
729
+ typ: "status-assertion-error+jwt";
730
+ kid?: string | undefined;
731
+ }>;
732
+ payload: z.ZodObject<{
733
+ credential_hash_alg: z.ZodString;
734
+ credential_hash: z.ZodString;
735
+ error: z.ZodString;
736
+ error_description: z.ZodString;
737
+ }, "strip", z.ZodTypeAny, {
738
+ error: string;
739
+ error_description: string;
740
+ credential_hash_alg: string;
741
+ credential_hash: string;
742
+ }, {
743
+ error: string;
744
+ error_description: string;
745
+ credential_hash_alg: string;
746
+ credential_hash: string;
747
+ }>;
748
+ }, "strip", z.ZodTypeAny, {
749
+ header: {
750
+ alg: string;
751
+ typ: "status-assertion-error+jwt";
752
+ kid?: string | undefined;
753
+ };
754
+ payload: {
755
+ error: string;
756
+ error_description: string;
757
+ credential_hash_alg: string;
758
+ credential_hash: string;
759
+ };
760
+ }, {
761
+ header: {
762
+ alg: string;
763
+ typ: "status-assertion-error+jwt";
764
+ kid?: string | undefined;
765
+ };
766
+ payload: {
767
+ error: string;
768
+ error_description: string;
769
+ credential_hash_alg: string;
770
+ credential_hash: string;
771
+ };
772
+ }>]>;
773
+ export declare enum StatusType {
774
+ VALID = "0x00",
775
+ INVALID = "0x01",
776
+ SUSPENDED = "0x02"
777
+ }
778
+ export type InvalidStatusErrorReason = {
779
+ error: string;
780
+ error_description: string;
781
+ };
305
782
  //# 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"}
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,uBAAuB;;;;;;EAElC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBhC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYrC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,6BAA6B,CACrC,CAAC;AACF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGxC,CAAC;AAEH,oBAAY,UAAU;IACpB,KAAK,SAAS;IACd,OAAO,SAAS;IAChB,SAAS,SAAS;CACnB;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC"}