@pagopa/io-react-native-wallet 3.6.2 → 3.6.3

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 (39) hide show
  1. package/lib/commonjs/client/generated/wallet-provider.js +23 -4
  2. package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +1 -1
  4. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
  5. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +0 -1
  6. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
  7. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +8 -3
  8. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
  9. package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js +3 -3
  10. package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js.map +1 -1
  11. package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js +1 -1
  12. package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js.map +1 -1
  13. package/lib/module/client/generated/wallet-provider.js +17 -1
  14. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  15. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +2 -2
  16. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
  17. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +0 -2
  18. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
  19. package/lib/module/credentials-catalogue/v1.3.3/mappers.js +8 -3
  20. package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
  21. package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js +3 -3
  22. package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js.map +1 -1
  23. package/lib/module/wallet-unit-attestation/v1.3.3/types.js +1 -1
  24. package/lib/module/wallet-unit-attestation/v1.3.3/types.js.map +1 -1
  25. package/lib/typescript/client/generated/wallet-provider.d.ts +33 -0
  26. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  27. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +481 -2
  28. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -1
  29. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -1
  30. package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -1
  31. package/lib/typescript/wallet-unit-attestation/v1.3.3/types.d.ts +1 -1
  32. package/package.json +6 -6
  33. package/src/client/generated/wallet-provider.ts +22 -0
  34. package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +4 -4
  35. package/src/credential/issuance/v1.3.3/mappers.ts +3 -3
  36. package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +0 -1
  37. package/src/credentials-catalogue/v1.3.3/mappers.ts +8 -2
  38. package/src/wallet-unit-attestation/v1.3.3/issuing.ts +3 -3
  39. package/src/wallet-unit-attestation/v1.3.3/types.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-react-native-wallet",
3
- "version": "3.6.2",
3
+ "version": "3.6.3",
4
4
  "description": "Provide data structures, helpers and API for IO Wallet",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -140,11 +140,11 @@
140
140
  ]
141
141
  },
