@pagopa/io-react-native-wallet 0.27.0 → 0.28.0

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 (90) hide show
  1. package/lib/commonjs/client/generated/wallet-provider.js +27 -19
  2. package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +5 -5
  4. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  5. package/lib/commonjs/credential/issuance/05-authorize-access.js +3 -4
  6. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  7. package/lib/commonjs/credential/issuance/06-obtain-credential.js +2 -3
  8. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  9. package/lib/commonjs/credential/issuance/README.md +2 -2
  10. package/lib/commonjs/credential/presentation/03-get-request-object.js +2 -3
  11. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
  12. package/lib/commonjs/credential/presentation/04-send-authorization-response.js +4 -5
  13. package/lib/commonjs/credential/presentation/04-send-authorization-response.js.map +1 -1
  14. package/lib/commonjs/credential/status/02-status-attestation.js +2 -3
  15. package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -1
  16. package/lib/commonjs/trust/chain.js +35 -50
  17. package/lib/commonjs/trust/chain.js.map +1 -1
  18. package/lib/commonjs/trust/index.js +139 -16
  19. package/lib/commonjs/trust/index.js.map +1 -1
  20. package/lib/commonjs/trust/types.js +13 -37
  21. package/lib/commonjs/trust/types.js.map +1 -1
  22. package/lib/commonjs/trust/utils.js +36 -0
  23. package/lib/commonjs/trust/utils.js.map +1 -0
  24. package/lib/commonjs/utils/crypto.js +2 -3
  25. package/lib/commonjs/utils/crypto.js.map +1 -1
  26. package/lib/commonjs/utils/par.js +3 -4
  27. package/lib/commonjs/utils/par.js.map +1 -1
  28. package/lib/commonjs/wallet-instance/index.js +10 -0
  29. package/lib/commonjs/wallet-instance/index.js.map +1 -1
  30. package/lib/module/client/generated/wallet-provider.js +22 -15
  31. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  32. package/lib/module/credential/issuance/04-complete-user-authorization.js +5 -5
  33. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  34. package/lib/module/credential/issuance/05-authorize-access.js +3 -3
  35. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  36. package/lib/module/credential/issuance/06-obtain-credential.js +2 -2
  37. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  38. package/lib/module/credential/issuance/README.md +2 -2
  39. package/lib/module/credential/presentation/03-get-request-object.js +2 -2
  40. package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
  41. package/lib/module/credential/presentation/04-send-authorization-response.js +4 -4
  42. package/lib/module/credential/presentation/04-send-authorization-response.js.map +1 -1
  43. package/lib/module/credential/status/02-status-attestation.js +2 -2
  44. package/lib/module/credential/status/02-status-attestation.js.map +1 -1
  45. package/lib/module/trust/chain.js +32 -46
  46. package/lib/module/trust/chain.js.map +1 -1
  47. package/lib/module/trust/index.js +139 -18
  48. package/lib/module/trust/index.js.map +1 -1
  49. package/lib/module/trust/types.js +11 -36
  50. package/lib/module/trust/types.js.map +1 -1
  51. package/lib/module/trust/utils.js +28 -0
  52. package/lib/module/trust/utils.js.map +1 -0
  53. package/lib/module/utils/crypto.js +2 -2
  54. package/lib/module/utils/crypto.js.map +1 -1
  55. package/lib/module/utils/par.js +3 -3
  56. package/lib/module/utils/par.js.map +1 -1
  57. package/lib/module/wallet-instance/index.js +9 -0
  58. package/lib/module/wallet-instance/index.js.map +1 -1
  59. package/lib/typescript/client/generated/wallet-provider.d.ts +91 -54
  60. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  61. package/lib/typescript/credential/status/types.d.ts +6 -6
  62. package/lib/typescript/sd-jwt/index.d.ts +12 -12
  63. package/lib/typescript/sd-jwt/types.d.ts +6 -6
  64. package/lib/typescript/trust/chain.d.ts +4 -9
  65. package/lib/typescript/trust/chain.d.ts.map +1 -1
  66. package/lib/typescript/trust/index.d.ts +109 -95
  67. package/lib/typescript/trust/index.d.ts.map +1 -1
  68. package/lib/typescript/trust/types.d.ts +845 -542
  69. package/lib/typescript/trust/types.d.ts.map +1 -1
  70. package/lib/typescript/trust/utils.d.ts +12 -0
  71. package/lib/typescript/trust/utils.d.ts.map +1 -0
  72. package/lib/typescript/wallet-instance/index.d.ts +8 -0
  73. package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
  74. package/lib/typescript/wallet-instance-attestation/types.d.ts +24 -24
  75. package/package.json +9 -3
  76. package/src/client/generated/wallet-provider.ts +28 -19
  77. package/src/credential/issuance/04-complete-user-authorization.ts +5 -5
  78. package/src/credential/issuance/05-authorize-access.ts +3 -3
  79. package/src/credential/issuance/06-obtain-credential.ts +2 -2
  80. package/src/credential/issuance/README.md +2 -2
  81. package/src/credential/presentation/03-get-request-object.ts +2 -2
  82. package/src/credential/presentation/04-send-authorization-response.ts +4 -4
  83. package/src/credential/status/02-status-attestation.ts +2 -2
  84. package/src/trust/chain.ts +46 -62
  85. package/src/trust/index.ts +185 -20
  86. package/src/trust/types.ts +10 -27
  87. package/src/trust/utils.ts +32 -0
  88. package/src/utils/crypto.ts +2 -2
  89. package/src/utils/par.ts +3 -3
  90. package/src/wallet-instance/index.ts +13 -0
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/trust/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,SAAS;;;;;;;;;EAAuD,CAAC;AAC9E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AA0ElD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0D7E,CAAC;AAEF,eAAO,MAAM,sBAAsB,iCAAsB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { JWK } from "../utils/jwk";
2
+ import type { JWTDecodeResult } from "@pagopa/io-react-native-jwt/lib/typescript/types";
3
+ export type ParsedToken = {
4
+ header: JWTDecodeResult["protectedHeader"];
5
+ payload: JWTDecodeResult["payload"];
6
+ };
7
+ export declare const verify: (token: string, kid: string, jwks: JWK[]) => Promise<ParsedToken>;
8
+ export declare const decode: (token: string) => {
9
+ header: import("@pagopa/io-react-native-jwt/lib/typescript/types").JWSHeaderParameters;
10
+ payload: import("@pagopa/io-react-native-jwt/lib/typescript/types").JWTPayload;
11
+ };
12
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/trust/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAExF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAC3C,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACrC,CAAC;AAIF,eAAO,MAAM,MAAM,UACV,MAAM,OACR,MAAM,QACL,GAAG,EAAE,KACV,QAAQ,WAAW,CAOrB,CAAC;AAEF,eAAO,MAAM,MAAM,UAAW,MAAM;;;CAGnC,CAAC"}
@@ -24,4 +24,12 @@ export declare function getWalletInstanceStatus(context: {
24
24
  walletProviderBaseUrl: string;
25
25
  appFetch?: GlobalFetch["fetch"];
26
26
  }): Promise<WalletInstanceData>;
27
+ /**
28
+ * Get the status of the current Wallet Instance.
29
+ * @returns Details on the status of the current Wallet Instance
30
+ */
31
+ export declare function getCurrentWalletInstanceStatus(context: {
32
+ walletProviderBaseUrl: string;
33
+ appFetch?: GlobalFetch["fetch"];
34
+ }): Promise<WalletInstanceData>;
27
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wallet-instance/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAE3C,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,mBAuBA;AAoBD;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhB;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAM9B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wallet-instance/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAE3C,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,mBAuBA;AAoBD;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhB;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAM9B;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,CAAC,OAAO,EAAE;IAC5D,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAI9B"}
@@ -240,15 +240,6 @@ export declare const WalletInstanceAttestationRequestJwt: z.ZodObject<{
240
240
  jti: string;
241
241
  }>>;
242
242
  }, "strip", z.ZodTypeAny, {
243
- header: {
244
- alg: string;
245
- kid: string;
246
- typ: string;
247
- x5c?: string[] | undefined;
248
- trust_chain?: string[] | undefined;
249
- } & {
250
- typ: "war+jwt";
251
- };
252
243
  payload: {
253
244
  iss: string;
254
245
  iat: number;
@@ -286,7 +277,6 @@ export declare const WalletInstanceAttestationRequestJwt: z.ZodObject<{
286
277
  aud: string;
287
278
  jti: string;
288
279
  };
289
- }, {
290
280
  header: {
291
281
  alg: string;
292
282
  kid: string;
@@ -296,6 +286,7 @@ export declare const WalletInstanceAttestationRequestJwt: z.ZodObject<{
296
286
  } & {
297
287
  typ: "war+jwt";
298
288
  };
289
+ }, {
299
290
  payload: {
300
291
  iss: string;
301
292
  iat: number;
@@ -333,6 +324,15 @@ export declare const WalletInstanceAttestationRequestJwt: z.ZodObject<{
333
324
  aud: string;
334
325
  jti: string;
335
326
  };
327
+ header: {
328
+ alg: string;
329
+ kid: string;
330
+ typ: string;
331
+ x5c?: string[] | undefined;
332
+ trust_chain?: string[] | undefined;
333
+ } & {
334
+ typ: "war+jwt";
335
+ };
336
336
  }>;
337
337
  export type WalletInstanceAttestationJwt = z.infer<typeof WalletInstanceAttestationJwt>;
338
338
  export declare const WalletInstanceAttestationJwt: z.ZodObject<{
@@ -601,9 +601,9 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
601
601
  }, "strip", z.ZodTypeAny, {
602
602
  sub: string;
603
603
  authorization_endpoint: string;
604
- response_types_supported: string[];
605
604
  request_object_signing_alg_values_supported: string[];
606
605
  aal: string;
606
+ response_types_supported: string[];
607
607
  vp_formats_supported: {
608
608
  "vc+sd-jwt"?: {
609
609
  "sd-jwt_alg_values": string[];
@@ -616,9 +616,9 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
616
616
  }, {
617
617
  sub: string;
618
618
  authorization_endpoint: string;
619
- response_types_supported: string[];
620
619
  request_object_signing_alg_values_supported: string[];
621
620
  aal: string;
621
+ response_types_supported: string[];
622
622
  vp_formats_supported: {
623
623
  "vc+sd-jwt"?: {
624
624
  "sd-jwt_alg_values": string[];
@@ -630,15 +630,6 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
630
630
  presentation_definition_uri_supported: boolean;
631
631
  }>>;
632
632
  }, "strip", z.ZodTypeAny, {
633
- header: {
634
- alg: string;
635
- kid: string;
636
- typ: string;
637
- x5c?: string[] | undefined;
638
- trust_chain?: string[] | undefined;
639
- } & {
640
- typ: "wallet-attestation+jwt";
641
- };
642
633
  payload: {
643
634
  iss: string;
644
635
  iat: number;
@@ -674,9 +665,9 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
674
665
  } & {
675
666
  sub: string;
676
667
  authorization_endpoint: string;
677
- response_types_supported: string[];
678
668
  request_object_signing_alg_values_supported: string[];
679
669
  aal: string;
670
+ response_types_supported: string[];
680
671
  vp_formats_supported: {
681
672
  "vc+sd-jwt"?: {
682
673
  "sd-jwt_alg_values": string[];
@@ -687,7 +678,6 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
687
678
  };
688
679
  presentation_definition_uri_supported: boolean;
689
680
  };
690
- }, {
691
681
  header: {
692
682
  alg: string;
693
683
  kid: string;
@@ -697,6 +687,7 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
697
687
  } & {
698
688
  typ: "wallet-attestation+jwt";
699
689
  };
690
+ }, {
700
691
  payload: {
701
692
  iss: string;
702
693
  iat: number;
@@ -732,9 +723,9 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
732
723
  } & {
733
724
  sub: string;
734
725
  authorization_endpoint: string;
735
- response_types_supported: string[];
736
726
  request_object_signing_alg_values_supported: string[];
737
727
  aal: string;
728
+ response_types_supported: string[];
738
729
  vp_formats_supported: {
739
730
  "vc+sd-jwt"?: {
740
731
  "sd-jwt_alg_values": string[];
@@ -745,6 +736,15 @@ export declare const WalletInstanceAttestationJwt: z.ZodObject<{
745
736
  };
746
737
  presentation_definition_uri_supported: boolean;
747
738
  };
739
+ header: {
740
+ alg: string;
741
+ kid: string;
742
+ typ: string;
743
+ x5c?: string[] | undefined;
744
+ trust_chain?: string[] | undefined;
745
+ } & {
746
+ typ: "wallet-attestation+jwt";
747
+ };
748
748
  }>;
749
749
  export type TokenResponse = z.infer<typeof TokenResponse>;
750
750
  export declare const TokenResponse: z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-react-native-wallet",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "description": "Provide data structures, helpers and API for IO Wallet",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -90,6 +90,12 @@
90
90
  "modulePathIgnorePatterns": [
91
91
  "<rootDir>/example/node_modules",
92
92
  "<rootDir>/lib/"
93
+ ],
94
+ "transformIgnorePatterns": [
95
+ "node_modules/(?!(jest-)?@react-native|react-native|uuid)"
96
+ ],
97
+ "setupFiles": [
98
+ "<rootDir>/jestSetup.js"
93
99
  ]
94
100
  },
95
101
  "react-native-builder-bob": {
@@ -111,7 +117,7 @@
111
117
  "js-sha256": "^0.9.0",
112
118
  "parse-url": "^9.2.0",
113
119
  "react-native-url-polyfill": "^2.0.0",
114
- "react-native-uuid": "^2.0.1",
120
+ "uuid": "^11.0.3",
115
121
  "zod": "^3.21.4"
116
122
  }
117
- }
123
+ }
@@ -23,15 +23,6 @@ export const CreateWalletAttestationBody = z.object({
23
23
  assertion: z.string(),
24
24
  });
25
25
 
26
- export type ProblemDetail = z.infer<typeof ProblemDetail>;
27
- export const ProblemDetail = z.object({
28
- type: z.string().optional(),
29
- title: z.string().optional(),
30
- status: z.number().optional(),
31
- detail: z.string().optional(),
32
- instance: z.string().optional(),
33
- });
34
-
35
26
  export type SetWalletInstanceStatusBody = z.infer<typeof SetWalletInstanceStatusBody>;
36
27
  export const SetWalletInstanceStatusBody = z.object({
37
28
  status: z.literal("REVOKED"),
@@ -51,6 +42,15 @@ export const WalletInstanceData = z.object({
51
42
  revocation_reason: z.union([RevocationReason, z.undefined()]).optional(),
52
43
  });
53
44
 
45
+ export type ProblemDetail = z.infer<typeof ProblemDetail>;
46
+ export const ProblemDetail = z.object({
47
+ type: z.string().optional(),
48
+ title: z.string().optional(),
49
+ status: z.number().optional(),
50
+ detail: z.string().optional(),
51
+ instance: z.string().optional(),
52
+ });
53
+
54
54
  export type get_GetNonce = typeof get_GetNonce;
55
55
  export const get_GetNonce = {
56
56
  method: z.literal("GET"),
@@ -69,6 +69,24 @@ export const post_CreateWalletInstance = {
69
69
  response: z.unknown(),
70
70
  };
71
71
 
72
+ export type post_CreateWalletAttestation = typeof post_CreateWalletAttestation;
73
+ export const post_CreateWalletAttestation = {
74
+ method: z.literal("POST"),
75
+ path: z.literal("/token"),
76
+ parameters: z.object({
77
+ body: CreateWalletAttestationBody,
78
+ }),
79
+ response: WalletAttestationView,
80
+ };
81
+
82
+ export type get_GetCurrentWalletInstanceStatus = typeof get_GetCurrentWalletInstanceStatus;
83
+ export const get_GetCurrentWalletInstanceStatus = {
84
+ method: z.literal("GET"),
85
+ path: z.literal("/wallet-instances/current/status"),
86
+ parameters: z.never(),
87
+ response: WalletInstanceData,
88
+ };
89
+
72
90
  export type get_GetWalletInstanceStatus = typeof get_GetWalletInstanceStatus;
73
91
  export const get_GetWalletInstanceStatus = {
74
92
  method: z.literal("GET"),
@@ -94,20 +112,11 @@ export const put_SetWalletInstanceStatus = {
94
112
  response: z.unknown(),
95
113
  };
96
114
 
97
- export type post_CreateWalletAttestation = typeof post_CreateWalletAttestation;
98
- export const post_CreateWalletAttestation = {
99
- method: z.literal("POST"),
100
- path: z.literal("/token"),
101
- parameters: z.object({
102
- body: CreateWalletAttestationBody,
103
- }),
104
- response: WalletAttestationView,
105
- };
106
-
107
115
  // <EndpointByMethod>
108
116
  export const EndpointByMethod = {
109
117
  get: {
110
118
  "/nonce": get_GetNonce,
119
+ "/wallet-instances/current/status": get_GetCurrentWalletInstanceStatus,
111
120
  "/wallet-instances/{id}/status": get_GetWalletInstanceStatus,
112
121
  },
113
122
  post: {
@@ -15,7 +15,7 @@ import {
15
15
  type CryptoContext,
16
16
  } from "@pagopa/io-react-native-jwt";
17
17
  import { RequestObject } from "../presentation/types";
18
- import uuid from "react-native-uuid";
18
+ import { v4 as uuidv4 } from "uuid";
19
19
  import { ResponseUriResultShape } from "./types";
20
20
  import { getJwtFromFormPost } from "../../utils/decoder";
21
21
  import { AuthorizationError, AuthorizationIdpError } from "./errors";
@@ -169,7 +169,7 @@ export const completeUserAuthorizationWithFormPostJwtMode: CompleteUserAuthoriza
169
169
  })
170
170
  .setPayload({
171
171
  vp: walletInstanceAttestation,
172
- jti: uuid.v4().toString(),
172
+ jti: uuidv4().toString(),
173
173
  nonce: requestObject.nonce,
174
174
  })
175
175
  .setIssuedAt()
@@ -184,7 +184,7 @@ export const completeUserAuthorizationWithFormPostJwtMode: CompleteUserAuthoriza
184
184
  })
185
185
  .setPayload({
186
186
  vp: pid,
187
- jti: uuid.v4().toString(),
187
+ jti: uuidv4().toString(),
188
188
  nonce: requestObject.nonce,
189
189
  })
190
190
  .setIssuedAt()
@@ -196,8 +196,8 @@ export const completeUserAuthorizationWithFormPostJwtMode: CompleteUserAuthoriza
196
196
  * is cointaned in the `vp` property of the signed jwt token payload
197
197
  */
198
198
  const presentationSubmission = {
199
- definition_id: `${uuid.v4()}`,
200
- id: `${uuid.v4()}`,
199
+ definition_id: `${uuidv4()}`,
200
+ id: `${uuidv4()}`,
201
201
  descriptor_map: [
202
202
  {
203
203
  id: "PersonIdentificationData",
@@ -2,7 +2,7 @@ import { hasStatusOrThrow, type Out } from "../../utils/misc";
2
2
  import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
3
3
  import type { StartUserAuthorization } from "./03-start-user-authorization";
4
4
  import { createDPopToken } from "../../utils/dpop";
5
- import uuid from "react-native-uuid";
5
+ import { v4 as uuidv4 } from "uuid";
6
6
  import { createPopToken } from "../../utils/pop";
7
7
  import * as WalletInstanceAttestation from "../../wallet-instance-attestation";
8
8
  import type { CryptoContext } from "@pagopa/io-react-native-jwt";
@@ -71,14 +71,14 @@ export const authorizeAccess: AuthorizeAccess = async (
71
71
  {
72
72
  htm: "POST",
73
73
  htu: tokenUrl,
74
- jti: `${uuid.v4()}`,
74
+ jti: `${uuidv4()}`,
75
75
  },
76
76
  dPopCryptoContext
77
77
  );
78
78
 
79
79
  const signedWiaPoP = await createPopToken(
80
80
  {
81
- jti: `${uuid.v4()}`,
81
+ jti: `${uuidv4()}`,
82
82
  aud,
83
83
  iss,
84
84
  },
@@ -16,7 +16,7 @@ import {
16
16
  } from "../../utils/errors";
17
17
  import { CredentialResponse } from "./types";
18
18
  import { createDPopToken } from "../../utils/dpop";
19
- import uuid from "react-native-uuid";
19
+ import { v4 as uuidv4 } from "uuid";
20
20
 
21
21
  export type ObtainCredential = (
22
22
  issuerConf: Out<EvaluateIssuerTrust>["issuerConf"],
@@ -127,7 +127,7 @@ export const obtainCredential: ObtainCredential = async (
127
127
  {
128
128
  htm: "POST",
129
129
  htu: credentialUrl,
130
- jti: `${uuid.v4()}`,
130
+ jti: `${uuidv4()}`,
131
131
  ath: await sha256ToBase64(accessToken.access_token),
132
132
  },
133
133
  dPopCryptoContext
@@ -108,7 +108,7 @@ const eid = {
108
108
  const eidCryptoContext = createCryptoContextFor(eid.keyTag);
109
109
 
110
110
  // Create credential crypto context
111
- const credentialKeyTag = uuid.v4().toString();
111
+ const credentialKeyTag = uuidv4().toString();
112
112
  await generate(credentialKeyTag); // Let's assume this function generates a new hardware-backed key pair
113
113
  const credentialCryptoContext = createCryptoContextFor(credentialKeyTag);
114
114
 
@@ -244,7 +244,7 @@ const authorizationContext = idpHint.includes("servizicie")
244
244
  * Create credential crypto context for the PID
245
245
  * WARNING: The eID keytag must be persisted and later used when requesting a credential which requires a eID presentation
246
246
  */
247
- const credentialKeyTag = uuid.v4().toString();
247
+ const credentialKeyTag = uuidv4().toString();
248
248
  await generate(credentialKeyTag);
249
249
  const credentialCryptoContext = createCryptoContextFor(credentialKeyTag);
250
250
 
@@ -1,4 +1,4 @@
1
- import uuid from "react-native-uuid";
1
+ import { v4 as uuidv4 } from "uuid";
2
2
  import {
3
3
  decode as decodeJwt,
4
4
  sha256ToBase64,
@@ -41,7 +41,7 @@ export const getRequestObject: GetRequestObject = async (
41
41
  ) => {
42
42
  const signedWalletInstanceDPoP = await createDPopToken(
43
43
  {
44
- jti: `${uuid.v4()}`,
44
+ jti: `${uuidv4()}`,
45
45
  htm: "GET",
46
46
  htu: requestUri,
47
47
  ath: await sha256ToBase64(walletInstanceAttestation),
@@ -1,5 +1,5 @@
1
1
  import { EncryptJwe, SignJWT } from "@pagopa/io-react-native-jwt";
2
- import uuid from "react-native-uuid";
2
+ import { v4 as uuidv4 } from "uuid";
3
3
  import * as WalletInstanceAttestation from "../../wallet-instance-attestation";
4
4
  import type { JWK } from "@pagopa/io-react-native-jwt/lib/typescript/types";
5
5
  import { NoSuitableKeysFoundInEntityConfiguration } from "./errors";
@@ -79,7 +79,7 @@ const prepareVpToken = async (
79
79
  })
80
80
  .setPayload({
81
81
  vp: vp,
82
- jti: `${uuid.v4()}`,
82
+ jti: `${uuidv4()}`,
83
83
  iss,
84
84
  nonce: requestObject.nonce,
85
85
  })
@@ -90,8 +90,8 @@ const prepareVpToken = async (
90
90
 
91
91
  const vc_scope = requestObject.scope;
92
92
  const presentation_submission = {
93
- definition_id: `${uuid.v4()}`,
94
- id: `${uuid.v4()}`,
93
+ definition_id: `${uuidv4()}`,
94
+ id: `${uuidv4()}`,
95
95
  descriptor_map: paths.map((p) => ({
96
96
  id: vc_scope,
97
97
  path: `$.vp_token.${p.path}`,
@@ -5,7 +5,7 @@ import {
5
5
  } from "../../utils/misc";
6
6
  import type { EvaluateIssuerTrust, ObtainCredential } from "../issuance";
7
7
  import { type CryptoContext, SignJWT } from "@pagopa/io-react-native-jwt";
8
- import uuid from "react-native-uuid";
8
+ import { v4 as uuidv4 } from "uuid";
9
9
  import { StatusAttestationResponse } from "./types";
10
10
  import {
11
11
  IssuerResponseError,
@@ -46,7 +46,7 @@ export const statusAttestation: StatusAttestation = async (
46
46
  const credentialPop = await new SignJWT(credentialCryptoContext)
47
47
  .setPayload({
48
48
  aud: statusAttUrl,
49
- jti: uuid.v4().toString(),
49
+ jti: uuidv4().toString(),
50
50
  credential_hash: credentialHash,
51
51
  credential_hash_alg: "S256",
52
52
  })
@@ -1,7 +1,3 @@
1
- import {
2
- decode as decodeJwt,
3
- verify as verifyJwt,
4
- } from "@pagopa/io-react-native-jwt";
5
1
  import {
6
2
  EntityConfiguration,
7
3
  EntityStatement,
@@ -10,33 +6,8 @@ import {
10
6
  import { JWK } from "../utils/jwk";
11
7
  import { IoWalletError } from "../utils/errors";
12
8
  import * as z from "zod";
13
- import type { JWTDecodeResult } from "@pagopa/io-react-native-jwt/lib/typescript/types";
14
9
  import { getSignedEntityConfiguration, getSignedEntityStatement } from ".";
15
-
16
- type ParsedToken = {
17
- header: JWTDecodeResult["protectedHeader"];
18
- payload: JWTDecodeResult["payload"];
19
- };
20
-
21
- // Verify a token signature
22
- // The kid is extracted from the token header
23
- const verify = async (
24
- token: string,
25
- kid: string,
26
- jwks: JWK[]
27
- ): Promise<ParsedToken> => {
28
- const jwk = jwks.find((k) => k.kid === kid);
29
- if (!jwk) {
30
- throw new Error(`Invalid kid: ${kid}, token: ${token}`);
31
- }
32
- const { protectedHeader: header, payload } = await verifyJwt(token, jwk);
33
- return { header, payload };
34
- };
35
-
36
- const decode = (token: string) => {
37
- const { protectedHeader: header, payload } = decodeJwt(token);
38
- return { header, payload };
39
- };
10
+ import { decode, type ParsedToken, verify } from "./utils";
40
11
 
41
12
  // The first element of the chain is supposed to be the Entity Configuration for the document issuer
42
13
  const FirstElementShape = EntityConfiguration;
@@ -53,7 +24,7 @@ const LastElementShape = z.union([
53
24
  * Validates a provided trust chain against a known trust
54
25
  *
55
26
  * @param trustAnchorEntity The entity configuration of the known trust anchor
56
- * @param chain The chain of statements to be validate
27
+ * @param chain The chain of statements to be validated
57
28
  * @returns The list of parsed token representing the chain
58
29
  * @throws {IoWalletError} If the chain is not valid
59
30
  */
@@ -85,7 +56,7 @@ export async function validateTrustChain(
85
56
  };
86
57
 
87
58
  // select keys from the next token
88
- // if the current token is the last, keys fro trust anchor will be used
59
+ // if the current token is the last, keys from trust anchor will be used
89
60
  const selectKeys = (currentIndex: number): JWK[] => {
90
61
  if (currentIndex === chain.length - 1) {
91
62
  return trustAnchorEntity.payload.jwks.keys;
@@ -101,7 +72,7 @@ export async function validateTrustChain(
101
72
  };
102
73
 
103
74
  // Iterate the chain and validate each element's signature against the public keys of its next
104
- // If there is no next, hence it's the end of the chain and it must be verified by the Trust Anchor
75
+ // If there is no next, hence it's the end of the chain, and it must be verified by the Trust Anchor
105
76
  return Promise.all(
106
77
  chain
107
78
  .map((token, i) => [token, selectKid(i), selectKeys(i)] as const)
@@ -114,38 +85,51 @@ export async function validateTrustChain(
114
85
  *
115
86
  * @param chain The original chain
116
87
  * @param appFetch (optional) fetch api implementation
117
- * @returns A list of signed token that reprensent the trust chain, in the same order of the provided chain
118
- * @throws When an element of the chain fails to parse
88
+ * @returns A list of signed token that represent the trust chain, in the same order of the provided chain
89
+ * @throws IoWalletError When an element of the chain fails to parse
119
90
  */
120
- export function renewTrustChain(
91
+ export async function renewTrustChain(
121
92
  chain: string[],
122
93
  appFetch: GlobalFetch["fetch"] = fetch
123
- ) {
94
+ ): Promise<string[]> {
124
95
  return Promise.all(
125
- chain
126
- // Decode each item to determine its shape
127
- .map(decode)
128
- .map(
129
- (e) =>
130
- [
131
- EntityStatement.safeParse(e),
132
- EntityConfiguration.safeParse(e),
133
- ] as const
134
- )
135
- // fetch the element according to its shape
136
- .map(([es, ec], i) =>
137
- ec.success
138
- ? getSignedEntityConfiguration(ec.data.payload.iss, { appFetch })
139
- : es.success
140
- ? getSignedEntityStatement(es.data.payload.iss, es.data.payload.sub, {
141
- appFetch,
142
- })
143
- : // if the element fail to parse in both EntityStatement and EntityConfiguration, raise an error
144
- Promise.reject(
145
- new IoWalletError(
146
- `Cannot renew trust chain because the element #${i} failed to be parsed.`
147
- )
148
- )
149
- )
96
+ chain.map(async (token, index) => {
97
+ const decoded = decode(token);
98
+
99
+ const entityStatementResult = EntityStatement.safeParse(decoded);
100
+ const entityConfigurationResult = EntityConfiguration.safeParse(decoded);
101
+
102
+ if (entityConfigurationResult.success) {
103
+ return getSignedEntityConfiguration(
104
+ entityConfigurationResult.data.payload.iss,
105
+ { appFetch }
106
+ );
107
+ }
108
+ if (entityStatementResult.success) {
109
+ const entityStatement = entityStatementResult.data;
110
+
111
+ const parentBaseUrl = entityStatement.payload.iss;
112
+ const parentECJwt = await getSignedEntityConfiguration(parentBaseUrl, {
113
+ appFetch,
114
+ });
115
+ const parentEC = EntityConfiguration.parse(decode(parentECJwt));
116
+
117
+ const federationFetchEndpoint =
118
+ parentEC.payload.metadata.federation_entity.federation_fetch_endpoint;
119
+ if (!federationFetchEndpoint) {
120
+ throw new IoWalletError(
121
+ `Parent EC at ${parentBaseUrl} is missing federation_fetch_endpoint`
122
+ );
123
+ }
124
+ return getSignedEntityStatement(
125
+ federationFetchEndpoint,
126
+ entityStatement.payload.sub,
127
+ { appFetch }
128
+ );
129
+ }
130
+ throw new IoWalletError(
131
+ `Cannot renew trust chain because element #${index} failed to parse.`
132
+ );
133
+ })
150
134
  );
151
135
  }