142
142
  "dependencies": {
143
- "@pagopa/io-wallet-oauth2": "1.5.3",
144
- "@pagopa/io-wallet-oid-federation": "1.5.3",
145
- "@pagopa/io-wallet-oid4vci": "1.5.3",
146
- "@pagopa/io-wallet-oid4vp": "1.5.3",
147
- "@pagopa/io-wallet-utils": "1.5.3",
143
+ "@pagopa/io-wallet-oauth2": "1.5.4-alpha-20260717125503",
144
+ "@pagopa/io-wallet-oid-federation": "1.5.4-alpha-20260717125503",
145
+ "@pagopa/io-wallet-oid4vci": "1.5.4-alpha-20260717125503",
146
+ "@pagopa/io-wallet-oid4vp": "1.5.4-alpha-20260717125503",
147
+ "@pagopa/io-wallet-utils": "1.5.4-alpha-20260717125503",
148
148
  "@sd-jwt/core": "^0.19.0",
149
149
  "@sd-jwt/crypto-nodejs": "^0.19.0",
150
150
  "@sd-jwt/jwt-status-list": "^0.19.0",
@@ -64,6 +64,14 @@ export const CreateWalletInstanceAttestationBody = z.string();
64
64
  export type CreateWalletUnitAttestationBody = z.infer<typeof CreateWalletUnitAttestationBody>;
65
65
  export const CreateWalletUnitAttestationBody = z.string();
66
66
 
67
+ export type CreateKeyAttestationBody = z.infer<typeof CreateKeyAttestationBody>;
68
+ export const CreateKeyAttestationBody = z.string();
69
+
70
+ export type KeyAttestation = z.infer<typeof KeyAttestation>;
71
+ export const KeyAttestation = z.object({
72
+ key_attestation: z.string(),
73
+ });
74
+
67
75
  export type ProblemJson = z.infer<typeof ProblemJson>;
68
76
  export const ProblemJson = z.object({
69
77
  type: z.string().optional(),
@@ -185,6 +193,19 @@ export const post_CreateWalletUnitAttestation = {
185
193
  response: WalletUnitAttestation,
186
194
  };
187
195
 
196
+ export type post_CreateKeyAttestation = typeof post_CreateKeyAttestation;
197
+ export const post_CreateKeyAttestation = {
198
+ method: z.literal("POST"),
199
+ path: z.literal("/key-attestations"),
200
+ parameters: z.object({
201
+ header: z.object({
202
+ "Content-Type": z.string().optional(),
203
+ }),
204
+ body: CreateKeyAttestationBody,
205
+ }),
206
+ response: KeyAttestation,
207
+ };
208
+
188
209
  // <EndpointByMethod>
189
210
  export const EndpointByMethod = {
190
211
  get: {
@@ -199,6 +220,7 @@ export const EndpointByMethod = {
199
220
  "/wallet-attestations": post_CreateWalletAttestation,
200
221
  "/wallet-instance-attestations": post_CreateWalletInstanceAttestation,
201
222
  "/wallet-unit-attestations": post_CreateWalletUnitAttestation,
223
+ "/key-attestations": post_CreateKeyAttestation,
202
224
  },
203
225
  put: {
204
226
  "/wallet-instances/{id}/status": put_SetWalletInstanceStatus,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  fetchMetadata,
3
- type MetadataResponseV1_3,
3
+ type MetadataResponseV1_4,
4
4
  } from "@pagopa/io-wallet-oid4vci";
5
- import { sdkConfigV1_3 } from "../../../utils/config";
5
+ import { sdkConfigV1_4 } from "../../../utils/config";
6
6
  import type { IssuanceApi } from "../api";
7
7
  import { mapToIssuerConfig } from "./mappers";
8
8
 
@@ -11,13 +11,13 @@ export const evaluateIssuerTrust: IssuanceApi["evaluateIssuerTrust"] = async (
11
11
  context = {}
12
12
  ) => {
13
13
  const issuerMetadata = (await fetchMetadata({
14
- config: sdkConfigV1_3,
14
+ config: sdkConfigV1_4,
15
15
  credentialIssuerUrl: issuerUrl,
16
16
  authorizationServer: context.authorizationServer,
17
17
  callbacks: {
18
18
  fetch: context.appFetch,
19
19
  },
20
- })) as MetadataResponseV1_3;
20
+ })) as MetadataResponseV1_4;
21
21
 
22
22
  return { issuerConf: mapToIssuerConfig(issuerMetadata) };
23
23
  };
@@ -1,4 +1,4 @@
1
- import type { MetadataResponseV1_3 } from "@pagopa/io-wallet-oid4vci";
1
+ import type { MetadataResponseV1_4 } from "@pagopa/io-wallet-oid4vci";
2
2
  import type { ParsedAuthorizeRequestResult } from "@pagopa/io-wallet-oid4vp";
3
3
  import { assert } from "../../../utils/misc";
4
4
  import { createMapper } from "../../../utils/mappers";
@@ -9,7 +9,7 @@ import { IssuerConfig } from "../api/IssuerConfig";
9
9
  type CredentialConfigurations =
10
10
  IssuerConfig["credential_configurations_supported"];
11
11
  type OpenIdCredentialIssuer =
12
- MetadataResponseV1_3["metadata"]["openid_credential_issuer"];
12
+ MetadataResponseV1_4["metadata"]["openid_credential_issuer"];
13
13
 
14
14
  const mapCredentialConfigurationsSupported = (
15
15
  oidIssuer: NonNullable<OpenIdCredentialIssuer>
@@ -34,7 +34,7 @@ const mapCredentialConfigurationsSupported = (
34
34
  );
35
35
 
36
36
  export const mapToIssuerConfig = createMapper<
37
- MetadataResponseV1_3,
37
+ MetadataResponseV1_4,
38
38
  IssuerConfig
39
39
  >(
40
40
  (x) => {
@@ -118,7 +118,6 @@ export const DigitalCredential = z.object({
118
118
  authentic_sources: z.array(AuthenticSource),
119
119
  parent_credentials: z.array(z.string()).optional(),
120
120
  formats: z.array(CredentialFormat).optional(),
121
- // claims: z.array(Claim), // TODO: [SIW-3978] Should we keep claims?
122
121
  });
123
122
  export type DigitalCredential = z.infer<typeof DigitalCredential>;
124
123
 
@@ -70,8 +70,14 @@ export const mapToCredentialsCatalogue = createMapper<
70
70
  `Schemas for ${credentialType} must be present in the Schema Registry`
71
71
  );
72
72
  return schemas.map((schema) => ({
73
- configuration_id: schema.id, // TODO: [SIW-3978] Fix this, the schema ID does not correspond to configuration_id
74
- ...schema,
73
+ // Since the schema registry does not contain the actual configuration ID, it is composed according
74
+ // to the IT-Wallet Credential Issuer's convention. Note that this might not be true for every Issuer.
75
+ configuration_id: `${schema.format.replace(/[+-]/g, "_")}_${schema.credential_type}`,
76
+ format: schema.format,
77
+ vct: schema.vct,
78
+ docType: schema.docType,
79
+ schema_uri: schema.schema_uri,
80
+ "schema_uri#integrity": schema["schema_uri#integrity"],
75
81
  }));
76
82
  };
77
83
 
@@ -127,7 +127,7 @@ export const getAttestation: WalletUnitAttestationSupportedApi["getAttestation"]
127
127
  );
128
128
 
129
129
  const response = await api
130
- .post("/wallet-unit-attestations", {
130
+ .post("/key-attestations", {
131
131
  header: {
132
132
  "Content-Type": "text/plain",
133
133
  },
@@ -137,11 +137,11 @@ export const getAttestation: WalletUnitAttestationSupportedApi["getAttestation"]
137
137
 
138
138
  Logger.log(
139
139
  LogLevel.DEBUG,
140
- `Obtained Wallet Unit Attestation: ${response.wallet_unit_attestation}`
140
+ `Obtained Wallet Unit Attestation: ${response.key_attestation}`
141
141
  );
142
142
 
143
143
  return {
144
144
  format: "jwt",
145
- attestation: response.wallet_unit_attestation,
145
+ attestation: response.key_attestation,
146
146
  };
147
147
  };
@@ -17,5 +17,5 @@ export type WalletUnitAttestationResponse = z.infer<
17
17
  typeof WalletUnitAttestationResponse
18
18
  >;
19
19
  export const WalletUnitAttestationResponse = z.object({
20
- wallet_unit_attestation: z.string(),
20
+ key_attestation: z.string(),
21
21
  });